Currently, nested enum members are labeled as "static class"; furthermore, nested elements of interfaces and elements that *are* interfaces are redundantly labeled "static".

This simple patch would cause nested members to be properly labeled.

--
Index: tl/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java
===================================================================
--- tl/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java Thu Oct 30 20:36:49 CDT 2008 +++ tl/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java Thu Oct 30 20:36:49 CDT 2008
@@ -181,6 +181,8 @@
             writer.space();
             if (member.isClass()) {
                 print("class");
+            } else if (member.isEnum()) {
+                print("enum");
             } else {
                 print("interface");
             }
@@ -227,7 +229,8 @@
         if (member.isMethod() && ((MethodDoc)member).isAbstract()) {
             print("abstract ");
         }
-        if (member.isStatic()) {
+ if (member.isStatic() && !member.isEnum() && !member.isInterface() && !member.containingClass().isInterface()) { + // enums, interfaces, and interface members are always implicitly static or not static
             print("static");
         }
     }

Reply via email to