RFR: 8283864: Clean up DocFinder and friends

Pavel Rappo prappo at openjdk.java.net
Thu Apr 14 11:45:21 UTC 2022


On Wed, 13 Apr 2022 23:14:49 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> A clean-up to facilitate more clean-up in the future.
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/InheritDocTaglet.java line 112:
> 
>> 110:             assert !(e instanceof TypeElement typeElement)
>> 111:                     || typeElement.getSuperclass().getKind() == TypeKind.NONE;
>> 112:             String message = utils.getSimpleName(e) +
> 
> `message` sounds more freeform than the value might imply. I'd be tempted to call it `signature`, and replace the `""` with `e.toString()` (just in case)

I was tempted to use `String.valueOf(e)`, but then realized that `e` is guaranteed (although implicitly) to not be `null` by the preceding call to `Utils.isExecutableElement`.

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

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


More information about the javadoc-dev mailing list