RFR: JDK-8284037: Snippet-files subdirectory not automatically detected when in unnamed package [v2]
Pavel Rappo
prappo at openjdk.java.net
Tue May 24 19:52:47 UTC 2022
On Mon, 16 May 2022 23:16:25 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
>> Please review a small fix to address use of snippets in source code in the unnamed package.
>>
>> The core of the fix is to replace `packageName(pkg, utils)` (which returns `"<Unnamed>"` for the unnamed package) with plain old `pkg.getQualifiedName().toString()` (which returns an empty string for the unnamed package.)
>>
>> There's some minor localized cleanup and rearrangement as well.
>>
>> The test verifies behavior without and then with a source path, since that is the likely path of discovery by a user playing with the unnamed package.
>
> Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision:
>
> address review feedback
Changes requested by prappo (Reviewer).
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SnippetTaglet.java line 223:
> 221: JavaFileManager.Location l = utils.getLocationForPackage(pkg);
> 222: String relativeName = "snippet-files/" + v;
> 223: String packageName = packageName(pkg, utils);
Drop the now-unused `packageName` method.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8708
More information about the javadoc-dev
mailing list