--- old/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java 2016-02-13 21:18:08.895497680 -0800 +++ new/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java 2016-02-13 21:18:08.803497677 -0800 @@ -261,10 +261,13 @@ // According to JLS, we should not be showing public modifier for // interface methods. if ((utils.isField(member) || utils.isMethod(member)) - && writer instanceof ClassWriterImpl - && utils.isInterface(((ClassWriterImpl) writer).getTypeElement())) { + && ((writer instanceof ClassWriterImpl + && utils.isInterface(((ClassWriterImpl) writer).getTypeElement()) || + writer instanceof AnnotationTypeWriterImpl) )) { // Remove the implicit abstract and public modifiers - if (utils.isMethod(member) && utils.isInterface(member.getEnclosingElement())) { + if (utils.isMethod(member) && + (utils.isInterface(member.getEnclosingElement()) || + utils.isAnnotationType(member.getEnclosingElement()))) { set.remove(ABSTRACT); set.remove(PUBLIC); } --- old/test/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java 2016-02-13 21:18:09.219497690 -0800 +++ new/test/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java 2016-02-13 21:18:09.131497687 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /* * @test - * @bug 4973609 8015249 8025633 8026567 + * @bug 4973609 8015249 8025633 8026567 6469561 * @summary Make sure that annotation types with 0 members does not have * extra HR tags. * @author jamieh @@ -61,7 +61,7 @@ + " ", "", "

DEFAULT_NAME

\n" - + "
public static final java."
+                + "
static final java."
                 + "lang.String DEFAULT_NAME
"); checkOutput("pkg/AnnotationType.html", true, @@ -70,6 +70,21 @@ "
  • Detail: 
  • \n" + "
  • Field | 
  • "); + checkOutput("pkg/AnnotationType.html", true, + "", + "