RFR: JDK-8269401: Merge "Exceptions" and "Errors" into "Exception Classes" [v2]

Jonathan Gibbons jjg at openjdk.java.net
Tue Oct 26 00:08:14 UTC 2021


On Thu, 21 Oct 2021 13:06:47 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:

>> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SummaryListWriter.java line 66:
>> 
>>> 64:             case ENUM -> "doclet.Enums";
>>> 65:             case EXCEPTION_CLASS -> "doclet.ExceptionClasses";
>>> 66:             case ANNOTATION_TYPE -> "doclet.Annotation_Types";
>> 
>> (Possibly unrelated to this PR.) This kind of inconsistency in naming is surprising. Even more surprising is the fact that these two resources live in different files. While `ExceptionClasses` lives in doclet.properties, `Annotation_Types` lives in standard.properties. To confuse things even further, `AnnotationType` and `ExceptionClass` live in the same file, doclet.properties.
>
> Interesting: We have property `doclet.Annotation_Types` (with underscore) defined in `standard.properties` and `doclet.AnnotationTypes` (without underscore) in `doclets.properties. Both properties have the same value. Smells like another cleanup task.

There's old naming and new naming.  We still use old naming for older releases, and use the new naming for recent releases. There's low-level code to select the right form, depending on the version.

So yes, for now, the internal code is inconsistent for old/new terminology, and will never be completely new-clean because of declarations like `TypeElement`, but the important point is that the generated output should always be consistent, at least per the policy for that release.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6061


More information about the javadoc-dev mailing list