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

2021-02-16 Thread David Holmes
On Tue, 16 Feb 2021 21:15:58 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: 8261851: update ReflectionCallerCacheTest.java test to use ForceGC from test library

2021-02-16 Thread Alan Bateman
On Tue, 16 Feb 2021 22:27:12 GMT, Mandy Chung wrote: > Update test/jdk/java/lang/reflect/callerCache/ReflectionCallerCacheTest.java > to use ForceGC from test library which has additional instrumentation to > diagnose problem. In addition, this will get the fix for JDK-8258007. Marked as

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

2021-02-16 Thread liach
On Tue, 16 Feb 2021 23:18:55 GMT, Claes Redestad wrote: >> Modify the `unmodifiable*` methods in `java.util.Collections` to be >> idempotent. That is, when given an immutable collection from >> `java.util.ImmutableCollections` or `java.util.Collections`, these methods >> will return the

Integrated: 8261123: Augment discussion of equivalence classes in Object.equals and comparison methods

2021-02-16 Thread Joe Darcy
On Tue, 9 Feb 2021 06:42:26 GMT, Joe Darcy wrote: > A follow-up of sorts to JDK-8257086, this change aims to improve the > discussion of the relationship between Object.equals and compareTo and > compare methods. The not-consistent-with-equals natural ordering of > BigDecimal get more

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

2021-02-16 Thread Michael Hixson
On Tue, 16 Feb 2021 21:57:43 GMT, Ian Graves wrote: > Modify the `unmodifiable*` methods in `java.util.Collections` to be > idempotent. That is, when given an immutable collection from > `java.util.ImmutableCollections` or `java.util.Collections`, these methods > will return the reference

Re: RFR: 8261123: Augment discussion of equivalence classes in Object.equals and comparison methods [v8]

2021-02-16 Thread Joe Darcy
> A follow-up of sorts to JDK-8257086, this change aims to improve the > discussion of the relationship between Object.equals and compareTo and > compare methods. The not-consistent-with-equals natural ordering of > BigDecimal get more explication too. While updating Object, I added some uses

Re: RFR: 8261123: Augment discussion of equivalence classes in Object.equals and comparison methods [v6]

2021-02-16 Thread Joe Darcy
On Fri, 12 Feb 2021 23:31:04 GMT, Stuart Marks wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix typo. > > src/java.base/share/classes/java/math/BigDecimal.java line 99: > >> 97: * hold. The results of methods

Re: RFR: 8261123: Augment discussion of equivalence classes in Object.equals and comparison methods [v7]

2021-02-16 Thread Joe Darcy
> A follow-up of sorts to JDK-8257086, this change aims to improve the > discussion of the relationship between Object.equals and compareTo and > compare methods. The not-consistent-with-equals natural ordering of > BigDecimal get more explication too. While updating Object, I added some uses

Re: RFR: 4926314: Optimize Reader.read(CharBuffer) [v7]

2021-02-16 Thread Brian Burkhalter
On Fri, 12 Feb 2021 09:18:10 GMT, Philippe Marschall wrote: >> Implement three optimiztations for Reader.read(CharBuffer) >> >> * Add a code path for heap buffers in Reader#read to use the backing array >> instead of allocating a new one. >> * Change the code path for direct buffers in

Re: RFR: 4926314: Optimize Reader.read(CharBuffer)

2021-02-16 Thread Brian Burkhalter
On Tue, 5 Jan 2021 00:48:54 GMT, Brian Burkhalter wrote: >> A couple of implementation notes: >> >> Reader#read(CharBuffer) >> >> on-heap case >> >> I introduced a dedicated path for the on-heap case and directly read into >> the backing array. This completely avoids the intermediate

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

2021-02-16 Thread Claes Redestad
On Tue, 16 Feb 2021 21:57:43 GMT, Ian Graves wrote: > Modify the `unmodifiable*` methods in `java.util.Collections` to be > idempotent. That is, when given an immutable collection from > `java.util.ImmutableCollections` or `java.util.Collections`, these methods > will return the reference

RFR: 8261851: update ReflectionCallerCacheTest.java test to use ForceGC from test library

2021-02-16 Thread Mandy Chung
Update test/jdk/java/lang/reflect/callerCache/ReflectionCallerCacheTest.java to use ForceGC from test library which has additional instrumentation to diagnose problem. In addition, this will get the fix for JDK-8258007. - Commit messages: - fix copyright header update - update

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

2021-02-16 Thread Roger Riggs
On Tue, 16 Feb 2021 21:57:43 GMT, Ian Graves wrote: > Modify the `unmodifiable*` methods in `java.util.Collections` to be > idempotent. That is, when given an immutable collection from > `java.util.ImmutableCollections` or `java.util.Collections`, these methods > will return the reference

Re: RFR: 8261621: Delegate Unicode history from JLS to j.l.Character [v3]

2021-02-16 Thread Roger Riggs
On Tue, 16 Feb 2021 17:59:51 GMT, Naoto Sato wrote: >> Please review this doc fix to j.l.Character, which now includes the table of >> the history of supported Unicode versions. A corresponding CSR will be filed >> accordingly. > > Naoto Sato has updated the pull request with a new target base

RFR: 6323374: (coll) Optimize Collections.unmodifiable* and synchronized*

2021-02-16 Thread Ian Graves
Modify the `unmodifiable*` methods in `java.util.Collections` to be idempotent. That is, when given an immutable collection from `java.util.ImmutableCollections` or `java.util.Collections`, these methods will return the reference instead of creating a new immutable collection that wraps the

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

2021-02-16 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: System.getEnv(String name, String def)

2021-02-16 Thread Remi Forax
- Mail original - > De: "Michael Kuhlmann" > À: "core-libs-dev" > Envoyé: Mardi 16 Février 2021 13:34:30 > Objet: Re: System.getEnv(String name, String def) > Hi Rémi, > > I don't want to be pedantic, but I see this as an anti-pattern. You > would create an Optional just to immediately

Re: RFR: 8261744: Implement CharsetDecoder ASCII and latin-1 fast-paths [v3]

2021-02-16 Thread Claes Redestad
> This patch exposes a couple of intrinsics used by String to speed up ASCII > checking and byte[] -> char[] inflation, which can be used by latin1 and > ASCII-compatible CharsetDecoders to speed up decoding operations. > > - Fast-path implemented for all standard charsets, with up to 10x

Re: RFR: 8261744: Implement CharsetDecoder ASCII and latin-1 fast-paths [v2]

2021-02-16 Thread Claes Redestad
On Tue, 16 Feb 2021 19:48:09 GMT, Naoto Sato wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Revert rem assertions > > src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 48: > >> 46:

Re: RFR: 8261744: Implement CharsetDecoder ASCII and latin-1 fast-paths [v2]

2021-02-16 Thread Naoto Sato
On Mon, 15 Feb 2021 15:19:01 GMT, Claes Redestad wrote: >> This patch exposes a couple of intrinsics used by String to speed up ASCII >> checking and byte[] -> char[] inflation, which can be used by latin1 and >> ASCII-compatible CharsetDecoders to speed up decoding operations. >> >> -

Re: RFR: 8080272 Refactor I/O stream copying to use InputStream.transferTo/readAllBytes and Files.copy [v12]

2021-02-16 Thread Andrey Turbanov
> 8080272 Refactor I/O stream copying to use > InputStream.transferTo/readAllBytes and Files.copy Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8080272: Refactor I/O stream copying to use java.io.InputStream.transferTo

Re: RFR: 8080272 Refactor I/O stream copying to use InputStream.transferTo/readAllBytes and Files.copy [v9]

2021-02-16 Thread Andrey Turbanov
On Tue, 9 Feb 2021 11:40:09 GMT, Philippe Marschall wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8080272: Refactor I/O stream copying to use java.io.InputStream.transferTo >> fix review comments > >

Re: RFR: 8080272 Refactor I/O stream copying to use InputStream.transferTo/readAllBytes and Files.copy [v9]

2021-02-16 Thread Andrey Turbanov
On Mon, 8 Feb 2021 21:18:44 GMT, Philippe Marschall wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8080272: Refactor I/O stream copying to use java.io.InputStream.transferTo >> fix review comments > >

Re: RFR: 8261621: Delegate Unicode history from JLS to j.l.Character [v3]

2021-02-16 Thread Naoto Sato
> Please review this doc fix to j.l.Character, which now includes the table of > the history of supported Unicode versions. A corresponding CSR will be filed > accordingly. Naoto Sato has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains

Re: RFR: JDK-8260858: Implementation specific property xsltcIsStandalone for XSLTC Serializer

2021-02-16 Thread Naoto Sato
On Sat, 13 Feb 2021 00:16:50 GMT, Joe Wang wrote: > Adds a property similar to 'isStandalone' in JDK-8249867. > > Please note that the test received an auto-format. The material changes were > the two tests marked with bug id 8260858 and related data and methods. Marked as reviewed by naoto

Re: RFR: JDK-8260858: Implementation specific property xsltcIsStandalone for XSLTC Serializer

2021-02-16 Thread Naoto Sato
On Tue, 16 Feb 2021 17:23:35 GMT, Joe Wang wrote: >> test/jaxp/javax/xml/jaxp/unittest/common/prettyprint/PrettyPrintTest.java >> line 107: >> >>> 105: + "\n" >>> 106: + ""; >>> 107: >> >> Could be better to use text blocks? > > In general, we're keeping it at source

Re: RFR: JDK-8260858: Implementation specific property xsltcIsStandalone for XSLTC Serializer

2021-02-16 Thread Joe Wang
On Sun, 14 Feb 2021 21:27:49 GMT, Naoto Sato wrote: >> Adds a property similar to 'isStandalone' in JDK-8249867. >> >> Please note that the test received an auto-format. The material changes were >> the two tests marked with bug id 8260858 and related data and methods. > >

Re: RFR: 8080272 Refactor I/O stream copying to use InputStream.transferTo/readAllBytes and Files.copy

2021-02-16 Thread Julia Boes
On Sun, 20 Dec 2020 17:05:21 GMT, Andrey Turbanov wrote: > 8080272 Refactor I/O stream copying to use > InputStream.transferTo/readAllBytes and Files.copy Hi @turbanoff, I'm happy to sponsor but I see two comments by @marschall - have they been addressed?

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

2021-02-16 Thread Evan Whelan
On Tue, 16 Feb 2021 11:48:05 GMT, Daniel Fuchs wrote: >> Evan Whelan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8252883: Doc cleanup, code formatting and throwing exceptions instead of >> catching > >

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

2021-02-16 Thread Evan Whelan
On Tue, 16 Feb 2021 11:33:08 GMT, Daniel Fuchs wrote: >> Evan Whelan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8252883: Doc cleanup, code formatting and throwing exceptions instead of >> catching > >

Re: RFR: 8261123: Augment discussion of equivalence classes in Object.equals and comparison methods [v6]

2021-02-16 Thread Roger Riggs
On Fri, 12 Feb 2021 22:52:06 GMT, Joe Darcy wrote: >> A follow-up of sorts to JDK-8257086, this change aims to improve the >> discussion of the relationship between Object.equals and compareTo and >> compare methods. The not-consistent-with-equals natural ordering of >> BigDecimal get more

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

2021-02-16 Thread Jim Laskey
On Tue, 16 Feb 2021 15:54:08 GMT, Rémi Forax wrote: >> The interface method is a default method, so not technically an override. > > It's not an override but @Override has a broader semantics than just > overriding an existing method. > Given that it helps to understand that this method is

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

2021-02-16 Thread Rémi Forax
On Tue, 16 Feb 2021 14:03:56 GMT, Jim Laskey wrote: >> src/java.base/share/classes/jdk/internal/util/random/RandomSupport.java line >> 1548: >> >>> 1546: * @return a stream of (pseudo)randomly chosen {@code int} >>> values >>> 1547: */ >>> 1548: >> >> Is `@Override`

Re: RFR: 8261744: Implement CharsetDecoder ASCII and latin-1 fast-paths

2021-02-16 Thread Claes Redestad
On Tue, 16 Feb 2021 15:05:33 GMT, Alan Bateman wrote: > The reformatting changes to StreamEncoder/StreamDecoder make it hard to see > if there are any actual changes. Is there anything we should look at? It's > okay to include this cleanup, I can't tell what happened with this source > file.

Re: RFR: 8261744: Implement CharsetDecoder ASCII and latin-1 fast-paths

2021-02-16 Thread Claes Redestad
On Tue, 16 Feb 2021 15:05:33 GMT, Alan Bateman wrote: >>> > Is there a reason >>> > `sun.nio.cs.ISO_8859_1.Encoder#implEncodeISOArray(char[], int, byte[], >>> > int, int)` wasn't moved to `JavaLangAccess` as well? >>> >>> Exposing StringUTF16.compress for Latin-1 and ASCII-compatible encoders

Re: RFR: 8261744: Implement CharsetDecoder ASCII and latin-1 fast-paths

2021-02-16 Thread Alan Bateman
On Tue, 16 Feb 2021 13:45:41 GMT, Claes Redestad wrote: >>> Is there a reason `sun.nio.cs.ISO_8859_1.Encoder#implEncodeISOArray(char[], >>> int, byte[], int, int)` wasn't moved to `JavaLangAccess` as well? >> >> Exposing StringUTF16.compress for Latin-1 and ASCII-compatible encoders seem >>

Re: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v10]

2021-02-16 Thread Vladimir Kempik
On Thu, 4 Feb 2021 22:49:23 GMT, Gerard Ziemski wrote: >> Anton Kozlov has updated the pull request incrementally with six additional >> commits since the last revision: >> >> - Merge remote-tracking branch 'origin/jdk/jdk-macos' into jdk-macos >> - Add comments to WX transitions >> >>

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

2021-02-16 Thread Jim Laskey
On Sat, 13 Feb 2021 15:03:53 GMT, Andrey Turbanov wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Added table of available algorithms. > > src/java.base/share/classes/java/util/Random.java line 29: > >> 27: >>

Re: RFR: 8261744: Implement CharsetDecoder ASCII and latin-1 fast-paths

2021-02-16 Thread Claes Redestad
On Mon, 15 Feb 2021 20:34:53 GMT, Claes Redestad wrote: > > Is there a reason `sun.nio.cs.ISO_8859_1.Encoder#implEncodeISOArray(char[], > > int, byte[], int, int)` wasn't moved to `JavaLangAccess` as well? > > Exposing StringUTF16.compress for Latin-1 and ASCII-compatible encoders seem > very

Re: RFR: 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702 [v3]

2021-02-16 Thread Christoph Langer
> After the fix for JDK-8253702, the test java/lang/System/OsVersionTest.java > still fails on BigSur versions that have a patch version (> 1), e.g. on macOS > Big Sur 11.2.1, and where the JDK was built with xcode < 12. > > java.lang.Error: 11.2 != 11.2.1 > > This is a proposal to relax the

Integrated: 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702

2021-02-16 Thread Christoph Langer
On Mon, 15 Feb 2021 13:27:36 GMT, Christoph Langer wrote: > After the fix for JDK-8253702, the test java/lang/System/OsVersionTest.java > still fails on BigSur versions that have a patch version (> 1), e.g. on macOS > Big Sur 11.2.1, and where the JDK was built with xcode < 12. > >

Re: System.getEnv(String name, String def)

2021-02-16 Thread Michael Kuhlmann
Hi Rémi, I don't want to be pedantic, but I see this as an anti-pattern. You would create an Optional just to immediately call orElse() on it. That's not how Optional should be used. (But you know that.) It's described in Recipe 12 of this Java Magazine article, for instance:

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

2021-02-16 Thread Daniel Fuchs
On Tue, 16 Feb 2021 11:37:05 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 [v2]

2021-02-16 Thread Evan Whelan
On Tue, 16 Feb 2021 11:33: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 [v2]

2021-02-16 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 [v2]

2021-02-16 Thread Evan Whelan
On Mon, 15 Feb 2021 12:55:46 GMT, Daniel Fuchs wrote: >> Evan Whelan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8252883: Doc cleanup, code formatting and throwing exceptions instead of >> catching > >

Re: RFR: JDK-8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage

2021-02-16 Thread Alan Bateman
On Fri, 12 Feb 2021 11:02:36 GMT, Christoph Langer wrote: >> JDK-8261422: Adjust problematic String.format calls in >> jdk/internal/util/Preconditions.java outOfBoundsMessage > > As we're potentially formatting any "Number" type here, theoretically floats > could be passed which would result

Integrated: JDK-8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage

2021-02-16 Thread Matthias Baesken
On Tue, 9 Feb 2021 14:33:22 GMT, Matthias Baesken wrote: > JDK-8261422: Adjust problematic String.format calls in > jdk/internal/util/Preconditions.java outOfBoundsMessage This pull request has now been integrated. Changeset: 219b115e Author:Matthias Baesken URL: