Re: RFR: 8275771: JDK source code contains redundant boolean operations in jdk.compiler and langtools

2021-11-29 Thread PROgrm_JARvis
On Mon, 29 Nov 2021 19:54:02 GMT, Joe Darcy  wrote:

>> Hi,
>> 
>> Please review this PR which is basically rewriting some redundant boolean 
>> expressions in the compiler.
>> 
>> TIA
>
> make/langtools/tools/compileproperties/CompileProperties.java line 187:
> 
>> 185: }
>> 186: if ( ok && contents != null ) {
>> 187: String tokens[] = (new 
>> String(contents)).split("\\s+");
> 
> So the intended composite predicate here is thought to be
> ok == true && contents != null
> which is equivalent to
> ok && contents != null.
> The semantics of the current code are equivalent to just
> contents != null
> right?

The semantics is definitely changed (considering the first branch was always 
true originally) but it may be the original implementation being incorrect,

> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java line 
> 1316:
> 
>> 1314: public void visitReference(JCMemberReference tree) {
>> 1315: if (sRet.hasTag(VOID)) {
>> 1316: result = true;
> 
> Isn't the equivalent statement to
> result &= true
> just
> result
> ?

Agreeing with jddarcy:
`a & true === a`
so current code just keeps the value of `result` while the new one sets 
`result` to `true`.

-

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


Re: RFR: 8275771: JDK source code contains redundant boolean operations in jdk.compiler and langtools

2021-11-29 Thread PROgrm_JARvis
On Mon, 29 Nov 2021 19:05:59 GMT, Vicente Romero  wrote:

> Hi,
> 
> Please review this PR which is basically rewriting some redundant boolean 
> expressions in the compiler.
> 
> TIA

Changes requested by jarviscr...@github.com (no known OpenJDK username).

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java line 1338:

> 1336: public void visitLambda(JCLambda tree) {
> 1337: if (sRet.hasTag(VOID)) {
> 1338: result = true;

Same as above, the change is changing the semantics:
original code keeps the value of `result` while the new one sets it to `true`.

-

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


Re: RFR: 8275771: JDK source code contains redundant boolean operations in jdk.compiler and langtools

2021-11-29 Thread Joe Darcy
On Mon, 29 Nov 2021 19:05:59 GMT, Vicente Romero  wrote:

> Hi,
> 
> Please review this PR which is basically rewriting some redundant boolean 
> expressions in the compiler.
> 
> TIA

make/langtools/tools/compileproperties/CompileProperties.java line 187:

> 185: }
> 186: if ( ok && contents != null ) {
> 187: String tokens[] = (new 
> String(contents)).split("\\s+");

So the intended composite predicate here is thought to be
ok == true && contents != null
which is equivalent to
ok && contents != null.
The semantics of the current code are equivalent to just
contents != null
right?

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java line 1316:

> 1314: public void visitReference(JCMemberReference tree) {
> 1315: if (sRet.hasTag(VOID)) {
> 1316: result = true;

Isn't the equivalent statement to
result &= true
just
result
?

-

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


Re: RFR: JDK-8273146: Start of release updates for JDK 19 [v5]

2021-11-29 Thread Iris Clark
On Mon, 29 Nov 2021 18:38:35 GMT, Joe Darcy  wrote:

>> The time to get JDK 19 underway draws nigh, please review this usual set of 
>> start-of-release updates, including CSRs for the javac and javax.lang.model 
>> updates:
>> 
>> JDK-8277512: Add SourceVersion.RELEASE_19
>> https://bugs.openjdk.java.net/browse/JDK-8277512
>> 
>> JDK-8277514: Add source 19 and target 19 to javac
>> https://bugs.openjdk.java.net/browse/JDK-8277514
>> 
>> Clean local tier 1 test runs for langtools, jdk, and hotspot.
>
> Joe Darcy has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Update symbol information for JDK 18 b25.

Marked as reviewed by iris (Reviewer).

-

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


RFR: 8275771: JDK source code contains redundant boolean operations in jdk.compiler and langtools

2021-11-29 Thread Vicente Romero
Hi,

Please review this PR which is basically rewriting some redundant boolean 
expressions in the compiler.

TIA

-

Commit messages:
 - 8275771: JDK source code contains redundant boolean operations in 
jdk.compiler and langtools

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

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


Re: RFR: JDK-8273146: Start of release updates for JDK 19 [v5]

2021-11-29 Thread Joe Darcy
> The time to get JDK 19 underway draws nigh, please review this usual set of 
> start-of-release updates, including CSRs for the javac and javax.lang.model 
> updates:
> 
> JDK-8277512: Add SourceVersion.RELEASE_19
> https://bugs.openjdk.java.net/browse/JDK-8277512
> 
> JDK-8277514: Add source 19 and target 19 to javac
> https://bugs.openjdk.java.net/browse/JDK-8277514
> 
> Clean local tier 1 test runs for langtools, jdk, and hotspot.

Joe Darcy has updated the pull request incrementally with one additional commit 
since the last revision:

  Update symbol information for JDK 18 b25.

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/6493/files
  - new: https://git.openjdk.java.net/jdk/pull/6493/files/5c36a2ef..53e46dec

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6493&range=04
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6493&range=03-04

  Stats: 85 lines in 5 files changed: 62 ins; 22 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6493.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6493/head:pull/6493

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


Re: RFR: 8277944: JDK 18 - update GA Release Date

2021-11-29 Thread Sean Coffey
On Mon, 29 Nov 2021 16:19:12 GMT, Pavel Kharskii  wrote:

> 8277944: JDK 18 - update GA Release Date

Marked as reviewed by coffeys (Reviewer).

-

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


Re: RFR: 8277459: Add jwebserver tool [v6]

2021-11-29 Thread Julia Boes
> This change introduces jwebserver, a dedicated JDK tool for the Simple Web 
> Server. 
> 
> A description is provided in a follow-up comment.

Julia Boes has updated the pull request with a new target base due to a merge 
or a rebase. The pull request now contains 16 commits:

 - Merge branch 'master' into jwebserver
 - update comment about exit code
 - add toolGuide tag to SimpleFileServer class-level documentation
 - Merge branch 'master' into jwebserver
 - fix whitespace error, add missing code tag
 - address PR comments:
   * update module and package summary
   * add -version / --version option to usage
   * fix markdown formatting
 - update module summary
 - Merge branch 'master' into jwebserver
 - add version option, consolidate tests, update module and package level doc
 - drop "tool" in man page
 - ... and 6 more: https://git.openjdk.java.net/jdk/compare/825e633e...936c3d4a

-

Changes: https://git.openjdk.java.net/jdk/pull/6497/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6497&range=05
  Stats: 682 lines in 17 files changed: 587 ins; 27 del; 68 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6497.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6497/head:pull/6497

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


Integrated: 8277944: JDK 18 - update GA Release Date

2021-11-29 Thread Pavel Kharskii
On Mon, 29 Nov 2021 16:19:12 GMT, Pavel Kharskii  wrote:

> 8277944: JDK 18 - update GA Release Date

This pull request has now been integrated.

Changeset: 825e633e
Author:Pavel Kharskii 
Committer: Sean Coffey 
URL:   
https://git.openjdk.java.net/jdk/commit/825e633e71ca942fe88c509e7f951ff8903c45cf
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod

8277944: JDK 18 - update GA Release Date

Reviewed-by: coffeys

-

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


RFR: 8277944: JDK 18 - update GA Release Date

2021-11-29 Thread Pavel Kharskii
8277944: JDK 18 - update GA Release Date

-

Commit messages:
 - 8277944: JDK 18 - update GA Release Date

Changes: https://git.openjdk.java.net/jdk/pull/6596/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6596&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8277944
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6596.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6596/head:pull/6596

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


Re: RFR: 8277459: Add jwebserver tool [v3]

2021-11-29 Thread Julia Boes
On Thu, 25 Nov 2021 10:09:21 GMT, Daniel Fuchs  wrote:

>> Julia Boes has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   fix whitespace error, add missing code tag
>
> src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/Main.java 
> line 63:
> 
>> 61: System.exit(ec);
>> 62: }  // otherwise the server has been started successfully and 
>> runs in
>> 63:// another non-daemon thread.
> 
> I wonder if we should add:
> 
> 
> // another non-daemon thread, or -h or -version have been passed and
> // the main thread will simply exit normally.

Right, good to mention those two cases.

-

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


Re: RFR: 8277459: Add jwebserver tool [v5]

2021-11-29 Thread Daniel Fuchs
On Mon, 29 Nov 2021 13:57:13 GMT, Julia Boes  wrote:

>> This change introduces jwebserver, a dedicated JDK tool for the Simple Web 
>> Server. 
>> 
>> A description is provided in a follow-up comment.
>
> Julia Boes has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   update comment about exit code

LGTM!

-

Marked as reviewed by dfuchs (Reviewer).

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


Re: RFR: 8277459: Add jwebserver tool [v5]

2021-11-29 Thread Julia Boes
> This change introduces jwebserver, a dedicated JDK tool for the Simple Web 
> Server. 
> 
> A description is provided in a follow-up comment.

Julia Boes has updated the pull request incrementally with one additional 
commit since the last revision:

  update comment about exit code

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/6497/files
  - new: https://git.openjdk.java.net/jdk/pull/6497/files/dc1ac2dd..81499efa

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6497&range=04
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6497&range=03-04

  Stats: 6 lines in 2 files changed: 2 ins; 0 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6497.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6497/head:pull/6497

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


Re: RFR: 8277459: Add jwebserver tool [v3]

2021-11-29 Thread Daniel Fuchs
On Wed, 24 Nov 2021 17:29:40 GMT, Julia Boes  wrote:

>> This change introduces jwebserver, a dedicated JDK tool for the Simple Web 
>> Server. 
>> 
>> A description is provided in a follow-up comment.
>
> Julia Boes has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   fix whitespace error, add missing code tag

src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/Main.java line 
63:

> 61: System.exit(ec);
> 62: }  // otherwise the server has been started successfully and runs 
> in
> 63:// another non-daemon thread.

I wonder if we should add:


// another non-daemon thread, or -h or -version have been passed and
// the main thread will simply exit normally.

-

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


Re: RFR: 8277459: Add jwebserver tool [v4]

2021-11-29 Thread Julia Boes
On Wed, 24 Nov 2021 14:05:03 GMT, Julia Boes  wrote:

>> src/jdk.httpserver/share/classes/com/sun/net/httpserver/SimpleFileServer.java
>>  line 110:
>> 
>>> 108:  *
>>> 109:  * A simple HTTP file server implementation is provided via the
>>> 110:  * {@code jwebserver} tool.
>> 
>> Maybe an `@toolGuide jwebserver` javadoc tag could also be added here too, 
>> at line 111?
>
> The tag can currently only be added to module and package summaries, if I 
> read the code correctly, see 
> `open/make/jdk/src/classes/build/tools/taglet/ToolGuide.java`. I can check if 
> we can add class-level support at a later point.

Support for `@toolGuide` in class-level documentation was added to the mainline 
with 
https://github.com/openjdk/jdk/commit/e3e5908d0d385ef908ba9752908aaf28b4b3e4f4

-

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


Re: RFR: 8277459: Add jwebserver tool [v4]

2021-11-29 Thread Julia Boes
> This change introduces jwebserver, a dedicated JDK tool for the Simple Web 
> Server. 
> 
> A description is provided in a follow-up comment.

Julia Boes has updated the pull request with a new target base due to a merge 
or a rebase. The pull request now contains 14 commits:

 - add toolGuide tag to SimpleFileServer class-level documentation
 - Merge branch 'master' into jwebserver
 - fix whitespace error, add missing code tag
 - address PR comments:
   * update module and package summary
   * add -version / --version option to usage
   * fix markdown formatting
 - update module summary
 - Merge branch 'master' into jwebserver
 - add version option, consolidate tests, update module and package level doc
 - drop "tool" in man page
 - Merge branch 'master' into jwebserver
 - update markdown
 - ... and 4 more: https://git.openjdk.java.net/jdk/compare/37de4422...dc1ac2dd

-

Changes: https://git.openjdk.java.net/jdk/pull/6497/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6497&range=03
  Stats: 680 lines in 17 files changed: 585 ins; 27 del; 68 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6497.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6497/head:pull/6497

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


Integrated: 8277847: Support toolGuide tag in class-level documentation

2021-11-29 Thread Julia Boes
On Thu, 25 Nov 2021 15:58:58 GMT, Julia Boes  wrote:

> This change adds support for the `@toolGuide` tag in class-level API 
> documentation. 
> 
> (A use case is the jwebserver tool, where the 
> com.sun.net.httpserver.SimpleFileServer class provides API points for 
> extension and customization of the underlying server and its components. 
> Linking to the tool's man page in the class-level documentation would be 
> beneficial.)

This pull request has now been integrated.

Changeset: e3e5908d
Author:Julia Boes 
URL:   
https://git.openjdk.java.net/jdk/commit/e3e5908d0d385ef908ba9752908aaf28b4b3e4f4
Stats: 10 lines in 1 file changed: 7 ins; 1 del; 2 mod

8277847: Support toolGuide tag in class-level documentation

Reviewed-by: alanb, jjg

-

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