Re: RFR: 6323374: (coll) Optimize Collections.unmodifiable* and synchronized* [v4]

2021-02-23 Thread Stuart Marks
On Tue, 23 Feb 2021 23:32:01 GMT, Stuart Marks wrote: >>> > Is there any behavior change here that merits a CSR review? >>> >>> Maybe. The one observable change is that calling `Collections.bar(foo)` >>> with a `foo` that is already a `bar` will return the instance rather than >>>

Re: RFR: 6323374: (coll) Optimize Collections.unmodifiable* and synchronized* [v4]

2021-02-23 Thread Stuart Marks
On Tue, 23 Feb 2021 16:27:06 GMT, Ian Graves wrote: > Is there any behavior change here that merits a CSR review? Yes. See my comments in the bug report:

Re: RFR: 6323374: (coll) Optimize Collections.unmodifiable* and synchronized* [v4]

2021-02-23 Thread Stuart Marks
On Fri, 19 Feb 2021 01:52:51 GMT, liach wrote: >> Maybe it is not correct for UnmodifiableEntrySet::contains to short circuit? >> What if the implementation was changed to: >> >> `public boolean contains(Object o) { >> if (!(o instanceof Map.Entry)) >> return

Re: RFR: 8258444: Clean up specifications of java.io.Reader.read(char[], int, int) in subclass overrides [v2]

2021-02-23 Thread Brian Burkhalter
On Tue, 23 Feb 2021 22:12:38 GMT, Daniel Fuchs wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8258444: Explcitly inherit IOOBE in {Filter,InputStream}Reader > >

Re: RFR: 8258444: Clean up specifications of java.io.Reader.read(char[], int, int) in subclass overrides [v2]

2021-02-23 Thread Daniel Fuchs
On Tue, 23 Feb 2021 17:42:58 GMT, Brian Burkhalter wrote: >> 8258444: Clean up specifications of java.io.Reader.read(char[],int,int) in >> subclass overrides > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8258444:

Re: RFR: 8258444: Clean up specifications of java.io.Reader.read(char[], int, int) in subclass overrides [v2]

2021-02-23 Thread Roger Riggs
On Tue, 23 Feb 2021 17:42:58 GMT, Brian Burkhalter wrote: >> 8258444: Clean up specifications of java.io.Reader.read(char[],int,int) in >> subclass overrides > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8258444:

Re: RFR: 8258444: Clean up specifications of java.io.Reader.read(char[], int, int) in subclass overrides [v2]

2021-02-23 Thread Brian Burkhalter
On Tue, 23 Feb 2021 18:00:33 GMT, Alan Bateman wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8258444: Explcitly inherit IOOBE in {Filter,InputStream}Reader > > Marked as reviewed by alanb (Reviewer). CSR

Re: RFR: 8261919: java/util/Locale/LocaleProvidersRun.java failed with "RuntimeException: Expected log was not emitted. LogRecord: null" [v2]

2021-02-23 Thread Daniel Fuchs
On Tue, 23 Feb 2021 19:35:55 GMT, Naoto Sato wrote: >> Please review the fix to this test case failure that occurs with the usage >> tracker enabled JRE. > > Naoto Sato has updated the pull request incrementally with one additional > commit since the last revision: > > Reflecting review

Integrated: 8253409: Double-rounding possibility in float fma

2021-02-23 Thread Joe Darcy
On Tue, 23 Feb 2021 03:58:46 GMT, Joe Darcy wrote: > In floating-point, usually doing an operation to double precision and then > rounding to float gives the right result in float precision. One exception to > this is fused multiply add (fma) where "a * b + c" is computed with a single >

Re: RFR: 8253409: Double-rounding possibility in float fma [v2]

2021-02-23 Thread Joe Darcy
On Tue, 23 Feb 2021 19:11:06 GMT, Brian Burkhalter wrote: > > > Looks fine. Presumably the updated test fails without the source change. Right; the added test case is the failing one from the bug report. It will fail if the old non-intrinsic implementation, that is the Java implementation is

Re: RFR: 8261919: java/util/Locale/LocaleProvidersRun.java failed with "RuntimeException: Expected log was not emitted. LogRecord: null" [v2]

2021-02-23 Thread Naoto Sato
> Please review the fix to this test case failure that occurs with the usage > tracker enabled JRE. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Reflecting review comments. - Changes: - all:

Re: RFR: JDK-8262199: issue in jli args.c [v2]

2021-02-23 Thread Alan Bateman
On Tue, 23 Feb 2021 14:04:29 GMT, Christoph Langer wrote: >> Matthias Baesken has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Small changes > > src/java.base/share/native/libjli/args.c line 361: > >> 359: if (fptr != NULL)

Re: RFR: 8253409: Double-rounding possibility in float fma [v2]

2021-02-23 Thread Brian Burkhalter
On Tue, 23 Feb 2021 07:00:07 GMT, Joe Darcy wrote: >> In floating-point, usually doing an operation to double precision and then >> rounding to float gives the right result in float precision. One exception >> to this is fused multiply add (fma) where "a * b + c" is computed with a >> single

Re: RFR: 8261919: java/util/Locale/LocaleProvidersRun.java failed with "RuntimeException: Expected log was not emitted. LogRecord: null"

2021-02-23 Thread Naoto Sato
On Tue, 23 Feb 2021 09:49:47 GMT, Daniel Fuchs wrote: >> Please review the fix to this test case failure that occurs with the usage >> tracker enabled JRE. > > test/jdk/java/util/Locale/LocaleProviders.java line 416: > >> 414: // Set the root logger on loading the logging class >> 415:

JDK-8262003: Class.arrayType should not throw IllegalArgumentException

2021-02-23 Thread Johannes Kuhn
I want to learn about writing a CSR, and need a sponsor teaching me the ropes. Bug: https://bugs.openjdk.java.net/browse/JDK-8262003 Currently, Class.arrayType() will throw an IllegalArgumentException if the maximum number of dimensions will be exceeded. Throwing an

Re: RFR: 8258444: Clean up specifications of java.io.Reader.read(char[], int, int) in subclass overrides [v2]

2021-02-23 Thread Alan Bateman
On Tue, 23 Feb 2021 17:42:58 GMT, Brian Burkhalter wrote: >> 8258444: Clean up specifications of java.io.Reader.read(char[],int,int) in >> subclass overrides > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8258444:

Re: RFR: 8252883: AccessDeniedException caused by delayed file deletion on Windows [v7]

2021-02-23 Thread Vyom Mani Tewari
On Tue, 23 Feb 2021 12:15:08 GMT, Evan Whelan wrote: >> Hi, >> >> Please review this fix for JDK-8252883. This handles the case when an >> AccessDeniedException is being thrown on Windows, due to a delay in deleting >> the lock file it is trying to write to. >> >> This fix passes all

Re: RFR: 8258444: Clean up specifications of java.io.Reader.read(char[], int, int) in subclass overrides [v2]

2021-02-23 Thread Brian Burkhalter
> 8258444: Clean up specifications of java.io.Reader.read(char[],int,int) in > subclass overrides Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8258444: Explcitly inherit IOOBE in {Filter,InputStream}Reader -

Re: RFR: 8252883: AccessDeniedException caused by delayed file deletion on Windows [v7]

2021-02-23 Thread Evan Whelan
On Tue, 23 Feb 2021 14:00:16 GMT, Evan Whelan wrote: >> Marked as reviewed by dfuchs (Reviewer). > > Thanks for the feedback Daniel! As I've already posted the integrate command, > I believe all this needs now is a sponsor :) Oops, never mind I've to re-issue the command - PR:

Re: RFR: 8258444: Clean up specifications of java.io.Reader.read(char[], int, int) in subclass overrides

2021-02-23 Thread Brian Burkhalter
On Tue, 23 Feb 2021 16:23:10 GMT, Alan Bateman wrote: >> src/java.base/share/classes/java/io/InputStreamReader.java line 167: >> >>> 165: * {@inheritDoc} >>> 166: */ >>> 167: public int read(char[] cbuf, int off, int len) throws IOException { >> >> IOOBE is unchecked, are you

Re: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v25]

2021-02-23 Thread Jim Laskey
> This PR is to introduce a new random number API for the JDK. The primary API > is found in RandomGenerator and RandomGeneratorFactory. Further description > can be found in the JEP https://openjdk.java.net/jeps/356 . > > javadoc can be found at >

Re: RFR: 6323374: (coll) Optimize Collections.unmodifiable* and synchronized* [v4]

2021-02-23 Thread Ian Graves
On Tue, 23 Feb 2021 16:18:29 GMT, Claes Redestad wrote: > > Is there any behavior change here that merits a CSR review? > > Maybe. The one observable change is that calling `Collections.bar(foo)` with > a `foo` that is already a `bar` will return the instance rather than > unnecessarily wrap

Re: RFR: 8258444: Clean up specifications of java.io.Reader.read(char[], int, int) in subclass overrides

2021-02-23 Thread Alan Bateman
On Tue, 23 Feb 2021 16:19:41 GMT, Brian Burkhalter wrote: >> src/java.base/share/classes/java/io/InputStreamReader.java line 167: >> >>> 165: * {@inheritDoc} >>> 166: */ >>> 167: public int read(char[] cbuf, int off, int len) throws IOException { >> >> IOOBE is unchecked, are you

Re: RFR: 8258444: Clean up specifications of java.io.Reader.read(char[], int, int) in subclass overrides

2021-02-23 Thread Brian Burkhalter
On Tue, 23 Feb 2021 08:48:16 GMT, Alan Bateman wrote: >> 8258444: Clean up specifications of java.io.Reader.read(char[],int,int) in >> subclass overrides > > src/java.base/share/classes/java/io/InputStreamReader.java line 167: > >> 165: * {@inheritDoc} >> 166: */ >> 167: public

Re: RFR: 6323374: (coll) Optimize Collections.unmodifiable* and synchronized* [v4]

2021-02-23 Thread Claes Redestad
On Tue, 23 Feb 2021 06:12:54 GMT, Joe Darcy wrote: > Is there any behavior change here that merits a CSR review? Maybe. The one observable change is that calling `Collections.bar(foo)` with a `foo` that is already a `bar` will return the instance rather than unnecessarily wrap it. This could

Re: RFR: JDK-8262199: TOCTOU in jli args.c [v2]

2021-02-23 Thread Matthias Baesken
> Sonar reports a finding in args.c, where a file check is done . > Stat performs a check on file, and later fopen is called on the file : > https://sonarcloud.io/project/issues?id=shipilev_jdk=c=AXck8CL0BBG2CXpcnhtM=false=VULNERABILITY > > The coding could be slightly rewritten so that the

Re: RFR: JDK-8262199: TOCTOU in jli args.c [v2]

2021-02-23 Thread Christoph Langer
On Tue, 23 Feb 2021 14:30:17 GMT, Matthias Baesken wrote: >> Sonar reports a finding in args.c, where a file check is done . >> Stat performs a check on file, and later fopen is called on the file : >>

Re: RFR: JDK-8262199: TOCTOU in jli args.c [v2]

2021-02-23 Thread Christoph Langer
On Tue, 23 Feb 2021 14:23:59 GMT, Matthias Baesken wrote: > > This looks good in general. Do you know whether there's a jtreg test that > > stresses arg files? > > There are tests dealing with args files at test/jdk/tools/launcher/ , e.g. > there is test/jdk/tools/launcher/ArgsFileTest.java .

Re: RFR: JDK-8262199: TOCTOU in jli args.c

2021-02-23 Thread Matthias Baesken
On Tue, 23 Feb 2021 14:05:15 GMT, Christoph Langer wrote: > This looks good in general. Do you know whether there's a jtreg test that > stresses arg files? There are tests dealing with args files at test/jdk/tools/launcher/ , e.g. there is test/jdk/tools/launcher/ArgsFileTest.java . Best

Re: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v24]

2021-02-23 Thread Jim Laskey
> This PR is to introduce a new random number API for the JDK. The primary API > is found in RandomGenerator and RandomGeneratorFactory. Further description > can be found in the JEP https://openjdk.java.net/jeps/356 . > > javadoc can be found at >

Re: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v23]

2021-02-23 Thread Jim Laskey
> This PR is to introduce a new random number API for the JDK. The primary API > is found in RandomGenerator and RandomGeneratorFactory. Further description > can be found in the JEP https://openjdk.java.net/jeps/356 . > > javadoc can be found at >

Re: RFR: JDK-8262199: TOCTOU in jli args.c

2021-02-23 Thread Christoph Langer
On Tue, 23 Feb 2021 13:58:03 GMT, Matthias Baesken wrote: > Sonar reports a finding in args.c, where a file check is done . > Stat performs a check on file, and later fopen is called on the file : > https://sonarcloud.io/project/issues?id=shipilev_jdk=c=AXck8CL0BBG2CXpcnhtM=false=VULNERABILITY >

RFR: JDK-8262199: TOCTOU in jli args.c

2021-02-23 Thread Matthias Baesken
Sonar reports a finding in args.c, where a file check is done . Stat performs a check on file, and later fopen is called on the file : https://sonarcloud.io/project/issues?id=shipilev_jdk=c=AXck8CL0BBG2CXpcnhtM=false=VULNERABILITY The coding could be slightly rewritten so that the potential

Re: RFR: 8252883: AccessDeniedException caused by delayed file deletion on Windows [v7]

2021-02-23 Thread Evan Whelan
On Tue, 23 Feb 2021 13:08:29 GMT, Daniel Fuchs wrote: >> Evan Whelan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed copyright year in FileHandlerAccessTest.java > > Marked as reviewed by dfuchs (Reviewer). Thanks for the

RE: Fast and cheap (Double|Float)::toString Java algorithm

2021-02-23 Thread Andrey Turbanov
>The last implementation is available in pre-Skara webrev form, as referenced >in [2] Hope to see it as a github review soon! Andrey Turbanov

Re: RFR: 8252883: AccessDeniedException caused by delayed file deletion on Windows [v7]

2021-02-23 Thread Daniel Fuchs
On Tue, 23 Feb 2021 12:15:08 GMT, Evan Whelan wrote: >> Hi, >> >> Please review this fix for JDK-8252883. This handles the case when an >> AccessDeniedException is being thrown on Windows, due to a delay in deleting >> the lock file it is trying to write to. >> >> This fix passes all

Re: RFR: 8252883: AccessDeniedException caused by delayed file deletion on Windows [v5]

2021-02-23 Thread Daniel Fuchs
On Tue, 23 Feb 2021 12:10:30 GMT, Evan Whelan wrote: >> Does the new version of the test still occasionally catches the issue and >> fails if the fix is not present? > > Hi, locally this test reproduces the issue on my Windows machine. > > I believe our internal testing Windows boxes are too

Re: RFR: 8252883: AccessDeniedException caused by delayed file deletion on Windows [v5]

2021-02-23 Thread Evan Whelan
On Tue, 23 Feb 2021 10:16:26 GMT, Daniel Fuchs wrote: >> Hi, >> >> I've removed the problematic "process" handling logic and have stripped the >> test back to only use threads. >> >> The problem was reproducible (intermittently on my Windows machine) using >> this smaller test and should

Re: RFR: 8252883: AccessDeniedException caused by delayed file deletion on Windows [v7]

2021-02-23 Thread Evan Whelan
> Hi, > > Please review this fix for JDK-8252883. This handles the case when an > AccessDeniedException is being thrown on Windows, due to a delay in deleting > the lock file it is trying to write to. > > This fix passes all testing. > > Kind regards, > Evan Evan Whelan has updated the pull

Re: RFR: 8252883: AccessDeniedException caused by delayed file deletion on Windows [v6]

2021-02-23 Thread Evan Whelan
On Tue, 23 Feb 2021 10:14:07 GMT, Daniel Fuchs wrote: >> Evan Whelan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8252883: Stripped back FileHandlerAccessTest to only use threads > >

Re: RFR: 8259267: Refactor LoaderLeak shell test as java test. [v11]

2021-02-23 Thread Daniel Fuchs
On Mon, 22 Feb 2021 20:35:19 GMT, Ivan Šipka wrote: >> Refactor `test/jdk/java/lang/annotation/loaderLeak/LoaderLeak.sh` as java >> test. > > Ivan Šipka has updated the pull request incrementally with one additional > commit since the last revision: > > 8166026: Refactor java/lang shell

Re: RFR: 8252883: AccessDeniedException caused by delayed file deletion on Windows [v6]

2021-02-23 Thread Daniel Fuchs
On Mon, 22 Feb 2021 09:50:06 GMT, Evan Whelan wrote: >> Hi, >> >> Please review this fix for JDK-8252883. This handles the case when an >> AccessDeniedException is being thrown on Windows, due to a delay in deleting >> the lock file it is trying to write to. >> >> This fix passes all

Re: RFR: 8252883: AccessDeniedException caused by delayed file deletion on Windows [v5]

2021-02-23 Thread Daniel Fuchs
On Mon, 22 Feb 2021 09:46:56 GMT, Evan Whelan wrote: >> I'm seeing some intermittent test failures with the new test (after merging >> in latest master changes). Can you retest and have a look: >> >> --System.out:(25/1343)-- >> Testing with arguments: type=process, count=20 >>

Re: RFR: 8261919: java/util/Locale/LocaleProvidersRun.java failed with "RuntimeException: Expected log was not emitted. LogRecord: null"

2021-02-23 Thread Daniel Fuchs
On Tue, 23 Feb 2021 02:09:01 GMT, Naoto Sato wrote: > Please review the fix to this test case failure that occurs with the usage > tracker enabled JRE. test/jdk/java/util/Locale/LocaleProviders.java line 416: > 414: // Set the root logger on loading the logging class > 415: public

Re: RFR: 8258444: Clean up specifications of java.io.Reader.read(char[], int, int) in subclass overrides

2021-02-23 Thread Alan Bateman
On Mon, 22 Feb 2021 23:27:19 GMT, Brian Burkhalter wrote: > 8258444: Clean up specifications of java.io.Reader.read(char[],int,int) in > subclass overrides Marked as reviewed by alanb (Reviewer). src/java.base/share/classes/java/io/InputStreamReader.java line 167: > 165: * {@inheritDoc}