On Fri, 19 Feb 2021 15:58:48 GMT, Hannes Wallnöfer <hann...@openjdk.org> wrote:

> This replaces the unlocalized `<Unnamed>` string with a localized string 
> resource in API docs covering code in the unnamed package. The name used in 
> the default locale is "Unnamed Package". The old `<Unnamed>` token is still 
> used as an internal placeholder, for example in `Extern.java` and in the 
> search index files.
> 
> Previously, we had two distinct `getPackageName(PackageElement)` methods, one 
> in `HtmlDocletWriter` returning a Content object and one in `Utils` returning 
> a String. The former is now changed to return the localized content resource. 
> To disambiguate it from the latter, it is renamed to 
> `getLocalizedPackageName`. I also added reciprocal references to the doc 
> comments in both methods.
> 
> A few minor notes on changes that may not be obvious:
> 
>  - In the package and module summary pages, I replaced the `&nbsp;`  in the 
> heading with an ordinary space character as the full content of the `<h1>` 
> element now also appears in its `title` attribute, where entities are not 
> supported.
>  - I added an extra set of source files to test Use pages in 
> `TestUnnamedPackage` as the existing sources contained an illegal Java file, 
> causing `PackageUseWriter` to fail.

This pull request has now been integrated.

Changeset: a5c4b9a6
Author:    Hannes Wallnöfer <hann...@openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/a5c4b9a6
Stats:     208 lines in 33 files changed: 103 ins; 38 del; 67 mod

8260223: Handling of unnamed package in javadoc pages

Reviewed-by: jjg

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

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

Reply via email to