RFR: 8285488: Improve DocFinder [v4]

Pavel Rappo prappo at openjdk.org
Mon Nov 14 23:34:06 UTC 2022


On Fri, 28 Oct 2022 19:04:26 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> Pavel Rappo has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 49 commits:
>> 
>>  - refactor: improve error handling
>>  - refactor: clarify, reuse, simplify, clean up
>>  - refactor: pass Utils & BaseConfiguration to taglet
>>    
>>    This simplifies lots of methods. Later this could be done for other
>>    taglets too.
>>  - refactor: better code comments
>>  - refactor: add more relevant excerpts from JLS
>>  - fix: introduce more control to search
>>    
>>    This is done for the sake of `@throws`. Two convenience methods are
>>    added to assist migration from Optional with minimal change to
>>    DocFinder call sites.
>>    
>>    This solves 8295800: When searching documentation for an exception,
>>    don't jump over methods that don't mention that exception.
>>  - refactor: clean up ThrowsTaglet
>>  - Merge branch 'master' into HEAD
>>  - fix: test failed due to filesystem handling issues
>>    
>>    Filed 8295543 to track that filesystem issue and fixed the test to make
>>    sure the package cannot be confused with the type parameter, whose
>>    name is not pertinent to the test anyway.
>>  - Merge branch 'master' into 8285488
>>  - ... and 39 more: https://git.openjdk.org/jdk/compare/628820f4...c2db1ae6
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ThrowsTaglet.java line 752:
> 
>> 750:     }
>> 751: 
>> 752:     private static String detailedDescriptionOf(Element e) {
> 
> can't be static if you're going to solve i18n

It could wait. I don't have a clear idea of how to do it now. It's also a significant effort. At the same time, if left without diagnostic output, errors could be puzzling.

> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java line 1921:
> 
>> 1919:     // preceded by `.` and an outer type; this is not how JLS defines "simple
>> 1920:     // name". See "Simple Name", "Qualified Name", "Fully Qualified Name".
>> 1921:     private String getSimpleName0(Element e) {
> 
> Maybe avoid the "simple name" term then, introducing a new name or phrase if necessary.

That method predates this PR, so I simply clarified it.

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

PR: https://git.openjdk.org/jdk/pull/10746


More information about the javadoc-dev mailing list