From jjg at openjdk.java.net Mon Jan 3 21:50:18 2022
From: jjg at openjdk.java.net (Jonathan Gibbons)
Date: Mon, 3 Jan 2022 21:50:18 GMT
Subject: [jdk18] RFR: JDK-8273452: DocTrees.getDocCommentTree should be
specified as idempotent
In-Reply-To:
References:
Message-ID:
On Thu, 16 Dec 2021 11:05:01 GMT, Hannes Walln?fer wrote:
> Please review a doc-only change to add implementation notes to the `DocTrees.getDocCommentTree` methods, some of which return the same `DocCommentTree` instance on repeated invocation and some don't. I decided to use `@implNote` instead of `@implSpec` as usually I wouldn't expect object identity to be part of a Java API specification.
>
> I verified the described behavior using code analysis and enhancing existing tests. The latter are not included in the commit as this is a `noreg-doc` issue.
I guess it's a gray area whether it should be an `implSpec` or an `implNote`.
It is a relatively important aspect of the API, because the operations are expensive, and even cause some downstream caching.
For now, it's enough that it is noted in some fashion.
As a general style note, I would suggest a blank line before each `implNote`, and change "The implementation of this method" to either "The default implementation of this method" or just "This implementation".
-------------
Marked as reviewed by jjg (Reviewer).
PR: https://git.openjdk.java.net/jdk18/pull/36
From jjg at openjdk.java.net Tue Jan 4 01:26:36 2022
From: jjg at openjdk.java.net (Jonathan Gibbons)
Date: Tue, 4 Jan 2022 01:26:36 GMT
Subject: RFR: JDK-8268831: Improve javadoc tool handling of streams.
Message-ID:
Please review a relatively simple cleanup left over from last year's cleanup for `JavadocLog` (was `Messager`).
The cleanup here is to rationalize the inconsistent naming and use of methods named `notice` in `JavadocLog` and `ToolEnvironment`, as well as cleanup use of the primitive `Log.printRawLines`. While it would have been nice to move the definition of `ToolEnvironment.notice` into `JavadocLog` that dragged with it the need for the `quiet` variable, which led to initialization order problems. The proposed solution is a compromise.
No tests are affected; `noreg-cleanup`.
-------------
Commit messages:
- JDK-8268831: Improve javadoc tool handling of streams.
Changes: https://git.openjdk.java.net/jdk/pull/6950/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6950&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8268831
Stats: 69 lines in 5 files changed: 15 ins; 25 del; 29 mod
Patch: https://git.openjdk.java.net/jdk/pull/6950.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/6950/head:pull/6950
PR: https://git.openjdk.java.net/jdk/pull/6950
From jlahoda at openjdk.java.net Tue Jan 4 17:27:28 2022
From: jlahoda at openjdk.java.net (Jan Lahoda)
Date: Tue, 4 Jan 2022 17:27:28 GMT
Subject: [jdk18] RFR: 8278373: JavacTypes.searchMethod finds incorrect match
Message-ID:
Currently, when javac encounters a javadoc reference, like `@see PrintStream#println(int)`, will first try to find a method `println` in `PrintStream` using subtyping on the argument types, which may find another overload of the method with an argument that is a subtype of `int` - like `println(double)`. Consequently, the link in the javadoc may be to a wrong method.
In this patch, the proposal is to use the subtype search only as a backup option, using the existing check based on `isSameType` first, and only doing an inexact match using subtyping if the more exact match fails to find a method. This fallback should help possible existing broken references to still work as before, while the preferred use of the more exact match should select the correct method in usual correct cases.
This patch fixes some instances of incorrect references in the JDK's javadoc, a diff of the generated javadocs for the JDK mainline is here:
http://cr.openjdk.java.net/~jlahoda/8278373/JDK-8278373.diff
-------------
Commit messages:
- 8278373: JavacTypes.searchMethod finds incorrect match
Changes: https://git.openjdk.java.net/jdk18/pull/79/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk18&pr=79&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8278373
Stats: 70 lines in 2 files changed: 52 ins; 2 del; 16 mod
Patch: https://git.openjdk.java.net/jdk18/pull/79.diff
Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/79/head:pull/79
PR: https://git.openjdk.java.net/jdk18/pull/79
From vromero at openjdk.java.net Tue Jan 4 19:50:15 2022
From: vromero at openjdk.java.net (Vicente Romero)
Date: Tue, 4 Jan 2022 19:50:15 GMT
Subject: [jdk18] RFR: 8278373: JavacTypes.searchMethod finds incorrect
match
In-Reply-To:
References:
Message-ID:
On Tue, 4 Jan 2022 17:19:44 GMT, Jan Lahoda wrote:
> Currently, when javac encounters a javadoc reference, like `@see PrintStream#println(int)`, will first try to find a method `println` in `PrintStream` using subtyping on the argument types, which may find another overload of the method with an argument that is a subtype of `int` - like `println(double)`. Consequently, the link in the javadoc may be to a wrong method.
>
> In this patch, the proposal is to use the subtype search only as a backup option, using the existing check based on `isSameType` first, and only doing an inexact match using subtyping if the more exact match fails to find a method. This fallback should help possible existing broken references to still work as before, while the preferred use of the more exact match should select the correct method in usual correct cases.
>
> This patch fixes some instances of incorrect references in the JDK's javadoc, a diff of the generated javadocs for the JDK mainline is here:
> http://cr.openjdk.java.net/~jlahoda/8278373/JDK-8278373.diff
looks sensible
will we need a release note for this bug? it could be that some user's APIs could be affected by this change
-------------
Marked as reviewed by vromero (Reviewer).
PR: https://git.openjdk.java.net/jdk18/pull/79
From jjg at openjdk.java.net Tue Jan 4 19:54:15 2022
From: jjg at openjdk.java.net (Jonathan Gibbons)
Date: Tue, 4 Jan 2022 19:54:15 GMT
Subject: [jdk18] RFR: 8278373: JavacTypes.searchMethod finds incorrect
match
In-Reply-To:
References:
Message-ID: <3nXgEPemHZli72G96ehNbbHt5-Hc1WMc4UqP1wrP7z8=.84935fb2-c8d3-4906-8da6-72aab0dc9828@github.com>
On Tue, 4 Jan 2022 17:19:44 GMT, Jan Lahoda wrote:
> Currently, when javac encounters a javadoc reference, like `@see PrintStream#println(int)`, will first try to find a method `println` in `PrintStream` using subtyping on the argument types, which may find another overload of the method with an argument that is a subtype of `int` - like `println(double)`. Consequently, the link in the javadoc may be to a wrong method.
>
> In this patch, the proposal is to use the subtype search only as a backup option, using the existing check based on `isSameType` first, and only doing an inexact match using subtyping if the more exact match fails to find a method. This fallback should help possible existing broken references to still work as before, while the preferred use of the more exact match should select the correct method in usual correct cases.
>
> This patch fixes some instances of incorrect references in the JDK's javadoc, a diff of the generated javadocs for the JDK mainline is here:
> http://cr.openjdk.java.net/~jlahoda/8278373/JDK-8278373.diff
Generally good; I think this is the right fix in the current situation and for potential back porting. It provides improved but compatible behavior.
The API diffs were an unexpected "bonus", if that is the right word. It's better to know about and fix issues than to not know about them. I've spot checked a few of them and all seem reasonable. The fix is especially obvious when the link and the clear-text are different and meant to be the same. The one thing I would suggest is that because a lot of the api diffs are related to "subtyping" between primitive types, we might want to add some test cases for that into the test as well. Here is a random example of the kind of diff I'm talking about:
```
- as if by calling Math.max
.
+ as if by calling Math.max
.
Further out (JDK 19?) I think we should investigate the need for the `strict == false` case and/or give warnings (in javadoc) when the lookup is not exact. We should fix any cases in the JDK docs where that is the case, and/or consider removing support for `strict == false` or else make it an opt-in behavior somehow.
-------------
Marked as reviewed by jjg (Reviewer).
PR: https://git.openjdk.java.net/jdk18/pull/79
From jjg at openjdk.java.net Tue Jan 4 20:03:18 2022
From: jjg at openjdk.java.net (Jonathan Gibbons)
Date: Tue, 4 Jan 2022 20:03:18 GMT
Subject: [jdk18] RFR: 8278373: JavacTypes.searchMethod finds incorrect
match
In-Reply-To:
References:
Message-ID:
On Tue, 4 Jan 2022 17:19:44 GMT, Jan Lahoda wrote:
> Currently, when javac encounters a javadoc reference, like `@see PrintStream#println(int)`, will first try to find a method `println` in `PrintStream` using subtyping on the argument types, which may find another overload of the method with an argument that is a subtype of `int` - like `println(double)`. Consequently, the link in the javadoc may be to a wrong method.
>
> In this patch, the proposal is to use the subtype search only as a backup option, using the existing check based on `isSameType` first, and only doing an inexact match using subtyping if the more exact match fails to find a method. This fallback should help possible existing broken references to still work as before, while the preferred use of the more exact match should select the correct method in usual correct cases.
>
> This patch fixes some instances of incorrect references in the JDK's javadoc, a diff of the generated javadocs for the JDK mainline is here:
> http://cr.openjdk.java.net/~jlahoda/8278373/JDK-8278373.diff
> [snip]
>
> Further out (JDK 19?) I think we should investigate the need for the `strict == false` case and/or give warnings (in javadoc) when the lookup is not exact. We should fix any cases in the JDK docs where that is the case, and/or consider removing support for `strict == false` or else make it an opt-in behavior somehow.
Filed JDK-8279474
-------------
PR: https://git.openjdk.java.net/jdk18/pull/79
From jlahoda at openjdk.java.net Wed Jan 5 14:37:03 2022
From: jlahoda at openjdk.java.net (Jan Lahoda)
Date: Wed, 5 Jan 2022 14:37:03 GMT
Subject: [jdk18] RFR: 8278373: JavacTrees.searchMethod finds incorrect
match
In-Reply-To:
References:
Message-ID:
On Tue, 4 Jan 2022 17:19:44 GMT, Jan Lahoda wrote:
> Currently, when javac encounters a javadoc reference, like `@see PrintStream#println(int)`, will first try to find a method `println` in `PrintStream` using subtyping on the argument types, which may find another overload of the method with an argument that is a subtype of `int` - like `println(double)`. Consequently, the link in the javadoc may be to a wrong method.
>
> In this patch, the proposal is to use the subtype search only as a backup option, using the existing check based on `isSameType` first, and only doing an inexact match using subtyping if the more exact match fails to find a method. This fallback should help possible existing broken references to still work as before, while the preferred use of the more exact match should select the correct method in usual correct cases.
>
> This patch fixes some instances of incorrect references in the JDK's javadoc, a diff of the generated javadocs for the JDK mainline is here:
> http://cr.openjdk.java.net/~jlahoda/8278373/JDK-8278373.diff
I've filled a release note here:
https://bugs.openjdk.java.net/browse/JDK-8279503
And updated the patch to include primitive types and methods with multiple parameters: https://github.com/openjdk/jdk18/pull/79/commits/34e421b96fa7f4e7e20aec16bb758056191b8773
Feedback is welcome!
-------------
PR: https://git.openjdk.java.net/jdk18/pull/79
From jlahoda at openjdk.java.net Wed Jan 5 14:37:02 2022
From: jlahoda at openjdk.java.net (Jan Lahoda)
Date: Wed, 5 Jan 2022 14:37:02 GMT
Subject: [jdk18] RFR: 8278373: JavacTrees.searchMethod finds incorrect
match [v2]
In-Reply-To:
References:
Message-ID:
> Currently, when javac encounters a javadoc reference, like `@see PrintStream#println(int)`, will first try to find a method `println` in `PrintStream` using subtyping on the argument types, which may find another overload of the method with an argument that is a subtype of `int` - like `println(double)`. Consequently, the link in the javadoc may be to a wrong method.
>
> In this patch, the proposal is to use the subtype search only as a backup option, using the existing check based on `isSameType` first, and only doing an inexact match using subtyping if the more exact match fails to find a method. This fallback should help possible existing broken references to still work as before, while the preferred use of the more exact match should select the correct method in usual correct cases.
>
> This patch fixes some instances of incorrect references in the JDK's javadoc, a diff of the generated javadocs for the JDK mainline is here:
> http://cr.openjdk.java.net/~jlahoda/8278373/JDK-8278373.diff
Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
- Merge branch 'master' into JDK-8278373
- Adding new test cases as suggested on the code review.
- 8278373: JavacTypes.searchMethod finds incorrect match
-------------
Changes:
- all: https://git.openjdk.java.net/jdk18/pull/79/files
- new: https://git.openjdk.java.net/jdk18/pull/79/files/8c0ad7f0..0c88aa60
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk18&pr=79&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk18&pr=79&range=00-01
Stats: 137 lines in 5 files changed: 116 ins; 8 del; 13 mod
Patch: https://git.openjdk.java.net/jdk18/pull/79.diff
Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/79/head:pull/79
PR: https://git.openjdk.java.net/jdk18/pull/79
From vromero at openjdk.java.net Wed Jan 5 16:48:23 2022
From: vromero at openjdk.java.net (Vicente Romero)
Date: Wed, 5 Jan 2022 16:48:23 GMT
Subject: [jdk18] RFR: 8278373: JavacTrees.searchMethod finds incorrect
match [v2]
In-Reply-To:
References:
Message-ID:
On Wed, 5 Jan 2022 14:37:02 GMT, Jan Lahoda wrote:
>> Currently, when javac encounters a javadoc reference, like `@see PrintStream#println(int)`, will first try to find a method `println` in `PrintStream` using subtyping on the argument types, which may find another overload of the method with an argument that is a subtype of `int` - like `println(double)`. Consequently, the link in the javadoc may be to a wrong method.
>>
>> In this patch, the proposal is to use the subtype search only as a backup option, using the existing check based on `isSameType` first, and only doing an inexact match using subtyping if the more exact match fails to find a method. This fallback should help possible existing broken references to still work as before, while the preferred use of the more exact match should select the correct method in usual correct cases.
>>
>> This patch fixes some instances of incorrect references in the JDK's javadoc, a diff of the generated javadocs for the JDK mainline is here:
>> http://cr.openjdk.java.net/~jlahoda/8278373/JDK-8278373.diff
>
> Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>
> - Merge branch 'master' into JDK-8278373
> - Adding new test cases as suggested on the code review.
> - 8278373: JavacTypes.searchMethod finds incorrect match
latest change looks good to me
-------------
PR: https://git.openjdk.java.net/jdk18/pull/79
From jjg at openjdk.java.net Thu Jan 6 20:40:44 2022
From: jjg at openjdk.java.net (Jonathan Gibbons)
Date: Thu, 6 Jan 2022 20:40:44 GMT
Subject: RFR: JDK-8272853: improve `JavadocTester.runTests`
Message-ID:
Please review a medium simple test-only fix to improve the `JavadocTester` `runTests` methods.
Currently, there are two overloads: one to invoke no-args test methods, and another to invoke test methods with args, such as a method-specific `Path`. This latter one is slightly inconvenient to use, since it requires the boilerplate use of a function to create the arguments.
The first overload is updated in a backwards compatible way, to examine the parameters of methods annotated with `@Test`, and to recognize common patterns: namely no-args methods and `(Path)` methods, without the need for any additional function. The second overload is retained by backwards compatibility, until if and when we decide it is no longer required.
In addition, two new overloads are added, similar to the first two, but with the addition of an extra parameter to decide which methods should be invoked. This is primarily a debugging aid. Using these overloads, it is easy to specify, on the command line used to run the test, the methods to be executed.
A new test is added to test the new functionality.
-------------
Commit messages:
- JDK-8272853: improve `JavadocTester.runTests`
Changes: https://git.openjdk.java.net/jdk/pull/6983/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6983&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8272853
Stats: 370 lines in 2 files changed: 359 ins; 6 del; 5 mod
Patch: https://git.openjdk.java.net/jdk/pull/6983.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/6983/head:pull/6983
PR: https://git.openjdk.java.net/jdk/pull/6983
From jlahoda at openjdk.java.net Mon Jan 10 08:38:39 2022
From: jlahoda at openjdk.java.net (Jan Lahoda)
Date: Mon, 10 Jan 2022 08:38:39 GMT
Subject: [jdk18] Integrated: 8278373: JavacTrees.searchMethod finds incorrect
match
In-Reply-To:
References:
Message-ID:
On Tue, 4 Jan 2022 17:19:44 GMT, Jan Lahoda wrote:
> Currently, when javac encounters a javadoc reference, like `@see PrintStream#println(int)`, will first try to find a method `println` in `PrintStream` using subtyping on the argument types, which may find another overload of the method with an argument that is a subtype of `int` - like `println(double)`. Consequently, the link in the javadoc may be to a wrong method.
>
> In this patch, the proposal is to use the subtype search only as a backup option, using the existing check based on `isSameType` first, and only doing an inexact match using subtyping if the more exact match fails to find a method. This fallback should help possible existing broken references to still work as before, while the preferred use of the more exact match should select the correct method in usual correct cases.
>
> This patch fixes some instances of incorrect references in the JDK's javadoc, a diff of the generated javadocs for the JDK mainline is here:
> http://cr.openjdk.java.net/~jlahoda/8278373/JDK-8278373.diff
This pull request has now been integrated.
Changeset: 642ab34a
Author: Jan Lahoda
URL: https://git.openjdk.java.net/jdk18/commit/642ab34a60172f4b629f953e146b54b9c7269033
Stats: 89 lines in 2 files changed: 71 ins; 2 del; 16 mod
8278373: JavacTrees.searchMethod finds incorrect match
Reviewed-by: vromero, jjg
-------------
PR: https://git.openjdk.java.net/jdk18/pull/79
From hannesw at openjdk.java.net Mon Jan 10 11:46:06 2022
From: hannesw at openjdk.java.net (Hannes =?UTF-8?B?V2FsbG7DtmZlcg==?=)
Date: Mon, 10 Jan 2022 11:46:06 GMT
Subject: [jdk18] RFR: JDK-8273452: DocTrees.getDocCommentTree should be
specified as idempotent [v2]
In-Reply-To:
References:
Message-ID:
> Please review a doc-only change to add implementation notes to the `DocTrees.getDocCommentTree` methods, some of which return the same `DocCommentTree` instance on repeated invocation and some don't. I decided to use `@implNote` instead of `@implSpec` as usually I wouldn't expect object identity to be part of a Java API specification.
>
> I verified the described behavior using code analysis and enhancing existing tests. The latter are not included in the commit as this is a `noreg-doc` issue.
Hannes Walln?fer has updated the pull request incrementally with one additional commit since the last revision:
JDK-8273452: review feedback
-------------
Changes:
- all: https://git.openjdk.java.net/jdk18/pull/36/files
- new: https://git.openjdk.java.net/jdk18/pull/36/files/f69a1052..66cbd42b
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk18&pr=36&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk18&pr=36&range=00-01
Stats: 8 lines in 1 file changed: 4 ins; 0 del; 4 mod
Patch: https://git.openjdk.java.net/jdk18/pull/36.diff
Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/36/head:pull/36
PR: https://git.openjdk.java.net/jdk18/pull/36
From hannesw at openjdk.java.net Mon Jan 10 12:07:29 2022
From: hannesw at openjdk.java.net (Hannes =?UTF-8?B?V2FsbG7DtmZlcg==?=)
Date: Mon, 10 Jan 2022 12:07:29 GMT
Subject: [jdk18] Integrated: JDK-8273452: DocTrees.getDocCommentTree should be
specified as idempotent
In-Reply-To:
References:
Message-ID:
On Thu, 16 Dec 2021 11:05:01 GMT, Hannes Walln?fer wrote:
> Please review a doc-only change to add implementation notes to the `DocTrees.getDocCommentTree` methods, some of which return the same `DocCommentTree` instance on repeated invocation and some don't. I decided to use `@implNote` instead of `@implSpec` as usually I wouldn't expect object identity to be part of a Java API specification.
>
> I verified the described behavior using code analysis and enhancing existing tests. The latter are not included in the commit as this is a `noreg-doc` issue.
This pull request has now been integrated.
Changeset: 354c9047
Author: Hannes Walln?fer
URL: https://git.openjdk.java.net/jdk18/commit/354c9047987c0837d95440780993a0aa84551ea1
Stats: 16 lines in 1 file changed: 16 ins; 0 del; 0 mod
8273452: DocTrees.getDocCommentTree should be specified as idempotent
Reviewed-by: jjg
-------------
PR: https://git.openjdk.java.net/jdk18/pull/36
From prappo at openjdk.java.net Mon Jan 10 12:23:12 2022
From: prappo at openjdk.java.net (Pavel Rappo)
Date: Mon, 10 Jan 2022 12:23:12 GMT
Subject: RFR: 8273001: Improve the doclet.usage.tagletpath option
description [v3]
In-Reply-To:
References:
Message-ID: <70TGUOPn_qT2w1c7iuB-MTf5AZZw_kls0UTqDaE3ULg=.9a6cebc0-8084-44bc-83d0-1b94562f047d@github.com>
> Please review this PR to clarify javadoc help output. The net effect of this change can be seen when comparing the relevant excerpts from before and after output.
>
> Before:
>
> ...
> --snippet-path
> The path for external snippets
> -sourcetab
> Specify the number of spaces each tab takes up in the source
> -splitindex Split index into one file per letter
> -tag ::
> Specify single argument custom tags
> -taglet The fully qualified name of Taglet to register
> -tagletpath The path to Taglets
> ...
>
>
> After:
>
> ...
> --snippet-path
> The path to external snippets
> -sourcetab
> Specify the number of spaces each tab takes up in the source
> -splitindex Split index into one file per letter
> -tag ::
> Specify single argument custom tags
> -taglet The fully qualified name of taglet to register
> -tagletpath
> The path to custom taglets
> ...
>
>
> I'm not a grammarian, but:
>
> * "To" seems more appropriate than "for" in this context.
> * There's no reason to use title-cased "Taglet(s)". At least there's no more reason for this than there is for "Doclet(s)", which is consistently spelled as "doclet(s)" (except for where it starts a sentence).
Pavel Rappo has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
- Merge branch 'openjdk:master' into 8273001
- Rephrase taglet.description as per feedback
Also indents the value for doclet.usage.tagletpath.parameters.
- Initial commit
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/6745/files
- new: https://git.openjdk.java.net/jdk/pull/6745/files/8465fd3d..a031dee1
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6745&range=02
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6745&range=01-02
Stats: 40060 lines in 1122 files changed: 28957 ins; 6210 del; 4893 mod
Patch: https://git.openjdk.java.net/jdk/pull/6745.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/6745/head:pull/6745
PR: https://git.openjdk.java.net/jdk/pull/6745
From jwilhelm at openjdk.java.net Mon Jan 10 17:10:40 2022
From: jwilhelm at openjdk.java.net (Jesper Wilhelmsson)
Date: Mon, 10 Jan 2022 17:10:40 GMT
Subject: Integrated: Merge jdk18
Message-ID: <5hMMnbP2laUfEjb0svduDuzGgdUJckDDcCxaj-7QZg0=.1fd54c99-b81e-41e1-b3d7-bbdbedf161c9@github.com>
Forwardport JDK 18 -> JDK 19
-------------
Commit messages:
- Merge
- 8274679: Remove unnecessary conversion to String in security code in java.base
- 8142362: Lots of code duplication in Copy class
- 8218857: Confusing overloads for os::open
- 8183227: read/write APIs in class os shall return ssize_t
- 8279300: [arm32] SIGILL when running GetObjectSizeIntrinsicsTest
- 8278329: some TraceDeoptimization code not included in PRODUCT build
- 8279523: Parallel: Remove unnecessary PSScavenge::_to_space_top_before_gc
- 8279522: Serial: Remove unused Generation::clear_remembered_set
- 8279528: Unused TypeEnter.diag after JDK-8205187
- ... and 163 more: https://git.openjdk.java.net/jdk/compare/40df5df9...6ff1c607
The merge commit only contains trivial merges, so no merge-specific webrevs have been generated.
Changes: https://git.openjdk.java.net/jdk/pull/7017/files
Stats: 27994 lines in 750 files changed: 20678 ins; 5315 del; 2001 mod
Patch: https://git.openjdk.java.net/jdk/pull/7017.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7017/head:pull/7017
PR: https://git.openjdk.java.net/jdk/pull/7017
From jwilhelm at openjdk.java.net Mon Jan 10 17:10:41 2022
From: jwilhelm at openjdk.java.net (Jesper Wilhelmsson)
Date: Mon, 10 Jan 2022 17:10:41 GMT
Subject: Integrated: Merge jdk18
In-Reply-To: <5hMMnbP2laUfEjb0svduDuzGgdUJckDDcCxaj-7QZg0=.1fd54c99-b81e-41e1-b3d7-bbdbedf161c9@github.com>
References: <5hMMnbP2laUfEjb0svduDuzGgdUJckDDcCxaj-7QZg0=.1fd54c99-b81e-41e1-b3d7-bbdbedf161c9@github.com>
Message-ID:
On Mon, 10 Jan 2022 17:00:05 GMT, Jesper Wilhelmsson wrote:
> Forwardport JDK 18 -> JDK 19
This pull request has now been integrated.
Changeset: d9b1bb58
Author: Jesper Wilhelmsson
URL: https://git.openjdk.java.net/jdk/commit/d9b1bb58600c03cee43387864d1530d4dd5f1422
Stats: 615 lines in 24 files changed: 478 ins; 77 del; 60 mod
Merge
-------------
PR: https://git.openjdk.java.net/jdk/pull/7017
From prappo at openjdk.java.net Tue Jan 11 12:18:23 2022
From: prappo at openjdk.java.net (Pavel Rappo)
Date: Tue, 11 Jan 2022 12:18:23 GMT
Subject: [jdk18] RFR: 8206181: ExceptionInInitializerError: improve
handling of exceptions in user-provided taglets
In-Reply-To:
References:
Message-ID:
On Fri, 17 Dec 2021 18:08:13 GMT, Jonathan Gibbons wrote:
> Please file a followup bug
Done: https://bugs.openjdk.java.net/browse/JDK-8279843
-------------
PR: https://git.openjdk.java.net/jdk18/pull/44
From prappo at openjdk.java.net Tue Jan 11 14:32:40 2022
From: prappo at openjdk.java.net (Pavel Rappo)
Date: Tue, 11 Jan 2022 14:32:40 GMT
Subject: [jdk18] Integrated: 8206181: ExceptionInInitializerError: improve
handling of exceptions in user-provided taglets
In-Reply-To:
References:
Message-ID:
On Fri, 17 Dec 2021 17:51:17 GMT, Pavel Rappo wrote:
> Using a custom taglet may result in exceptions, not all of which are javadoc bugs. Some of these exceptions are taglet bugs.
>
> It was noticed that an exception in a static initializer of a custom taglet looks like a javadoc bug, which it is not. The fix was to trivially catch java.lang.ExceptionInInitializerError and translate it into an error like it is already done for some other exceptions.
>
> While working on this fix, I noticed that there were no tests that cover various exceptions that could arise while registering a taglet:
>
> * ClassNotFoundException
> * NoSuchMethodException
> * InstantiationException
> * InvocationTargetException
>
> I added a test to cover all of those as well as ExceptionInInitializerError and ClassCastException, which I proactively handled similarly to ExceptionInInitializerError.
>
> I note that a typical taglet-registration error message is quite poor and should be improved in the future. For example, it is unclear that the method that javadoc cannot find is the nullary (i.e. parameterless or no-arg) MyTaglet constructor:
>
> Error - Exception java.lang.NoSuchMethodException thrown while trying to register Taglet MyTaglet...
This pull request has now been integrated.
Changeset: 5aecb372
Author: Pavel Rappo
URL: https://git.openjdk.java.net/jdk18/commit/5aecb37211c2dec475c56dcc354b6bb4f7e3585e
Stats: 442 lines in 8 files changed: 430 ins; 11 del; 1 mod
8206181: ExceptionInInitializerError: improve handling of exceptions in user-provided taglets
Reviewed-by: jjg
-------------
PR: https://git.openjdk.java.net/jdk18/pull/44
From nlisker at gmail.com Sun Jan 2 23:48:53 2022
From: nlisker at gmail.com (Nir Lisker)
Date: Mon, 3 Jan 2022 01:48:53 +0200
Subject: Automatic method declaration for functional interfaces
Message-ID:
Hi,
Many @FunctionalInterface interfaces declare explicitly what their
functional method is, For example, the java.util.function interfaces. I was
wondering if the docs pointing out which is the functional method
automatically would be of any use.
If so, the question becomes what is the best way. Some ideas:
1. An auto-generated comment on the bottom of the interface doc like
Consumer does?
2. Putting it next to the @FunctionalInterface in the declaration on top
(though it might be confusing).
3. Some highlight to the method in the method summary table.
Happy new year,
Nir
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jonathan.gibbons at oracle.com Wed Jan 12 01:13:16 2022
From: jonathan.gibbons at oracle.com (Jonathan Gibbons)
Date: Tue, 11 Jan 2022 17:13:16 -0800
Subject: Automatic method declaration for functional interfaces
In-Reply-To:
References:
Message-ID: <730ec2b5-1619-5aee-44d1-6e7624b5eca5@oracle.com>
Although maybe not overtly obvious, the `Abstract Methods` tab in the
method summary table gives you what you are looking for, and is close to
your option #3.
-- Jon
On 1/2/22 3:48 PM, Nir Lisker wrote:
> Hi,
>
> Many @FunctionalInterface interfaces declare explicitly what their
> functional method is, For example, the java.util.function interfaces.
> I was wondering if the docs pointing out which is the functional
> method automatically would be of any use.
>
> If so, the question becomes what is the best way. Some ideas:
> 1. An auto-generated comment on the bottom of the interface doc like
> Consumer does?
> 2. Putting it next to the?@FunctionalInterface in the declaration on
> top (though it might be confusing).
> 3. Some highlight to the method in the method summary table.
>
> Happy new year,
> Nir
From hannesw at openjdk.java.net Wed Jan 12 15:14:44 2022
From: hannesw at openjdk.java.net (Hannes =?UTF-8?B?V2FsbG7DtmZlcg==?=)
Date: Wed, 12 Jan 2022 15:14:44 GMT
Subject: RFR: JDK-8234682: The order of @param in the generated docs should
match the method signature
Message-ID:
Please review a change in how documentation from `@param` tags is generated.
The old code generates parameter documentation for each `@param` in the order in which the tags occur in the comment, then adds documentation from inherited `@param` tags for undocumented parameters.
The new code always generates documentation in the order in which actual parameters are declared in the code, using local or inherited `@param` tags as appropriate. Any `@param` tags that do not have a matching parameter are added afterwards.
Note that `@param` is not just used for parameters of executable members but also type parameters and record components. The second commit of this PR fixes a `ClassCastException` for these uses that was caused by the first commit and adds a few tests for it.
-------------
Commit messages:
- JDK-8234682: Fix and add tests for generic type parameters and record components
- JDK-8234682: The order of @param in the generated docs should match the method signature
Changes: https://git.openjdk.java.net/jdk/pull/7046/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7046&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8234682
Stats: 173 lines in 4 files changed: 94 ins; 34 del; 45 mod
Patch: https://git.openjdk.java.net/jdk/pull/7046.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7046/head:pull/7046
PR: https://git.openjdk.java.net/jdk/pull/7046
From rriggs at openjdk.java.net Wed Jan 12 15:35:23 2022
From: rriggs at openjdk.java.net (Roger Riggs)
Date: Wed, 12 Jan 2022 15:35:23 GMT
Subject: RFR: JDK-8234682: The order of @param in the generated docs should
match the method signature
In-Reply-To:
References:
Message-ID: <6BoVNbg1Y7g4It9VM1-XOV3YlFSrAmi7JsSD75HEG8M=.97d34acd-d3f8-43c1-8ff3-d1b7dd88f764@github.com>
On Wed, 12 Jan 2022 08:40:08 GMT, Hannes Walln?fer wrote:
> Please review a change in how documentation from `@param` tags is generated.
>
> The old code generates parameter documentation for each `@param` in the order in which the tags occur in the comment, then adds documentation from inherited `@param` tags for undocumented parameters.
>
> The new code always generates documentation in the order in which actual parameters are declared in the code, using local or inherited `@param` tags as appropriate. Any `@param` tags that do not have a matching parameter are added afterwards.
>
> Note that `@param` is not just used for parameters of executable members but also type parameters and record components. The second commit of this PR fixes a `ClassCastException` for these uses that was caused by the first commit and adds a few tests for it.
It would be helpful if the order of the @param tags in the source was matched the declaration.
Can a warning be generated if the @param tags are out of order?
-------------
PR: https://git.openjdk.java.net/jdk/pull/7046
From hannesw at openjdk.java.net Wed Jan 12 17:09:30 2022
From: hannesw at openjdk.java.net (Hannes =?UTF-8?B?V2FsbG7DtmZlcg==?=)
Date: Wed, 12 Jan 2022 17:09:30 GMT
Subject: RFR: JDK-8234682: The order of @param in the generated docs should
match the method signature
In-Reply-To: <6BoVNbg1Y7g4It9VM1-XOV3YlFSrAmi7JsSD75HEG8M=.97d34acd-d3f8-43c1-8ff3-d1b7dd88f764@github.com>
References:
<6BoVNbg1Y7g4It9VM1-XOV3YlFSrAmi7JsSD75HEG8M=.97d34acd-d3f8-43c1-8ff3-d1b7dd88f764@github.com>
Message-ID:
On Wed, 12 Jan 2022 15:32:40 GMT, Roger Riggs wrote:
> It would be helpful if the order of the @param tags in the source was matched the declaration. Can a warning be generated if the @param tags are out of order?
I think it is worth considering. Does it have to be a warning or would an informational notice also do? For something to be reported as warning it should have a certain gravity, I'm not sure `@param` order qualifies for it.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7046
From jjg at openjdk.java.net Wed Jan 12 17:09:30 2022
From: jjg at openjdk.java.net (Jonathan Gibbons)
Date: Wed, 12 Jan 2022 17:09:30 GMT
Subject: RFR: JDK-8234682: The order of @param in the generated docs should
match the method signature
In-Reply-To:
References:
<6BoVNbg1Y7g4It9VM1-XOV3YlFSrAmi7JsSD75HEG8M=.97d34acd-d3f8-43c1-8ff3-d1b7dd88f764@github.com>
Message-ID:
On Wed, 12 Jan 2022 17:03:32 GMT, Hannes Walln?fer wrote:
> It would be helpful if the order of the @param tags in the source was matched the declaration.
> Can a warning be generated if the @param tags are out of order?
That seems like a good suggestion, for a different PR. The obvious place to implement such a warning would be in DocLint.
> > It would be helpful if the order of the @param tags in the source was matched the declaration. Can a warning be generated if the @param tags are out of order?
>
> I think it is worth considering. Does it have to be a warning or would an informational notice also do? For something to be reported as warning it should have a certain gravity, I'm not sure `@param` order qualifies for it.
That's why it should be an opt-in lint-style warning. It's every bit as useful as other lint warnings, like javac's "extra semi-colon" and other minor grumbles.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7046
From hannesw at openjdk.java.net Wed Jan 12 17:16:27 2022
From: hannesw at openjdk.java.net (Hannes =?UTF-8?B?V2FsbG7DtmZlcg==?=)
Date: Wed, 12 Jan 2022 17:16:27 GMT
Subject: RFR: JDK-8234682: The order of @param in the generated docs should
match the method signature
In-Reply-To:
References:
<6BoVNbg1Y7g4It9VM1-XOV3YlFSrAmi7JsSD75HEG8M=.97d34acd-d3f8-43c1-8ff3-d1b7dd88f764@github.com>
Message-ID: <722giW0FmRwVKDc5cDRp-uOw-ws_PHPAc4U2H5QSmTk=.4fabbbfc-ac88-4820-be59-172128e5b6ad@github.com>
On Wed, 12 Jan 2022 17:04:04 GMT, Jonathan Gibbons wrote:
> > It would be helpful if the order of the @param tags in the source was matched the declaration.
> > Can a warning be generated if the @param tags are out of order?
>
> That seems like a good suggestion, for a different PR. The obvious place to implement such a warning would be in DocLint.
I filed an issue: https://bugs.openjdk.java.net/browse/JDK-8279931
-------------
PR: https://git.openjdk.java.net/jdk/pull/7046
From jwilhelm at openjdk.java.net Wed Jan 12 23:39:04 2022
From: jwilhelm at openjdk.java.net (Jesper Wilhelmsson)
Date: Wed, 12 Jan 2022 23:39:04 GMT
Subject: RFR: Merge jdk18
Message-ID:
Forwardport JDK 18 -> JDK 19
-------------
Commit messages:
- Merge remote-tracking branch 'jdk18/master' into Merge_jdk18
- 8206181: ExceptionInInitializerError: improve handling of exceptions in user-provided taglets
- 8279695: [TESTBUG] modify compiler/loopopts/TestSkeletonPredicateNegation.java to run on C1 also
- 8279356: Method linking fails with guarantee(mh->adapter() != NULL) failed: Adapter blob must already exist!
- 8278489: Preserve result in native wrapper with +UseHeavyMonitors
- 8278267: ARM32: several vector test failures for ASHR
The webrevs contain the adjustments done while merging with regards to each parent branch:
- master: https://webrevs.openjdk.java.net/?repo=jdk&pr=7057&range=00.0
- jdk18: https://webrevs.openjdk.java.net/?repo=jdk&pr=7057&range=00.1
Changes: https://git.openjdk.java.net/jdk/pull/7057/files
Stats: 907 lines in 16 files changed: 811 ins; 21 del; 75 mod
Patch: https://git.openjdk.java.net/jdk/pull/7057.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7057/head:pull/7057
PR: https://git.openjdk.java.net/jdk/pull/7057
From jwilhelm at openjdk.java.net Thu Jan 13 01:10:29 2022
From: jwilhelm at openjdk.java.net (Jesper Wilhelmsson)
Date: Thu, 13 Jan 2022 01:10:29 GMT
Subject: Integrated: Merge jdk18
In-Reply-To:
References:
Message-ID: <38zJOHU9dDOsz0As8TzSdMeOgHo2owiO-kk59_McW-s=.af44c757-3e59-4b39-bb76-81f82f63eb97@github.com>
On Wed, 12 Jan 2022 23:32:00 GMT, Jesper Wilhelmsson wrote:
> Forwardport JDK 18 -> JDK 19
This pull request has now been integrated.
Changeset: 67e3d51d
Author: Jesper Wilhelmsson
URL: https://git.openjdk.java.net/jdk/commit/67e3d51d68e7319bd6d5b01233b664e6ee6b17ec
Stats: 907 lines in 16 files changed: 811 ins; 21 del; 75 mod
Merge
-------------
PR: https://git.openjdk.java.net/jdk/pull/7057
From prappo at openjdk.java.net Thu Jan 13 10:35:39 2022
From: prappo at openjdk.java.net (Pavel Rappo)
Date: Thu, 13 Jan 2022 10:35:39 GMT
Subject: RFR: 8279918: Fix various doc typos
Message-ID: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
- Most of the typos are of a trivial kind: missing whitespace.
- If any of the typos should be fixed in the upstream projects instead, please say so; I will drop those typos from the patch.
- As I understand it, in ImageInputStream and DataInput is an irrelevant formatting artefact and thus can be removed.
- ' is an apostrophe, which does not require to be encoded.
-------------
Commit messages:
- Initial commit
Changes: https://git.openjdk.java.net/jdk/pull/7063/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7063&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8279918
Stats: 85 lines in 34 files changed: 0 ins; 0 del; 85 mod
Patch: https://git.openjdk.java.net/jdk/pull/7063.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7063/head:pull/7063
PR: https://git.openjdk.java.net/jdk/pull/7063
From kevinw at openjdk.java.net Thu Jan 13 10:49:28 2022
From: kevinw at openjdk.java.net (Kevin Walls)
Date: Thu, 13 Jan 2022 10:49:28 GMT
Subject: RFR: 8279918: Fix various doc typos
In-Reply-To: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
Message-ID:
On Thu, 13 Jan 2022 10:30:07 GMT, Pavel Rappo wrote:
> - Most of the typos are of a trivial kind: missing whitespace.
> - If any of the typos should be fixed in the upstream projects instead, please say so; I will drop those typos from the patch.
> - As I understand it, in ImageInputStream and DataInput is an irrelevant formatting artefact and thus can be removed.
> - ' is an apostrophe, which does not require to be encoded.
src/java.base/share/classes/sun/text/RuleBasedBreakIterator.java line 73:
> 71: * will be transparent to the BreakIterator. A sequence of characters will break the
> 72: * same way it would if any ignore characters it contains are taken out. Break
> 73: * positions never occur before ignore characters.
"before ignored characters"
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From prappo at openjdk.java.net Thu Jan 13 11:04:28 2022
From: prappo at openjdk.java.net (Pavel Rappo)
Date: Thu, 13 Jan 2022 11:04:28 GMT
Subject: RFR: 8279918: Fix various doc typos
In-Reply-To:
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
Message-ID: <4f89A8T4GDZajnNMg-tT5qWaN5OCrH04Vwh9HZ6uTvg=.f2af94ec-43b4-4521-8158-aef4137b400b@github.com>
On Thu, 13 Jan 2022 10:46:11 GMT, Kevin Walls wrote:
>> - Most of the typos are of a trivial kind: missing whitespace.
>> - If any of the typos should be fixed in the upstream projects instead, please say so; I will drop those typos from the patch.
>> - As I understand it, in ImageInputStream and DataInput is an irrelevant formatting artefact and thus can be removed.
>> - ' is an apostrophe, which does not require to be encoded.
>
> src/java.base/share/classes/sun/text/RuleBasedBreakIterator.java line 73:
>
>> 71: * will be transparent to the BreakIterator. A sequence of characters will break the
>> 72: * same way it would if any ignore characters it contains are taken out. Break
>> 73: * positions never occur before ignore characters.
>
> "before ignored characters"
I believe it's the name of a concept, so I will leave it as is:
> There is one special substitution. If the description defines a substitution called "", the expression must be a [] expression, and the expression defines a set of characters (the "ignore characters") that will be transparent to the BreakIterator.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From kevinw at openjdk.java.net Thu Jan 13 11:04:28 2022
From: kevinw at openjdk.java.net (Kevin Walls)
Date: Thu, 13 Jan 2022 11:04:28 GMT
Subject: RFR: 8279918: Fix various doc typos
In-Reply-To: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
Message-ID: <2bsQg-3igmY6_fAT_OD9jIuJ7ziQBgvB7oF1CiZN_Zo=.51e0dd63-d489-4996-8fb9-b2e8c385cbb8@github.com>
On Thu, 13 Jan 2022 10:30:07 GMT, Pavel Rappo wrote:
> - Most of the typos are of a trivial kind: missing whitespace.
> - If any of the typos should be fixed in the upstream projects instead, please say so; I will drop those typos from the patch.
> - As I understand it, in ImageInputStream and DataInput is an irrelevant formatting artefact and thus can be removed.
> - ' is an apostrophe, which does not require to be encoded.
src/java.sql/share/classes/java/sql/BatchUpdateException.java line 58:
> 56: * A JDBC driver implementation should use
> 57: * the constructor {@code BatchUpdateException(String reason, String SQLState,
> 58: * int vendorCode, long []updateCounts, Throwable cause) } instead of
While we are here, is it more normal to say "long[] updateCounts", not separating the [] from the type.
Similarly at line 81, 118, 151, 247, 277, 318, 354.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From prappo at openjdk.java.net Thu Jan 13 11:07:28 2022
From: prappo at openjdk.java.net (Pavel Rappo)
Date: Thu, 13 Jan 2022 11:07:28 GMT
Subject: RFR: 8279918: Fix various doc typos
In-Reply-To: <2bsQg-3igmY6_fAT_OD9jIuJ7ziQBgvB7oF1CiZN_Zo=.51e0dd63-d489-4996-8fb9-b2e8c385cbb8@github.com>
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
<2bsQg-3igmY6_fAT_OD9jIuJ7ziQBgvB7oF1CiZN_Zo=.51e0dd63-d489-4996-8fb9-b2e8c385cbb8@github.com>
Message-ID:
On Thu, 13 Jan 2022 11:00:55 GMT, Kevin Walls wrote:
>> - Most of the typos are of a trivial kind: missing whitespace.
>> - If any of the typos should be fixed in the upstream projects instead, please say so; I will drop those typos from the patch.
>> - As I understand it, in ImageInputStream and DataInput is an irrelevant formatting artefact and thus can be removed.
>> - ' is an apostrophe, which does not require to be encoded.
>
> src/java.sql/share/classes/java/sql/BatchUpdateException.java line 58:
>
>> 56: * A JDBC driver implementation should use
>> 57: * the constructor {@code BatchUpdateException(String reason, String SQLState,
>> 58: * int vendorCode, long []updateCounts, Throwable cause) } instead of
>
> While we are here, is it more normal to say "long[] updateCounts", not separating the [] from the type.
> Similarly at line 81, 118, 151, 247, 277, 318, 354.
I thought about it too, but then noticed how the position of `[]` mimics that of the respective method signatures in code.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From kevinw at openjdk.java.net Thu Jan 13 11:21:27 2022
From: kevinw at openjdk.java.net (Kevin Walls)
Date: Thu, 13 Jan 2022 11:21:27 GMT
Subject: RFR: 8279918: Fix various doc typos
In-Reply-To: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
Message-ID:
On Thu, 13 Jan 2022 10:30:07 GMT, Pavel Rappo wrote:
> - Most of the typos are of a trivial kind: missing whitespace.
> - If any of the typos should be fixed in the upstream projects instead, please say so; I will drop those typos from the patch.
> - As I understand it, ` ` in ImageInputStream and DataInput is an irrelevant formatting artefact and thus can be removed.
> - `'` is an apostrophe, which does not require to be encoded.
src/java.sql/share/classes/java/sql/Statement.java line 784:
> 782: * statement returns a {@code ResultSet} object, the second argument
> 783: * supplied to this method is not an
> 784: * {@code int} array whose elements are valid column indexes, the method is called on a
Should it be "or the method is called on...", i.e. add the "or", otherwise it's a list of problems but we don't know if they are all required, or are alternatives. It probably does not mean that all these have to be true to throw the exception, but it doesn't say that. We are nitpicking of course.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From kevinw at openjdk.java.net Thu Jan 13 11:33:27 2022
From: kevinw at openjdk.java.net (Kevin Walls)
Date: Thu, 13 Jan 2022 11:33:27 GMT
Subject: RFR: 8279918: Fix various doc typos
In-Reply-To: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
Message-ID:
On Thu, 13 Jan 2022 10:30:07 GMT, Pavel Rappo wrote:
> - Most of the typos are of a trivial kind: missing whitespace.
> - If any of the typos should be fixed in the upstream projects instead, please say so; I will drop those typos from the patch.
> - As I understand it, ` ` in ImageInputStream and DataInput is an irrelevant formatting artefact and thus can be removed.
> - `'` is an apostrophe, which does not require to be encoded.
Marked as reviewed by kevinw (Committer).
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From kevinw at openjdk.java.net Thu Jan 13 11:33:27 2022
From: kevinw at openjdk.java.net (Kevin Walls)
Date: Thu, 13 Jan 2022 11:33:27 GMT
Subject: RFR: 8279918: Fix various doc typos
In-Reply-To:
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
<2bsQg-3igmY6_fAT_OD9jIuJ7ziQBgvB7oF1CiZN_Zo=.51e0dd63-d489-4996-8fb9-b2e8c385cbb8@github.com>
Message-ID:
On Thu, 13 Jan 2022 11:04:43 GMT, Pavel Rappo wrote:
>> src/java.sql/share/classes/java/sql/BatchUpdateException.java line 58:
>>
>>> 56: * A JDBC driver implementation should use
>>> 57: * the constructor {@code BatchUpdateException(String reason, String SQLState,
>>> 58: * int vendorCode, long []updateCounts, Throwable cause) } instead of
>>
>> While we are here, is it more normal to say "long[] updateCounts", not separating the [] from the type.
>> Similarly at line 81, 118, 151, 247, 277, 318, 354.
>
> I thought about it too, but then noticed how the position of `[]` mimics that of the respective method signatures in code.
OK, so lines 264, 295, 329, 364, 431 are arguably wrong as well? Separating the [] completely looks quite rare.
I'll leave it up to you. 8-)
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From prappo at openjdk.java.net Thu Jan 13 11:33:28 2022
From: prappo at openjdk.java.net (Pavel Rappo)
Date: Thu, 13 Jan 2022 11:33:28 GMT
Subject: RFR: 8279918: Fix various doc typos
In-Reply-To:
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
Message-ID: <90v_XM2RzHUik7EfePw8m-79pscrcKUAb10T6FMJHYA=.3577ceee-012b-45f7-af57-64f0a8172dfa@github.com>
On Thu, 13 Jan 2022 11:18:42 GMT, Kevin Walls wrote:
>> - Most of the typos are of a trivial kind: missing whitespace.
>> - If any of the typos should be fixed in the upstream projects instead, please say so; I will drop those typos from the patch.
>> - As I understand it, ` ` in ImageInputStream and DataInput is an irrelevant formatting artefact and thus can be removed.
>> - `'` is an apostrophe, which does not require to be encoded.
>
> src/java.sql/share/classes/java/sql/Statement.java line 784:
>
>> 782: * statement returns a {@code ResultSet} object, the second argument
>> 783: * supplied to this method is not an
>> 784: * {@code int} array whose elements are valid column indexes, the method is called on a
>
> Should it be "or the method is called on...", i.e. add the "or", otherwise it's a list of problems but we don't know if they are all required, or are alternatives. It probably does not mean that all these have to be true to throw the exception, but it doesn't say that. We are nitpicking of course.
You are right in that this `@throws` description reads a bit weird in its current form. That said, I wouldn't touch it in this PR for two reasons. Firstly, this wording seems to be consistent with other locations in that file. Secondly, this is a spec territory.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From lancea at openjdk.java.net Thu Jan 13 11:46:27 2022
From: lancea at openjdk.java.net (Lance Andersen)
Date: Thu, 13 Jan 2022 11:46:27 GMT
Subject: RFR: 8279918: Fix various doc typos
In-Reply-To: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
Message-ID:
On Thu, 13 Jan 2022 10:30:07 GMT, Pavel Rappo wrote:
> - Most of the typos are of a trivial kind: missing whitespace.
> - If any of the typos should be fixed in the upstream projects instead, please say so; I will drop those typos from the patch.
> - As I understand it, ` ` in ImageInputStream and DataInput is an irrelevant formatting artefact and thus can be removed.
> - `'` is an apostrophe, which does not require to be encoded.
Overall this looks good, thanks for the clean up :-)
A few comments below
src/java.base/share/classes/java/io/DataInput.java line 496:
> 494: * ceases. If the character {@code '\r'}
> 495: * is encountered, it is discarded and, if
> 496: * the following byte converts to the
The above is a bit confusing as it reads(same in ImageInputStream.java). I think that that can be looked at later.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From lancea at openjdk.java.net Thu Jan 13 11:46:27 2022
From: lancea at openjdk.java.net (Lance Andersen)
Date: Thu, 13 Jan 2022 11:46:27 GMT
Subject: RFR: 8279918: Fix various doc typos
In-Reply-To:
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
<2bsQg-3igmY6_fAT_OD9jIuJ7ziQBgvB7oF1CiZN_Zo=.51e0dd63-d489-4996-8fb9-b2e8c385cbb8@github.com>
Message-ID:
On Thu, 13 Jan 2022 11:28:34 GMT, Kevin Walls wrote:
>> I thought about it too, but then noticed how the position of `[]` mimics that of the respective method signatures in code.
>
> OK, so lines 264, 295, 329, 364, 431 are arguably wrong as well? Separating the [] completely looks quite rare.
> I'll leave it up to you. 8-)
I think that can be a follow on clean up.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From lancea at openjdk.java.net Thu Jan 13 11:46:28 2022
From: lancea at openjdk.java.net (Lance Andersen)
Date: Thu, 13 Jan 2022 11:46:28 GMT
Subject: RFR: 8279918: Fix various doc typos
In-Reply-To: <90v_XM2RzHUik7EfePw8m-79pscrcKUAb10T6FMJHYA=.3577ceee-012b-45f7-af57-64f0a8172dfa@github.com>
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
<90v_XM2RzHUik7EfePw8m-79pscrcKUAb10T6FMJHYA=.3577ceee-012b-45f7-af57-64f0a8172dfa@github.com>
Message-ID:
On Thu, 13 Jan 2022 11:29:35 GMT, Pavel Rappo wrote:
>> src/java.sql/share/classes/java/sql/Statement.java line 784:
>>
>>> 782: * statement returns a {@code ResultSet} object, the second argument
>>> 783: * supplied to this method is not an
>>> 784: * {@code int} array whose elements are valid column indexes, the method is called on a
>>
>> Should it be "or the method is called on...", i.e. add the "or", otherwise it's a list of problems but we don't know if they are all required, or are alternatives. It probably does not mean that all these have to be true to throw the exception, but it doesn't say that. We are nitpicking of course.
>
> You are right in that this `@throws` description reads a bit weird in its current form. That said, I wouldn't touch it in this PR for two reasons. Firstly, this wording seems to be consistent with other locations in that file. Secondly, this is a spec territory.
Yes an "or" is probably worthwhile to add.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From prappo at openjdk.java.net Thu Jan 13 12:40:45 2022
From: prappo at openjdk.java.net (Pavel Rappo)
Date: Thu, 13 Jan 2022 12:40:45 GMT
Subject: RFR: 8279918: Fix various doc typos
In-Reply-To:
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
Message-ID:
On Thu, 13 Jan 2022 11:42:48 GMT, Lance Andersen wrote:
> The above is a bit confusing as it reads(same in ImageInputStream.java). I think that that can be looked at later.
Just to clarify: you are okay with removing the ` ` entity, right? As for ImageInputStream, some doc comments should probably use `@inheritDoc`. But this is a much bigger clean-up.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From mullan at openjdk.java.net Thu Jan 13 13:45:30 2022
From: mullan at openjdk.java.net (Sean Mullan)
Date: Thu, 13 Jan 2022 13:45:30 GMT
Subject: RFR: 8279918: Fix various doc typos
In-Reply-To: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
Message-ID:
On Thu, 13 Jan 2022 10:30:07 GMT, Pavel Rappo wrote:
> - Most of the typos are of a trivial kind: missing whitespace.
> - If any of the typos should be fixed in the upstream projects instead, please say so; I will drop those typos from the patch.
> - As I understand it, ` ` in ImageInputStream and DataInput is an irrelevant formatting artefact and thus can be removed.
> - `'` is an apostrophe, which does not require to be encoded.
The change in the one security class (KeyStoreLoginModule) looks fine.
-------------
Marked as reviewed by mullan (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7063
From prappo at openjdk.java.net Thu Jan 13 13:51:34 2022
From: prappo at openjdk.java.net (Pavel Rappo)
Date: Thu, 13 Jan 2022 13:51:34 GMT
Subject: RFR: 8279918: Fix various doc typos
In-Reply-To:
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
<90v_XM2RzHUik7EfePw8m-79pscrcKUAb10T6FMJHYA=.3577ceee-012b-45f7-af57-64f0a8172dfa@github.com>
Message-ID: <9HH1T6jnf2bbBhD0h9sZZGoBWqEAoYen5Ymr52wVyDA=.7afbde78-363f-4e51-b0ad-a7e0cf2c0d6d@github.com>
On Thu, 13 Jan 2022 11:38:13 GMT, Lance Andersen wrote:
> Yes an "or" is probably worthwhile to add.
I would prefer to leave it for the follow-up cleanup if only because adding "or" here would make it inconsistent with other `@throws SQLException` descriptions in that file and perhaps elsewhere in java.sql:
* java/sql/Statement.java:59
* java/sql/Statement.java:85
* java/sql/Statement.java:346
* java/sql/Statement.java:524
* java/sql/Statement.java:745
* java/sql/Statement.java:814
* java/sql/Statement.java:860
* java/sql/Statement.java:913
* java/sql/Statement.java:962
* java/sql/Statement.java:1225
* java/sql/Statement.java:1269
* java/sql/Statement.java:1314
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From prappo at openjdk.java.net Thu Jan 13 14:01:04 2022
From: prappo at openjdk.java.net (Pavel Rappo)
Date: Thu, 13 Jan 2022 14:01:04 GMT
Subject: RFR: 8279918: Fix various doc typos [v2]
In-Reply-To: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
Message-ID:
> - Most of the typos are of a trivial kind: missing whitespace.
> - If any of the typos should be fixed in the upstream projects instead, please say so; I will drop those typos from the patch.
> - As I understand it, ` ` in ImageInputStream and DataInput is an irrelevant formatting artefact and thus can be removed.
> - `'` is an apostrophe, which does not require to be encoded.
Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision:
Additional typos
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7063/files
- new: https://git.openjdk.java.net/jdk/pull/7063/files/fe81eeca..b256a13f
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7063&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7063&range=00-01
Stats: 3 lines in 2 files changed: 0 ins; 0 del; 3 mod
Patch: https://git.openjdk.java.net/jdk/pull/7063.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7063/head:pull/7063
PR: https://git.openjdk.java.net/jdk/pull/7063
From prappo at openjdk.java.net Thu Jan 13 15:34:22 2022
From: prappo at openjdk.java.net (Pavel Rappo)
Date: Thu, 13 Jan 2022 15:34:22 GMT
Subject: RFR: JDK-8234682: The order of @param in the generated docs should
match the method signature
In-Reply-To:
References:
Message-ID:
On Wed, 12 Jan 2022 08:40:08 GMT, Hannes Walln?fer wrote:
> Please review a change in how documentation from `@param` tags is generated.
>
> The old code generates parameter documentation for each `@param` in the order in which the tags occur in the comment, then adds documentation from inherited `@param` tags for undocumented parameters.
>
> The new code always generates documentation in the order in which actual parameters are declared in the code, using local or inherited `@param` tags as appropriate. Any `@param` tags that do not have a matching parameter are added afterwards.
>
> Note that `@param` is not just used for parameters of executable members but also type parameters and record components. The second commit of this PR fixes a `ClassCastException` for these uses that was caused by the first commit and adds a few tests for it.
Out of curiosity, how much of a churn does this PR introduce into the generated JDK API documentation? In any case, we should check it, to make sure that nothing surprising comes up.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7046
From hannesw at openjdk.java.net Thu Jan 13 15:52:32 2022
From: hannesw at openjdk.java.net (Hannes =?UTF-8?B?V2FsbG7DtmZlcg==?=)
Date: Thu, 13 Jan 2022 15:52:32 GMT
Subject: RFR: 8268978: Document the javadoc software stack
In-Reply-To:
References:
Message-ID:
On Wed, 22 Dec 2021 00:48:08 GMT, Jonathan Gibbons wrote:
> Please review a `noreg-doc` update to document the javadoc software stack, in the top-level `jdk.javadoc.internal` package.
>
> The intent is to provide a broad overview. We can add more specific details, but in general, additional details would probably be better in the `package-info` files for the constituent packages.
A general question about this: Where and how will this documentation mostly be consumed? The `jdk.javadoc.internal` package is not included in standard JDK documentation, so is it likely that this documentation will be mainly consumed within an editor/IDE?
My feeling is that maybe a less markup-heavy and more text centric form would be easier to consume in that context. For instance, using appropriate HTML headings and paragraphs instead of the deeply nested `` structure might provide more of a continuous text experience, while still maintaining the hierarchical information. Of course this is a matter of taste, different people have different preferences.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6914
From hannesw at openjdk.java.net Thu Jan 13 16:26:27 2022
From: hannesw at openjdk.java.net (Hannes =?UTF-8?B?V2FsbG7DtmZlcg==?=)
Date: Thu, 13 Jan 2022 16:26:27 GMT
Subject: RFR: JDK-8272853: improve `JavadocTester.runTests`
In-Reply-To:
References:
Message-ID: <_-MSJFWLxBd7Y2zf73tGnWPSR42UrizWAK57FMfVD8I=.82449482-63c2-4fa6-a217-4533397bb928@github.com>
On Thu, 6 Jan 2022 20:31:42 GMT, Jonathan Gibbons wrote:
> Please review a medium simple test-only fix to improve the `JavadocTester` `runTests` methods.
>
> Currently, there are two overloads: one to invoke no-args test methods, and another to invoke test methods with args, such as a method-specific `Path`. This latter one is slightly inconvenient to use, since it requires the boilerplate use of a function to create the arguments.
>
> The first overload is updated in a backwards compatible way, to examine the parameters of methods annotated with `@Test`, and to recognize common patterns: namely no-args methods and `(Path)` methods, without the need for any additional function. The second overload is retained by backwards compatibility, until if and when we decide it is no longer required.
>
> In addition, two new overloads are added, similar to the first two, but with the addition of an extra parameter to decide which methods should be invoked. This is primarily a debugging aid. Using these overloads, it is easy to specify, on the command line used to run the test, the methods to be executed.
>
> A new test is added to test the new functionality.
Making the boilerplate to call test methods with a path object obsolete is a very welcome enhancement. Can and should we update existing tests that use the explicit method -> path function to the new form?
You say that the new forms that take a list of method names could be used by passing the method names as command line arguments. That functionality is not included in this PR as far as I can see. Is that planned for a later time?
-------------
PR: https://git.openjdk.java.net/jdk/pull/6983
From sspitsyn at openjdk.java.net Thu Jan 13 16:53:27 2022
From: sspitsyn at openjdk.java.net (Serguei Spitsyn)
Date: Thu, 13 Jan 2022 16:53:27 GMT
Subject: RFR: 8279918: Fix various doc typos [v2]
In-Reply-To:
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
Message-ID:
On Thu, 13 Jan 2022 14:01:04 GMT, Pavel Rappo wrote:
>> - Most of the typos are of a trivial kind: missing whitespace.
>> - If any of the typos should be fixed in the upstream projects instead, please say so; I will drop those typos from the patch.
>> - As I understand it, ` ` in ImageInputStream and DataInput is an irrelevant formatting artefact and thus can be removed.
>> - `'` is an apostrophe, which does not require to be encoded.
>
> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision:
>
> Additional typos
Hi Pavel,
Looks good.
Thanks,
Serguei
-------------
Marked as reviewed by sspitsyn (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7063
From lancea at openjdk.java.net Thu Jan 13 17:18:23 2022
From: lancea at openjdk.java.net (Lance Andersen)
Date: Thu, 13 Jan 2022 17:18:23 GMT
Subject: RFR: 8279918: Fix various doc typos [v2]
In-Reply-To:
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
Message-ID:
On Thu, 13 Jan 2022 12:37:46 GMT, Pavel Rappo wrote:
> > The above is a bit confusing as it reads(same in ImageInputStream.java). I think that that can be looked at later.
>
> Just to clarify: you are okay with removing the ` ` entity, right? As for ImageInputStream, some doc comments should probably use `@inheritDoc`. But this is a much bigger clean-up.
Yes I am. It just does not flow as well as it could IMHO
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From naoto at openjdk.java.net Thu Jan 13 17:25:30 2022
From: naoto at openjdk.java.net (Naoto Sato)
Date: Thu, 13 Jan 2022 17:25:30 GMT
Subject: RFR: 8279918: Fix various doc typos [v2]
In-Reply-To:
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
Message-ID:
On Thu, 13 Jan 2022 14:01:04 GMT, Pavel Rappo wrote:
>> - Most of the typos are of a trivial kind: missing whitespace.
>> - If any of the typos should be fixed in the upstream projects instead, please say so; I will drop those typos from the patch.
>> - As I understand it, ` ` in ImageInputStream and DataInput is an irrelevant formatting artefact and thus can be removed.
>> - `'` is an apostrophe, which does not require to be encoded.
>
> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision:
>
> Additional typos
Marked as reviewed by naoto (Reviewer).
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From naoto at openjdk.java.net Thu Jan 13 17:25:31 2022
From: naoto at openjdk.java.net (Naoto Sato)
Date: Thu, 13 Jan 2022 17:25:31 GMT
Subject: RFR: 8279918: Fix various doc typos [v2]
In-Reply-To: <4f89A8T4GDZajnNMg-tT5qWaN5OCrH04Vwh9HZ6uTvg=.f2af94ec-43b4-4521-8158-aef4137b400b@github.com>
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
<4f89A8T4GDZajnNMg-tT5qWaN5OCrH04Vwh9HZ6uTvg=.f2af94ec-43b4-4521-8158-aef4137b400b@github.com>
Message-ID: <4-d5YVHaRmPcyMlFYm2fxtIaRq6Z5PVooC8yd0OIbag=.cbd015b1-b2bd-43ba-b12f-8727087364b5@github.com>
On Thu, 13 Jan 2022 10:59:13 GMT, Pavel Rappo wrote:
>> src/java.base/share/classes/sun/text/RuleBasedBreakIterator.java line 73:
>>
>>> 71: * will be transparent to the BreakIterator. A sequence of characters will break the
>>> 72: * same way it would if any ignore characters it contains are taken out. Break
>>> 73: * positions never occur before ignore characters.
>>
>> "before ignored characters"
>
> I believe it's the name of a concept, so I will leave it as is:
>
>> There is one special substitution. If the description defines a substitution called "", the expression must be a [] expression, and the expression defines a set of characters (the "ignore characters") that will be transparent to the BreakIterator.
Yes, that is correct.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From lancea at openjdk.java.net Thu Jan 13 17:25:31 2022
From: lancea at openjdk.java.net (Lance Andersen)
Date: Thu, 13 Jan 2022 17:25:31 GMT
Subject: RFR: 8279918: Fix various doc typos [v2]
In-Reply-To: <9HH1T6jnf2bbBhD0h9sZZGoBWqEAoYen5Ymr52wVyDA=.7afbde78-363f-4e51-b0ad-a7e0cf2c0d6d@github.com>
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
<90v_XM2RzHUik7EfePw8m-79pscrcKUAb10T6FMJHYA=.3577ceee-012b-45f7-af57-64f0a8172dfa@github.com>
<9HH1T6jnf2bbBhD0h9sZZGoBWqEAoYen5Ymr52wVyDA=.7afbde78-363f-4e51-b0ad-a7e0cf2c0d6d@github.com>
Message-ID: <-4rLp_8_PwigKKpD1gGONCS8QMfDkNNNP4uZU1k9u9M=.9119e3bf-b879-42eb-a3a7-af6442a0551e@github.com>
On Thu, 13 Jan 2022 13:48:02 GMT, Pavel Rappo wrote:
> > Yes an "or" is probably worthwhile to add.
>
> I would prefer to leave it for the follow-up cleanup if only because adding "or" here would make it inconsistent with other `@throws SQLException` descriptions in that file and perhaps elsewhere in java.sql:
>
> * java/sql/Statement.java:59
> * java/sql/Statement.java:85
> * java/sql/Statement.java:346
> * java/sql/Statement.java:524
> * java/sql/Statement.java:745
> * java/sql/Statement.java:814
> * java/sql/Statement.java:860
> * java/sql/Statement.java:913
> * java/sql/Statement.java:962
> * java/sql/Statement.java:1225
> * java/sql/Statement.java:1269
> * java/sql/Statement.java:1314
I am fine with that. I guess a semi-colon could also be used vs. a comma to divide the Exception scenarios listed
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From lancea at openjdk.java.net Thu Jan 13 17:35:25 2022
From: lancea at openjdk.java.net (Lance Andersen)
Date: Thu, 13 Jan 2022 17:35:25 GMT
Subject: RFR: 8279918: Fix various doc typos [v2]
In-Reply-To:
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
Message-ID:
On Thu, 13 Jan 2022 14:01:04 GMT, Pavel Rappo wrote:
>> - Most of the typos are of a trivial kind: missing whitespace.
>> - If any of the typos should be fixed in the upstream projects instead, please say so; I will drop those typos from the patch.
>> - As I understand it, ` ` in ImageInputStream and DataInput is an irrelevant formatting artefact and thus can be removed.
>> - `'` is an apostrophe, which does not require to be encoded.
>
> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision:
>
> Additional typos
Marked as reviewed by lancea (Reviewer).
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From jjg at openjdk.java.net Thu Jan 13 23:01:28 2022
From: jjg at openjdk.java.net (Jonathan Gibbons)
Date: Thu, 13 Jan 2022 23:01:28 GMT
Subject: RFR: 8279918: Fix various doc typos [v2]
In-Reply-To:
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
<2bsQg-3igmY6_fAT_OD9jIuJ7ziQBgvB7oF1CiZN_Zo=.51e0dd63-d489-4996-8fb9-b2e8c385cbb8@github.com>
Message-ID:
On Thu, 13 Jan 2022 11:40:20 GMT, Lance Andersen wrote:
>> OK, so lines 264, 295, 329, 364, 431 are arguably wrong as well? Separating the [] completely looks quite rare.
>> I'll leave it up to you. 8-)
>
> I think that can be a follow on clean up.
The strange formatting of `long []updateCounts` looks very unusual and well worth a followup cleanup.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From jlahoda at openjdk.java.net Fri Jan 14 11:22:36 2022
From: jlahoda at openjdk.java.net (Jan Lahoda)
Date: Fri, 14 Jan 2022 11:22:36 GMT
Subject: RFR: 8279918: Fix various doc typos [v2]
In-Reply-To:
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
Message-ID:
On Thu, 13 Jan 2022 14:01:04 GMT, Pavel Rappo wrote:
>> - Most of the typos are of a trivial kind: missing whitespace.
>> - If any of the typos should be fixed in the upstream projects instead, please say so; I will drop those typos from the patch.
>> - As I understand it, ` ` in ImageInputStream and DataInput is an irrelevant formatting artefact and thus can be removed.
>> - `'` is an apostrophe, which does not require to be encoded.
>
> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision:
>
> Additional typos
javac changes look good to me.
-------------
Marked as reviewed by jlahoda (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7063
From azvegint at openjdk.java.net Fri Jan 14 12:19:28 2022
From: azvegint at openjdk.java.net (Alexander Zvegintsev)
Date: Fri, 14 Jan 2022 12:19:28 GMT
Subject: RFR: 8279918: Fix various doc typos [v2]
In-Reply-To:
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
Message-ID: <2NHrJp-0YZuLsk1to7auM4-WbJ0BxxfUImHMBAYHxs8=.012a0e0c-a9e7-4bb9-b822-21334744d4ed@github.com>
On Thu, 13 Jan 2022 14:01:04 GMT, Pavel Rappo wrote:
>> - Most of the typos are of a trivial kind: missing whitespace.
>> - If any of the typos should be fixed in the upstream projects instead, please say so; I will drop those typos from the patch.
>> - As I understand it, ` ` in ImageInputStream and DataInput is an irrelevant formatting artefact and thus can be removed.
>> - `'` is an apostrophe, which does not require to be encoded.
>
> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision:
>
> Additional typos
Client changes looks good to me.
-------------
Marked as reviewed by azvegint (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7063
From egahlin at openjdk.java.net Fri Jan 14 12:42:32 2022
From: egahlin at openjdk.java.net (Erik Gahlin)
Date: Fri, 14 Jan 2022 12:42:32 GMT
Subject: RFR: 8279918: Fix various doc typos [v2]
In-Reply-To:
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
Message-ID:
On Thu, 13 Jan 2022 14:01:04 GMT, Pavel Rappo wrote:
>> - Most of the typos are of a trivial kind: missing whitespace.
>> - If any of the typos should be fixed in the upstream projects instead, please say so; I will drop those typos from the patch.
>> - As I understand it, ` ` in ImageInputStream and DataInput is an irrelevant formatting artefact and thus can be removed.
>> - `'` is an apostrophe, which does not require to be encoded.
>
> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision:
>
> Additional typos
Marked as reviewed by egahlin (Reviewer).
The JFR related changes looks OK.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From hannesw at openjdk.java.net Fri Jan 14 13:34:33 2022
From: hannesw at openjdk.java.net (Hannes =?UTF-8?B?V2FsbG7DtmZlcg==?=)
Date: Fri, 14 Jan 2022 13:34:33 GMT
Subject: RFR: JDK-8234682: The order of @param in the generated docs should
match the method signature
In-Reply-To:
References:
Message-ID:
On Thu, 13 Jan 2022 15:30:59 GMT, Pavel Rappo wrote:
> Out of curiosity, how much of a churn does this PR introduce into the generated JDK API documentation? In any case, we should check it, to make sure that nothing surprising comes up.
That's a very good question! Turns out there are more than 50 classes in JDK that contain `@param` tags in wrong order. For instance, there is a [Collectors.groupingBy][1] method that gets both type and method parameter order wrong. I'm surprised not more of these get reported as bugs because I think they're quite confusing.
[1]: https://download.java.net/java/early_access/jdk18/docs/api/java.base/java/util/stream/Collectors.html#groupingBy(java.util.function.Function,java.util.function.Supplier,java.util.stream.Collector)
I checked a few cases against the documentation generated with this PR and the it fixes the problem.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7046
From prappo at openjdk.java.net Fri Jan 14 14:53:32 2022
From: prappo at openjdk.java.net (Pavel Rappo)
Date: Fri, 14 Jan 2022 14:53:32 GMT
Subject: RFR: JDK-8234682: The order of @param in the generated docs should
match the method signature
In-Reply-To:
References:
Message-ID:
On Wed, 12 Jan 2022 08:40:08 GMT, Hannes Walln?fer wrote:
> Please review a change in how documentation from `@param` tags is generated.
>
> The old code generates parameter documentation for each `@param` in the order in which the tags occur in the comment, then adds documentation from inherited `@param` tags for undocumented parameters.
>
> The new code always generates documentation in the order in which actual parameters are declared in the code, using local or inherited `@param` tags as appropriate. Any `@param` tags that do not have a matching parameter are added afterwards.
>
> Note that `@param` is not just used for parameters of executable members but also type parameters and record components. The second commit of this PR fixes a `ClassCastException` for these uses that was caused by the first commit and adds a few tests for it.
test/langtools/jdk/javadoc/doclet/testParamTaglet/TestParamTaglet.java line 63:
> 61:
""",
> 62: // Param tags that don't match with any real parameters.
> 63: // {@inherit} doc misuse does not cause doclet to throw exception.
Should we change this to `{@inheritDoc}`?
test/langtools/jdk/javadoc/doclet/testParamTaglet/pkg/C.java line 50:
> 48: * @param b another duplicate
> 49: */
> 50: public void unorderedParams(int i, double d, boolean b) {}
Consider adding `@Override` to this method and to `nonMatchingParams`.
test/langtools/jdk/javadoc/doclet/testParamTaglet/pkg/C.java line 59:
> 57: * @param t3 param 3
> 58: */
> 59: public static void genericMethod(T1 t1, T2 t2, T3 t3) {
You use `{}` to denote an empty body everywhere else in this file. Is there a reason you split it into two lines here?
-------------
PR: https://git.openjdk.java.net/jdk/pull/7046
From jjg at openjdk.java.net Fri Jan 14 16:08:31 2022
From: jjg at openjdk.java.net (Jonathan Gibbons)
Date: Fri, 14 Jan 2022 16:08:31 GMT
Subject: RFR: 8279918: Fix various doc typos [v2]
In-Reply-To:
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
Message-ID: <96bxwtnI-_Z67Udh4acEGwA2xzIy6dAV6CxOe9HLkRo=.dd8643aa-f3be-42e2-ad72-4a00d90363d9@github.com>
On Thu, 13 Jan 2022 14:01:04 GMT, Pavel Rappo wrote:
>> - Most of the typos are of a trivial kind: missing whitespace.
>> - If any of the typos should be fixed in the upstream projects instead, please say so; I will drop those typos from the patch.
>> - As I understand it, ` ` in ImageInputStream and DataInput is an irrelevant formatting artefact and thus can be removed.
>> - `'` is an apostrophe, which does not require to be encoded.
>
> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision:
>
> Additional typos
jdk.compiler and jdk.javadoc look good
-------------
Marked as reviewed by jjg (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7063
From prappo at openjdk.java.net Fri Jan 14 16:13:34 2022
From: prappo at openjdk.java.net (Pavel Rappo)
Date: Fri, 14 Jan 2022 16:13:34 GMT
Subject: Integrated: 8279918: Fix various doc typos
In-Reply-To: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
References: <46YbMVL2FChSPfnSUQA9DT5-GV61UGS5WeBxaGsHGz8=.915d9070-8ee4-4703-bf34-1ae07085e550@github.com>
Message-ID:
On Thu, 13 Jan 2022 10:30:07 GMT, Pavel Rappo wrote:
> - Most of the typos are of a trivial kind: missing whitespace.
> - If any of the typos should be fixed in the upstream projects instead, please say so; I will drop those typos from the patch.
> - As I understand it, ` ` in ImageInputStream and DataInput is an irrelevant formatting artefact and thus can be removed.
> - `'` is an apostrophe, which does not require to be encoded.
This pull request has now been integrated.
Changeset: f1805309
Author: Pavel Rappo
URL: https://git.openjdk.java.net/jdk/commit/f1805309352a22119ae2edf8bfbb596f00936224
Stats: 88 lines in 35 files changed: 0 ins; 0 del; 88 mod
8279918: Fix various doc typos
Reviewed-by: kevinw, lancea, mullan, sspitsyn, naoto, jlahoda, azvegint, egahlin, jjg
-------------
PR: https://git.openjdk.java.net/jdk/pull/7063
From hannesw at openjdk.java.net Fri Jan 14 16:15:29 2022
From: hannesw at openjdk.java.net (Hannes =?UTF-8?B?V2FsbG7DtmZlcg==?=)
Date: Fri, 14 Jan 2022 16:15:29 GMT
Subject: RFR: JDK-8268831: Improve javadoc tool handling of streams.
In-Reply-To:
References:
Message-ID:
On Tue, 4 Jan 2022 01:17:46 GMT, Jonathan Gibbons wrote:
> Please review a relatively simple cleanup left over from last year's cleanup for `JavadocLog` (was `Messager`).
>
> The cleanup here is to rationalize the inconsistent naming and use of methods named `notice` in `JavadocLog` and `ToolEnvironment`, as well as cleanup use of the primitive `Log.printRawLines`. While it would have been nice to move the definition of `ToolEnvironment.notice` into `JavadocLog` that dragged with it the need for the `quiet` variable, which led to initialization order problems. The proposed solution is a compromise.
>
> No tests are affected; `noreg-cleanup`.
Looks good to me.
Am I right in the assumption that the writer for `WriterKind.NOTICE` in javadoc is always stdout? I couldn't figure out where the writers are set (I guess it is somewhere in jdk.compiler code).
-------------
Marked as reviewed by hannesw (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/6950
From hannesw at openjdk.java.net Fri Jan 14 16:35:56 2022
From: hannesw at openjdk.java.net (Hannes =?UTF-8?B?V2FsbG7DtmZlcg==?=)
Date: Fri, 14 Jan 2022 16:35:56 GMT
Subject: RFR: JDK-8234682: The order of @param in the generated docs should
match the method signature [v2]
In-Reply-To:
References:
Message-ID:
> Please review a change in how documentation from `@param` tags is generated.
>
> The old code generates parameter documentation for each `@param` in the order in which the tags occur in the comment, then adds documentation from inherited `@param` tags for undocumented parameters.
>
> The new code always generates documentation in the order in which actual parameters are declared in the code, using local or inherited `@param` tags as appropriate. Any `@param` tags that do not have a matching parameter are added afterwards.
>
> Note that `@param` is not just used for parameters of executable members but also type parameters and record components. The second commit of this PR fixes a `ClassCastException` for these uses that was caused by the first commit and adds a few tests for it.
Hannes Walln?fer has updated the pull request incrementally with one additional commit since the last revision:
JDK-8234682: Review feedback
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7046/files
- new: https://git.openjdk.java.net/jdk/pull/7046/files/231ca4d6..1caa8aed
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7046&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7046&range=00-01
Stats: 5 lines in 2 files changed: 2 ins; 1 del; 2 mod
Patch: https://git.openjdk.java.net/jdk/pull/7046.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7046/head:pull/7046
PR: https://git.openjdk.java.net/jdk/pull/7046
From hannesw at openjdk.java.net Fri Jan 14 16:35:59 2022
From: hannesw at openjdk.java.net (Hannes =?UTF-8?B?V2FsbG7DtmZlcg==?=)
Date: Fri, 14 Jan 2022 16:35:59 GMT
Subject: RFR: JDK-8234682: The order of @param in the generated docs should
match the method signature [v2]
In-Reply-To:
References:
Message-ID: <3bTwIEWZKTMjl1kzWapIyuXC6PyVw__Bm08X9fSD88c=.4dcadc26-9b9e-4f1e-b2ae-f8ec09e1724d@github.com>
On Fri, 14 Jan 2022 14:29:16 GMT, Pavel Rappo wrote:
>> Hannes Walln?fer has updated the pull request incrementally with one additional commit since the last revision:
>>
>> JDK-8234682: Review feedback
>
> test/langtools/jdk/javadoc/doclet/testParamTaglet/pkg/C.java line 50:
>
>> 48: * @param b another duplicate
>> 49: */
>> 50: public void unorderedParams(int i, double d, boolean b) {}
>
> Consider adding `@Override` to this method and to `nonMatchingParams`.
Thanks for the feedback, Pavel. I added a commit that addresses all your suggestions.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7046
From anna.kozlova at jetbrains.com Mon Jan 17 12:36:59 2022
From: anna.kozlova at jetbrains.com (Anna Kozlova)
Date: Mon, 17 Jan 2022 13:36:59 +0100
Subject: parameter types in @link tag
Message-ID:
Hi all!
I am trying to figure out if the javadoc tool should be ok with a short
class name as parameter type. Is there any specification on @link tag
format?
E.g. javadoc for `java.io.File#isDirectory` contains the following "{@link
java.nio.file.Files#readAttributes(Path,Class,LinkOption[])". LinkOption
isn't resolved but the generated html correctly navigates the
"readAttributes" method. This makes me suspect that the signatures are
checked by short names only.
But this leads to the problem with the ambiguity:
```class Foo {
/**
* {@link #bar(Bar)}
*/
void foo() {}
void bar(Foo2.Bar f) {}
void bar(Foo1.Bar f) {}
}
class Foo1 {
static class Bar {}
}
class Foo2 {
static class Bar {}
}```
Here the link points to the first method as it is written in the class
"Foo" which looks wrong, or is it ok?
Thank you,
Anna Kozlova
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jonathan.gibbons at oracle.com Tue Jan 18 20:07:25 2022
From: jonathan.gibbons at oracle.com (Jonathan Gibbons)
Date: Tue, 18 Jan 2022 12:07:25 -0800
Subject: parameter types in @link tag
In-Reply-To:
References:
Message-ID: <949f6922-c962-b884-8ad0-51d23e2642df@oracle.com>
Hi Anna,
The intent is that the names should follow javac usage: either use a
qualified name or use a simple name that is in scope, such as an
imported name.
That being said, javadoc does not use pure-javac code for the lookup,
and there are some allowances made for historical usage. I could believe
there are residual bugs in this area, and any resolution would be in
favor of moving closer to javac rules where possible.
-- Jon
On 1/17/22 4:36 AM, Anna Kozlova wrote:
> Hi all!
>
> I am trying to figure out if the javadoc tool should be ok with a
> short class name as parameter type. Is there any specification on
> @link tag format?
>
> E.g. javadoc for?`java.io.File#isDirectory`?contains the following
> "{@link java.nio.file.Files#readAttributes(Path,Class,LinkOption[])".
> LinkOption
> isn't resolved but the generated html correctly navigates the
> "readAttributes" method. This makes me suspect that the signatures are
> checked by short names only.
> But this leads to the problem with the ambiguity:
> ```class Foo {
> /**
> * {@link #bar(Bar)} */ void foo() {}
> void bar(Foo2.Bar f) {}
> void bar(Foo1.Bar f) {}
> }
> class Foo1 {
> static class Bar {}
> }
> class Foo2 {
> static class Bar {}
> }```
> Here the link points to the first method as it is written in the class
> "Foo" which looks wrong, or is it ok?
>
> Thank you,
> Anna Kozlova
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From anna.kozlova at jetbrains.com Tue Jan 18 20:49:34 2022
From: anna.kozlova at jetbrains.com (Anna Kozlova)
Date: Tue, 18 Jan 2022 21:49:34 +0100
Subject: parameter types in @link tag
In-Reply-To: <949f6922-c962-b884-8ad0-51d23e2642df@oracle.com>
References:
<949f6922-c962-b884-8ad0-51d23e2642df@oracle.com>
Message-ID:
Thanks, Jon!
Anna
On Tue, Jan 18, 2022 at 9:07 PM Jonathan Gibbons <
jonathan.gibbons at oracle.com> wrote:
> Hi Anna,
>
> The intent is that the names should follow javac usage: either use a
> qualified name or use a simple name that is in scope, such as an imported
> name.
>
> That being said, javadoc does not use pure-javac code for the lookup, and
> there are some allowances made for historical usage. I could believe there
> are residual bugs in this area, and any resolution would be in favor of
> moving closer to javac rules where possible.
>
> -- Jon
> On 1/17/22 4:36 AM, Anna Kozlova wrote:
>
> Hi all!
>
> I am trying to figure out if the javadoc tool should be ok with a short
> class name as parameter type. Is there any specification on @link tag
> format?
>
> E.g. javadoc for `java.io.File#isDirectory` contains the following "{@link
> java.nio.file.Files#readAttributes(Path,Class,LinkOption[])"
> <%7B at linkjava.nio.file.Files#readAttributes(Path,Class,LinkOption[])>.
> LinkOption
> isn't resolved but the generated html correctly navigates the
> "readAttributes" method. This makes me suspect that the signatures are
> checked by short names only.
> But this leads to the problem with the ambiguity:
> ```class Foo {
> /**
>
> * {@link #bar(Bar)} */ void foo() {}
> void bar(Foo2.Bar f) {}
> void bar(Foo1.Bar f) {}
> }class Foo1 {
> static class Bar {}
> }class Foo2 {
> static class Bar {}
> }```
>
> Here the link points to the first method as it is written in the class
> "Foo" which looks wrong, or is it ok?
>
> Thank you,
> Anna Kozlova
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jjg at openjdk.java.net Wed Jan 19 17:43:29 2022
From: jjg at openjdk.java.net (Jonathan Gibbons)
Date: Wed, 19 Jan 2022 17:43:29 GMT
Subject: RFR: JDK-8268831: Improve javadoc tool handling of streams.
In-Reply-To:
References:
Message-ID: <01Wvtw6raWVX6VSt-FE7TdMbylTmEYBkTQzo4TgC3Bs=.50bb84cb-bb79-4ef9-b132-ce914987745f@github.com>
On Fri, 14 Jan 2022 16:12:22 GMT, Hannes Walln?fer wrote:
> Looks good to me.
>
> Am I right in the assumption that the writer for `WriterKind.NOTICE` in javadoc is always stdout? I couldn't figure out where the writers are set (I guess it is somewhere in jdk.compiler code).
This was changed a short while back. All diagnostics (ERROR, WARNING, NOTICE) go to `stderr` or its equivalent. `stdout` is only used for output that is "requested" by the user, where the output is the result of the requested action, like command-line help from `--help`. Although it's not a defining specification, there's a good wikipedia article on [Standard Streams](https://en.wikipedia.org/wiki/Standard_streams).
-------------
PR: https://git.openjdk.java.net/jdk/pull/6950
From jjg at openjdk.java.net Wed Jan 19 17:59:29 2022
From: jjg at openjdk.java.net (Jonathan Gibbons)
Date: Wed, 19 Jan 2022 17:59:29 GMT
Subject: Integrated: JDK-8268831: Improve javadoc tool handling of streams.
In-Reply-To:
References:
Message-ID:
On Tue, 4 Jan 2022 01:17:46 GMT, Jonathan Gibbons wrote:
> Please review a relatively simple cleanup left over from last year's cleanup for `JavadocLog` (was `Messager`).
>
> The cleanup here is to rationalize the inconsistent naming and use of methods named `notice` in `JavadocLog` and `ToolEnvironment`, as well as cleanup use of the primitive `Log.printRawLines`. While it would have been nice to move the definition of `ToolEnvironment.notice` into `JavadocLog` that dragged with it the need for the `quiet` variable, which led to initialization order problems. The proposed solution is a compromise.
>
> No tests are affected; `noreg-cleanup`.
This pull request has now been integrated.
Changeset: 610a1290
Author: Jonathan Gibbons
URL: https://git.openjdk.java.net/jdk/commit/610a12904d834507754e6d6171a4b8df7e6aa6b0
Stats: 69 lines in 5 files changed: 15 ins; 25 del; 29 mod
8268831: Improve javadoc tool handling of streams.
Reviewed-by: hannesw
-------------
PR: https://git.openjdk.java.net/jdk/pull/6950
From prappo at openjdk.java.net Wed Jan 19 18:37:26 2022
From: prappo at openjdk.java.net (Pavel Rappo)
Date: Wed, 19 Jan 2022 18:37:26 GMT
Subject: RFR: JDK-8234682: The order of @param in the generated docs should
match the method signature [v2]
In-Reply-To:
References:
Message-ID:
On Fri, 14 Jan 2022 16:35:56 GMT, Hannes Walln?fer wrote:
>> Please review a change in how documentation from `@param` tags is generated.
>>
>> The old code generates parameter documentation for each `@param` in the order in which the tags occur in the comment, then adds documentation from inherited `@param` tags for undocumented parameters.
>>
>> The new code always generates documentation in the order in which actual parameters are declared in the code, using local or inherited `@param` tags as appropriate. Any `@param` tags that do not have a matching parameter are added afterwards.
>>
>> Note that `@param` is not just used for parameters of executable members but also type parameters and record components. The second commit of this PR fixes a `ClassCastException` for these uses that was caused by the first commit and adds a few tests for it.
>
> Hannes Walln?fer has updated the pull request incrementally with one additional commit since the last revision:
>
> JDK-8234682: Review feedback
1. As you pointed elsewhere, `rank` is actually a position of a particular parameter. Later, we could rename `rank` into `position` or something similarly appropriate.
2. Although "ranks" precede this patch, my gut feeling is that rank being String rather than Integer, is a bad idea. But as long as "ranks" are not compared for order (only for equality), we are okay; alphanumeric order differs from that of numeric: "1", "11", "2" vs 1, 2, 11. We should revisit "ranks" later.
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ParamTaglet.java line 211:
> 209: CommentHelper ch = writer.configuration().utils.getCommentHelper(e);
> 210: if (!paramTags.isEmpty()) {
> 211: Map rankMap = getRankMap(writer.configuration().utils, formalParameters);
Suggestion:
Map rankMap = getRankMap(writer.configuration().utils, formalParameters);
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ParamTaglet.java line 229:
> 227: case PARAMETER -> "doclet.Parameters_dup_warn";
> 228: case TYPE_PARAMETER -> "doclet.TypeParameters_dup_warn";
> 229: case RECORD_COMPONENT -> "doclet.RecordComponents_dup_warn";
Suggestion:
case PARAMETER -> "doclet.Parameters_dup_warn";
case TYPE_PARAMETER -> "doclet.TypeParameters_dup_warn";
case RECORD_COMPONENT -> "doclet.RecordComponents_dup_warn";
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ParamTaglet.java line 230:
> 228: * @param alreadyDocumented the set of exceptions that have already
> 229: * been documented.
> 230: * @param rankMap a {@link java.util.Map} which holds ordering
It's ironic that a method whose job, at least in part, is to warn about duplicated `@param` tags had one of its `@param` tags duplicated. Was it an Easter egg of sorts?
-------------
Marked as reviewed by prappo (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7046
From jjg at openjdk.java.net Wed Jan 19 19:22:57 2022
From: jjg at openjdk.java.net (Jonathan Gibbons)
Date: Wed, 19 Jan 2022 19:22:57 GMT
Subject: RFR: 8268978: Document the javadoc software stack
In-Reply-To:
References:
Message-ID:
On Thu, 13 Jan 2022 15:48:59 GMT, Hannes Walln?fer wrote:
> A general question about this: Where and how will this documentation mostly be consumed? The `jdk.javadoc.internal` package is not included in standard JDK documentation, so is it likely that this documentation will be mainly consumed within an editor/IDE?
>
> My feeling is that maybe a less markup-heavy and more text centric form would be easier to consume in that context. For instance, using appropriate HTML headings and paragraphs instead of the deeply nested `` structure might provide more of a continuous text experience, while still maintaining the hierarchical information. Of course this is a matter of taste, different people have different preferences.
This is to document the design for the benefit of potential future developers. I have no illusions that we will ever run javadoc over the internal documentation as a matter of course, but it is getting better/easier to view documentation comments in an editor./IDE, and with that in mind, I note that IntelliJ IDEA does an excellent job in its Reader Mode of displaying the comment and handling the HTML markup. I also think it is worth keeping relatively high standards for internal documentation, at least for internal public and protected API. (I accept that it is hard to persuade people to better comment private API :-( )
-------------
PR: https://git.openjdk.java.net/jdk/pull/6914
From jjg at openjdk.java.net Wed Jan 19 19:24:55 2022
From: jjg at openjdk.java.net (Jonathan Gibbons)
Date: Wed, 19 Jan 2022 19:24:55 GMT
Subject: RFR: JDK-8272984: javadoc support for SOURCE_DATE_EPOCH [v2]
In-Reply-To:
References:
Message-ID:
On Tue, 21 Dec 2021 07:22:30 GMT, Alan Bateman wrote:
> I think this issue will require wider discussion because all previous investigation into this topic have concluded with the JDK not reading the env variable directly, instead providing a way to configure the timestamp. For the jar and jmod tools the option --date is used to specify a fixed timestamp for entries when reproducible builds are required. The Properties.store API specifies to read the system property java.properties.date so that date/timestamp in the comment uses a fixed date.
Noted.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6905
From hannesw at openjdk.java.net Thu Jan 20 15:43:15 2022
From: hannesw at openjdk.java.net (Hannes =?UTF-8?B?V2FsbG7DtmZlcg==?=)
Date: Thu, 20 Jan 2022 15:43:15 GMT
Subject: RFR: JDK-8268335: Find better way to exclude empty HTML elements
Message-ID:
Please review a change to straighten out the mechanism to avoid generating empty HTML elements in javadoc.
Currently this is implemented using the `Content.isValid()` method in `HtmlTree.add(Content)` to check whether the the content argument should be added or dropped. This seems wrong since we don't really want to check for validity but non-emptiness (we want to drop empty elements, not print a warning or error).
So the first decision was to get rid of the `Content.isValid()` method and use `Content.isEmpty()` instead. I considered keeping `isValid()` and using it to actually do some validation checks, but in the end decided it didn't make much sense and scrapped the method.
My initial approach was to take care of emptiness at the content creation site, but it soon turned out there are too many sites potentially creating empty content. After fixing 40+ sites using a new `Content.addNonEmpty(Content)` method I still got empty elements that shouldn't be there in the JDK documentation.
Therefore `HtmlTree.add(Content)` still checks for and drops empty content arguments. Instead, I added a new `HtmlTree.addUnchecked(Content)` method that adds the argument without the checks. The new method is only used 5 times in the whole codebase. It replaces the use of the special `HtmlTree.EMPTY` content token which is no longer needed.
A few remarks about the rewritten `HtmlTree.isEmpty()` method: its purpose is to determine whether content is missing in an element that should have content. It therefore always returns `false` for elements that are expected or allowed to be without content. This is maybe a bit counter-intuitive, but it is what is needed. We could do a combined check such as `isVoid() || !isEmpty()` but that would still leave out elements that *can* be empty, such as `