RFR: JDK-8284037: Snippet-files subdirectory not automatically detected when in unnamed package

Jonathan Gibbons jjg at openjdk.java.net
Fri May 13 22:24:16 UTC 2022


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.

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

Commit messages:
 - fix whitespace
 - JDK-8284037: Snippet-files subdirectory not automatically detected when in unnamed package

Changes: https://git.openjdk.java.net/jdk/pull/8708/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8708&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8284037
  Stats: 110 lines in 2 files changed: 102 ins; 7 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8708.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8708/head:pull/8708

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


More information about the javadoc-dev mailing list