RFR: JDK-8261976: Normalize id's used by the standard doclet

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR: JDK-8261976: Normalize id's used by the standard doclet

Jonathan Gibbons-2
This is a conceptually simple change to ensure that all "id"s generated by the standard doclet use `-` to separate the words of the id. The `src/` change is primarily in the recently-new `HtmlIds` class, but there was one oversight in the recent work for `HtmlIds` in `SourceToHTMLConverter`, which is now fixed.

It's notable now that all "static" ids generated by the doclet contain at least one `-`, and so never conflict with the id for any field name, which cannot contain a `-`.

The tests are updated; all tests pass, of course, including the implicit link check that is default on in almost all tests. A full doc check run on a full JDK docs build did not reveal any unexpected problems.   It wasn't clear which tests to nominate with a bug number, and so (somewhat unusually) I have added the bug number to all affected tests.

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

Commit messages:
 - JDK-8261976: Normalize id's used by the standard doclet

Changes: https://git.openjdk.java.net/jdk/pull/2635/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2635&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8261976
  Stats: 307 lines in 33 files changed: 1 ins; 1 del; 305 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2635.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2635/head:pull/2635

PR: https://git.openjdk.java.net/jdk/pull/2635
Reply | Threaded
Open this post in threaded view
|

Re: RFR: JDK-8261976: Normalize id's used by the standard doclet

Hannes Wallnöfer
On Thu, 18 Feb 2021 23:55:28 GMT, Jonathan Gibbons <[hidden email]> wrote:

> This is a conceptually simple change to ensure that all "id"s generated by the standard doclet use `-` to separate the words of the id. The `src/` change is primarily in the recently-new `HtmlIds` class, but there was one oversight in the recent work for `HtmlIds` in `SourceToHTMLConverter`, which is now fixed.
>
> It's notable now that all "static" ids generated by the doclet contain at least one `-`, and so never conflict with the id for any field name, which cannot contain a `-`.
>
> The tests are updated; all tests pass, of course, including the implicit link check that is default on in almost all tests. A full doc check run on a full JDK docs build did not reveal any unexpected problems.   It wasn't clear which tests to nominate with a bug number, and so (somewhat unusually) I have added the bug number to all affected tests.

Looks good!

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

Marked as reviewed by hannesw (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/2635
Reply | Threaded
Open this post in threaded view
|

Re: RFR: JDK-8261976: Normalize id's used by the standard doclet [v2]

Jonathan Gibbons-2
In reply to this post by Jonathan Gibbons-2
> This is a conceptually simple change to ensure that all "id"s generated by the standard doclet use `-` to separate the words of the id. The `src/` change is primarily in the recently-new `HtmlIds` class, but there was one oversight in the recent work for `HtmlIds` in `SourceToHTMLConverter`, which is now fixed.
>
> It's notable now that all "static" ids generated by the doclet contain at least one `-`, and so never conflict with the id for any field name, which cannot contain a `-`.
>
> The tests are updated; all tests pass, of course, including the implicit link check that is default on in almost all tests. A full doc check run on a full JDK docs build did not reveal any unexpected problems.   It wasn't clear which tests to nominate with a bug number, and so (somewhat unusually) I have added the bug number to all affected tests.

Jonathan Gibbons has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:

 - Merge remote-tracking branch 'upstream/master' into htmlIds
   
   # Conflicts:
   # test/langtools/jdk/javadoc/doclet/testPackageDeprecation/TestPackageDeprecation.java
   # test/langtools/jdk/javadoc/doclet/testUseOption/TestUseOption.java
 - JDK-8261976: Normalize id's used by the standard doclet

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

Changes: https://git.openjdk.java.net/jdk/pull/2635/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2635&range=01
  Stats: 307 lines in 33 files changed: 1 ins; 1 del; 305 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2635.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2635/head:pull/2635

PR: https://git.openjdk.java.net/jdk/pull/2635
Reply | Threaded
Open this post in threaded view
|

Integrated: JDK-8261976: Normalize id's used by the standard doclet

Jonathan Gibbons-2
In reply to this post by Jonathan Gibbons-2
On Thu, 18 Feb 2021 23:55:28 GMT, Jonathan Gibbons <[hidden email]> wrote:

> This is a conceptually simple change to ensure that all "id"s generated by the standard doclet use `-` to separate the words of the id. The `src/` change is primarily in the recently-new `HtmlIds` class, but there was one oversight in the recent work for `HtmlIds` in `SourceToHTMLConverter`, which is now fixed.
>
> It's notable now that all "static" ids generated by the doclet contain at least one `-`, and so never conflict with the id for any field name, which cannot contain a `-`.
>
> The tests are updated; all tests pass, of course, including the implicit link check that is default on in almost all tests. A full doc check run on a full JDK docs build did not reveal any unexpected problems.   It wasn't clear which tests to nominate with a bug number, and so (somewhat unusually) I have added the bug number to all affected tests.

This pull request has now been integrated.

Changeset: c30a90bb
Author:    Jonathan Gibbons <[hidden email]>
URL:       https://git.openjdk.java.net/jdk/commit/c30a90bb
Stats:     307 lines in 33 files changed: 1 ins; 1 del; 305 mod

8261976: Normalize id's used by the standard doclet

Reviewed-by: hannesw

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

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