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

2021-02-18 Thread Alan Bateman
On Thu, 18 Feb 2021 23:16:54 GMT, Claes Redestad wrote: > Turns out the native code called by `SystemProps.initProperties();` can > initialize a `CharsetDecoder` if `sun.jnu.encoding` is set to certain values, > and this tripped up the initialization to cause `getJavaLangAccess` to be >

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

2021-02-18 Thread Alan Bateman
On Thu, 18 Feb 2021 20:35:10 GMT, Brian Burkhalter wrote: >> src/java.base/share/classes/java/io/Reader.java line 221: >> >>> 219: // if the last call to read returned -1 or the >>> number of bytes >>> 220: // requested have been read then break >>> 221:

Integrated: JDK-8260858: Implementation specific property xsltcIsStandalone for XSLTC Serializer

2021-02-18 Thread Joe Wang
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. This pull request has now

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

2021-02-18 Thread Éamonn McManus
I think System.getenv().getOrDefault(key, def) is already an adequate solution. On Thu, 18 Feb 2021 at 09:21, Loïc MATHIEU wrote: > Hi, > > Thanks for your replies. > > My point here was that using env variables is more and more common to > configure apps, and they have less convenient support

Re: RFR: 8261938: ASN1Formatter.annotate should not return in the finally block [v2]

2021-02-18 Thread Jie Fu
On Fri, 19 Feb 2021 01:56:19 GMT, Roger Riggs wrote: > The formattters are a test component used both standalone and in the context > of the HexPrinter test utilities. > In typical use, the stream is a wrapped byte array, so there are no > exceptions other than EOF. > The choice of

Re: RFR: 8261938: ASN1Formatter.annotate should not return in the finally block [v3]

2021-02-18 Thread Jie Fu
> Hi all, > > ASN1Formatter.annotate should be able to throw an IOException according to > this comment [1]. > But it fails to do so due to the return [2] in the finally block, which would > swallow the IOException. > > Generally, it seems not good to put a return statement in a finally block

Re: RFR: 8261938: ASN1Formatter.annotate should not return in the finally block [v2]

2021-02-18 Thread Roger Riggs
On Thu, 18 Feb 2021 23:41:08 GMT, Jie Fu wrote: >> An EOFException can occur during the call to annotate() and must return the >> accumulated contents of the StringBuffer. Otherwise it is discarded. > > Thanks @RogerRiggs for your review. > > Just want to make sure: > > 1. AFAIK, for a

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

2021-02-18 Thread liach
On Thu, 18 Feb 2021 16:18:42 GMT, jmehrens wrote: >> Yes -- I think in response to this it makes more sense to pull the >> `ImmutableCollections` classes out for now and only focus on the wrapping of >> the classes within `Collections` so we aren't blocked by studying and >> rectifying these

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

2021-02-18 Thread jmehrens
On Wed, 17 Feb 2021 19:12:19 GMT, Ian Graves wrote: >> This raises some interesting issues and makes me wonder if we should allow a >> single-wrap of the `ImmutableCollections` classes for now to make this less >> onerous. > > Yes -- I think in response to this it makes more sense to pull the

Re: RFR: 8261938: ASN1Formatter.annotate should not return in the finally block [v2]

2021-02-18 Thread Jie Fu
On Thu, 18 Feb 2021 14:53:17 GMT, Roger Riggs wrote: >> Jie Fu has updated the pull request incrementally with one additional commit >> since the last revision: >> >> Update the copyright year > > An EOFException can occur during the call to annotate() and must return the > accumulated

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

2021-02-18 Thread Claes Redestad
On Wed, 17 Feb 2021 17:19:58 GMT, Alan Bateman wrote: > > Right, I'm not exactly sure why the more limited changes I attempted in > > [5f4e87f](https://github.com/openjdk/jdk/commit/5f4e87f50f49e64b8616063c176ea35632b0347e) > > failed. In that change I simply changed the initialization order,

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

2021-02-18 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

Integrated: 8261977: Fix comment for getPrefixed() in canonicalize_md.c

2021-02-18 Thread Alexey Semenyuk
On Thu, 18 Feb 2021 19:35:09 GMT, Alexey Semenyuk wrote: > Follow up for JDK-8235397 fix This pull request has now been integrated. Changeset: 0c31d5b9 Author:Alexey Semenyuk URL: https://git.openjdk.java.net/jdk/commit/0c31d5b9 Stats: 5 lines in 1 file changed: 0 ins; 4 del; 1

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

2021-02-18 Thread Brian Burkhalter
On Wed, 17 Feb 2021 15:37:11 GMT, Alan Bateman wrote: >> Philippe Marschall has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Replace c-style array declarations >> - Share work buffer between #skip and #read > >

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

2021-02-18 Thread Philippe Marschall
On Wed, 17 Feb 2021 15:37:11 GMT, Alan Bateman wrote: >> Philippe Marschall has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Replace c-style array declarations >> - Share work buffer between #skip and #read > >

Re: RFR: 8148937: (str) Adapt StringJoiner for Compact Strings

2021-02-18 Thread Сергей Цыпанов
On Thu, 18 Feb 2021 15:19:43 GMT, Claes Redestad wrote: >> Hello, >> >> as of now `java.util.StringJoiner` still uses `char[]` as a storage for >> joined Strings. >> >> This applies for the cases when all joined Strings as well as delimiter, >> prefix and suffix contain only ASCII symbols.

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

2021-02-18 Thread Philippe Marschall
On Wed, 17 Feb 2021 17:22:21 GMT, Alan Bateman wrote: >>> Right, I'm not exactly sure why the more limited changes I attempted in >>> [5f4e87f](https://github.com/openjdk/jdk/commit/5f4e87f50f49e64b8616063c176ea35632b0347e) >>> failed. In that change I simply changed the initialization order,

Re: RFR: 8261977: Fix comment for getPrefixed() in canonicalize_md.c

2021-02-18 Thread Alan Bateman
On Thu, 18 Feb 2021 19:35:09 GMT, Alexey Semenyuk wrote: > Follow up for JDK-8235397 fix Thanks for this, it means we can move this code to the right place in the future. - Marked as reviewed by alanb (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/2631

Re: RFR: 8261483: jdk/dynalink/TypeConverterFactoryMemoryLeakTest.java failed with "AssertionError: Should have GCd a method handle by now"

2021-02-18 Thread Attila Szegedi
On Wed, 17 Feb 2021 19:44:35 GMT, Attila Szegedi wrote: > 8261483: jdk/dynalink/TypeConverterFactoryMemoryLeakTest.java failed with > "AssertionError: Should have GCd a method handle by now" @plevart can I bother you for a follow-up review of my original issue? (Alternatively, @shipilev?)

RFR: 8261977: Fix comment for getPrefixed() in canonicalize_md.c

2021-02-18 Thread Alexey Semenyuk
Follow up for JDK-8235397 fix - Commit messages: - Fix comment for getPrefixed() in canonicalize_md.c Changes: https://git.openjdk.java.net/jdk/pull/2631/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=2631=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261977

Re: RFR: 8261483: jdk/dynalink/TypeConverterFactoryMemoryLeakTest.java failed with "AssertionError: Should have GCd a method handle by now" [v2]

2021-02-18 Thread Attila Szegedi
> 8261483: jdk/dynalink/TypeConverterFactoryMemoryLeakTest.java failed with > "AssertionError: Should have GCd a method handle by now" Attila Szegedi has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to

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

2021-02-18 Thread Sean Mullan
On Mon, 15 Feb 2021 19:47:00 GMT, Andrey Turbanov wrote: >> 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:

Re: RFR: 6245663: (spec) File.renameTo(File) changes the file-system object, not the File instance [v4]

2021-02-18 Thread Roger Riggs
On Thu, 18 Feb 2021 17:34:04 GMT, Brian Burkhalter wrote: >> Please review this minor specification update to highlight that >> `File.renameTo(File)` does not modify the `File` instance on which the >> method is invoked. > > Brian Burkhalter has updated the pull request incrementally with one

Re: RFR: 6245663: (spec) File.renameTo(File) changes the file-system object, not the File instance [v4]

2021-02-18 Thread Alan Bateman
On Thu, 18 Feb 2021 17:34:04 GMT, Brian Burkhalter wrote: >> Please review this minor specification update to highlight that >> `File.renameTo(File)` does not modify the `File` instance on which the >> method is invoked. > > Brian Burkhalter has updated the pull request incrementally with one

Re: RFR: 8261940: Fix references to IOException in BigDecimal javadoc [v2]

2021-02-18 Thread Joe Darcy
> Noticed by some of Jon Gibbons's doc linting & checking tooling, this > changeset fixes two javadoc issues for BigDecimal's serialization-related > methods, improving the serial form page. Joe Darcy has updated the pull request incrementally with one additional commit since the last

Integrated: 8261940: Fix references to IOException in BigDecimal javadoc

2021-02-18 Thread Joe Darcy
On Thu, 18 Feb 2021 06:03:41 GMT, Joe Darcy wrote: > Noticed by some of Jon Gibbons's doc linting & checking tooling, this > changeset fixes two javadoc issues for BigDecimal's serialization-related > methods, improving the serial form page. This pull request has now been integrated.

Re: RFR: 8261940: Fix references to IOException in BigDecimal javadoc [v2]

2021-02-18 Thread Joe Darcy
On Thu, 18 Feb 2021 16:52:19 GMT, Brian Burkhalter wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Respond to review feedback. > > I concur with @AlanBateman about importing `IOException`. Will integrate using the

Re: RFR: 6245663: (spec) File.renameTo(File) changes the file-system object, not the File instance [v2]

2021-02-18 Thread Brian Burkhalter
On Thu, 18 Feb 2021 16:59:54 GMT, Alan Bateman wrote: >> Like so? >> --- a/src/java.base/share/classes/java/io/File.java >> +++ b/src/java.base/share/classes/java/io/File.java >> @@ -1376,7 +1376,9 @@ public class File >> * file from one filesystem to another, it might not be atomic, and

Re: RFR: 6245663: (spec) File.renameTo(File) changes the file-system object, not the File instance [v4]

2021-02-18 Thread Brian Burkhalter
> Please review this minor specification update to highlight that > `File.renameTo(File)` does not modify the `File` instance on which the method > is invoked. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 6245663: Simplify

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

2021-02-18 Thread Loïc MATHIEU
Hi, Thanks for your replies. My point here was that using env variables is more and more common to configure apps, and they have less convenient support than system properties (the other way to provide easy external configuration at launch time with key/value). I agree that

Re: RFR: 6245663: (spec) File.renameTo(File) changes the file-system object, not the File instance [v2]

2021-02-18 Thread Alan Bateman
On Thu, 18 Feb 2021 16:43:09 GMT, Brian Burkhalter wrote: >> It might be clearer if the end of the sentence were changed to something >> like "... this File object is not changed to name destination file or >> directory". > > Like so? > --- a/src/java.base/share/classes/java/io/File.java > +++

Re: RFR: 8261940: Fix references to IOException in BigDecimal javadoc

2021-02-18 Thread Brian Burkhalter
On Thu, 18 Feb 2021 06:03:41 GMT, Joe Darcy wrote: > Noticed by some of Jon Gibbons's doc linting & checking tooling, this > changeset fixes two javadoc issues for BigDecimal's serialization-related > methods, improving the serial form page. I concur with @AlanBateman about importing

Re: RFR: 6245663: (spec) File.renameTo(File) changes the file-system object, not the File instance [v2]

2021-02-18 Thread Brian Burkhalter
On Thu, 18 Feb 2021 09:24:06 GMT, Alan Bateman wrote: >> No, I intended `filesystem` but in the sense of "object in the filesystem" >> but it does seem awkward. > > It might be clearer if the end of the sentence were changed to something like > "... this File object is not changed to name

Re: RFR: 8261940: Fix references to IOException in BigDecimal javadoc

2021-02-18 Thread Iris Clark
On Thu, 18 Feb 2021 06:03:41 GMT, Joe Darcy wrote: > Noticed by some of Jon Gibbons's doc linting & checking tooling, this > changeset fixes two javadoc issues for BigDecimal's serialization-related > methods, improving the serial form page. Marked as reviewed by iris (Reviewer).

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

2021-02-18 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 [v19]

2021-02-18 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: 8148937: (str) Adapt StringJoiner for Compact Strings

2021-02-18 Thread Claes Redestad
On Thu, 18 Feb 2021 14:30:15 GMT, Сергей Цыпанов wrote: > Hello, > > as of now `java.util.StringJoiner` still uses `char[]` as a storage for > joined Strings. > > This applies for the cases when all joined Strings as well as delimiter, > prefix and suffix contain only ASCII symbols. > > As

Re: RFR: 8261728: SimpleDateFormat should link to DateTimeFormatter [v2]

2021-02-18 Thread Roger Riggs
On Wed, 17 Feb 2021 20:21:57 GMT, Naoto Sato wrote: >> Please review this simple doc fix. A CSR will be filed accordingly. > > Naoto Sato has updated the pull request incrementally with one additional > commit since the last revision: > > Made the additional text an @apiNote Marked as

Re: RFR: 8261938: ASN1Formatter.annotate should not return in the finally block [v2]

2021-02-18 Thread Roger Riggs
On Thu, 18 Feb 2021 02:46:53 GMT, Jie Fu wrote: >> Hi all, >> >> ASN1Formatter.annotate should be able to throw an IOException according to >> this comment [1]. >> But it fails to do so due to the return [2] in the finally block, which >> would swallow the IOException. >> >> Generally, it

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

2021-02-18 Thread Roger Riggs
On Thu, 18 Feb 2021 03:56:49 GMT, David Holmes wrote: >> The table is informative and should not be construed as specification. >> The wording "has supported" should be sufficient. > >> >> >> The table is informative and should not be construed as specification. >> The wording "has supported"

RFR: 8148937: (str) Adapt StringJoiner for Compact Strings

2021-02-18 Thread Сергей Цыпанов
Hello, as of now `java.util.StringJoiner` still uses `char[]` as a storage for joined Strings. This applies for the cases when all joined Strings as well as delimiter, prefix and suffix contain only ASCII symbols. As a result when `StringJoiner.toString()` is called `byte[]` stored in Strings

Re: RFR: 8261880: Change nested classes in java.base to static nested classes where possible [v2]

2021-02-18 Thread Chris Hegarty
On Wed, 17 Feb 2021 16:38:03 GMT, Сергей Цыпанов wrote: >> Non-static classes hold a link to their parent classes, which in many cases >> can be avoided. > > Сергей Цыпанов has updated the pull request incrementally with one additional > commit since the last revision: > > 8261880: Remove

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

2021-02-18 Thread Daniel Fuchs
On Wed, 17 Feb 2021 14:47:03 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: 8080272 Refactor I/O stream copying to use InputStream.transferTo/readAllBytes and Files.copy

2021-02-18 Thread Julia Boes
On Thu, 18 Feb 2021 07:12:34 GMT, Andrey Turbanov wrote: >> Hi @turbanoff, I'm happy to sponsor but I see two comments by @marschall - >> have they been addressed? >> https://github.com/openjdk/jdk/pull/1853#discussion_r572815422 >>

Re: RFR: 8261940: Fix references to IOException in BigDecimal javadoc

2021-02-18 Thread Chris Hegarty
On Thu, 18 Feb 2021 06:03:41 GMT, Joe Darcy wrote: > Noticed by some of Jon Gibbons's doc linting & checking tooling, this > changeset fixes two javadoc issues for BigDecimal's serialization-related > methods, improving the serial form page. Marked as reviewed by chegar (Reviewer).

Re: RFR: 6245663: (spec) File.renameTo(File) changes the file-system object, not the File instance [v2]

2021-02-18 Thread Alan Bateman
On Wed, 17 Feb 2021 22:28:11 GMT, Brian Burkhalter wrote: >> src/java.base/share/classes/java/io/File.java line 1381: >> >>> 1379: * that the rename operation was successful. As instances of >>> {@code File} >>> 1380: * are immutable, the abstract pathname represented by this >>>

Re: RFR: 8261940: Fix references to IOException in BigDecimal javadoc

2021-02-18 Thread Alan Bateman
On Thu, 18 Feb 2021 06:03:41 GMT, Joe Darcy wrote: > Noticed by some of Jon Gibbons's doc linting & checking tooling, this > changeset fixes two javadoc issues for BigDecimal's serialization-related > methods, improving the serial form page. Looks okay but it might be simpler to just import