-
Bug
-
Resolution: Not an Issue
-
P4
-
5.0u4, 6
-
generic, sparc
-
generic, solaris_10, windows_xp
Auto-generated text for Java enums for auto-generated method values() has several doc problems:
1. It mentions the order in which enum constants are declared, but the Summary and Detail section declare constants in different order: "Returns an array containing the constants of this enum type, in the order they're declared.". This is confusing. ###@###.### suggested to modify the doc comment so that it mentions which order is used:
">>>>The summary is sorted alphabetically. The detail is in source order.
>>>>And we might allow the order of both to be specified by the user.
>>>>(Some have argued we should not allow the source order.)
>>>>Perhaps the bug would be that the method description should say:
>>>>
>>>> "Returns an array containing the constants of this enum type,
>>>> in the order they're declared. This order is shown in the
>>>> Detail section of the documentation for this class."
"
2. The example in values() method in not well-formatted according to the Java Code Conventions:
for(TrayIcon.MessageType c : TrayIcon.MessageType.values())
System.out.println(c);
It is suggested that the example is modified to include curly braces "{", "}", and that the indent before System.out.println be 4 spaces
See comments section for the example generated documents.
###@###.### 2005-2-09 15:37:48 GMT
1. It mentions the order in which enum constants are declared, but the Summary and Detail section declare constants in different order: "Returns an array containing the constants of this enum type, in the order they're declared.". This is confusing. ###@###.### suggested to modify the doc comment so that it mentions which order is used:
">>>>The summary is sorted alphabetically. The detail is in source order.
>>>>And we might allow the order of both to be specified by the user.
>>>>(Some have argued we should not allow the source order.)
>>>>Perhaps the bug would be that the method description should say:
>>>>
>>>> "Returns an array containing the constants of this enum type,
>>>> in the order they're declared. This order is shown in the
>>>> Detail section of the documentation for this class."
"
2. The example in values() method in not well-formatted according to the Java Code Conventions:
for(TrayIcon.MessageType c : TrayIcon.MessageType.values())
System.out.println(c);
It is suggested that the example is modified to include curly braces "{", "}", and that the indent before System.out.println be 4 spaces
See comments section for the example generated documents.
###@###.### 2005-2-09 15:37:48 GMT
- duplicates
-
JDK-6337627 javax_swing.RowFilter.ComparisonType.values() method behaviour is wrong
- Closed