Re: RFR: 8273682: Upgrade Jline to 3.20.0

2021-10-11 Thread Athijegannathan Sundararajan
On Thu, 23 Sep 2021 14:43:21 GMT, Jan Lahoda wrote: > I'd like to upgrade the internal JLine to 3.20.0, to support the rxvt > terminal (see JDK-8270943), and to generally use a newer version of the > library. This patch is basically a application of relevant parts of the diff > between JLine 3

Re: RFR: 8274879: Replace uses of StringBuffer with StringBuilder within java.base classes

2021-10-11 Thread Andrey Turbanov
On Thu, 7 Oct 2021 16:48:06 GMT, Naoto Sato wrote: >> StringBuffer is a legacy synchronized class. There are more modern >> alternatives which perform better: >> 1. Plain String concatenation should be preferred >> 2. StringBuilder is a direct replacement to StringBuffer which generally >> have

Re: RFR: 8275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE [v3]

2021-10-11 Thread Andrey Turbanov
> 8275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE avoid link in private javadoc - Changes: -

RFR: JDK-8274848: LambdaMetaFactory::metafactory on REF_invokeSpecial impl method has incorrect behavior

2021-10-11 Thread Mandy Chung
Classes compiled prior to the nestmate support will generate `REF_invokeSpecial` if the implementation method is a private instance method. Since a lambda proxy class is a hidden class, a nestmate of the host class, it can invoke the private implementation method but it has to use `REF_invoke

Re: RFR: 8275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE [v2]

2021-10-11 Thread Martin Buchholz
On Mon, 11 Oct 2021 18:52:07 GMT, Andrey Turbanov wrote: >> 8275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 275002: Remove unused AbstractStringBuilder.MAX_ARRA

Re: RFR: 8271737: Only normalize the cached user.dir property once

2021-10-11 Thread Paul Hohensee
On Thu, 7 Oct 2021 14:05:19 GMT, Evgeny Astigeevich wrote: > The change completes the fix of > [JDK-8198997](https://bugs.openjdk.java.net/browse/JDK-8198997) which has > added normalisation in a constructor but not removed it from the get method. Lgtm. - Marked as reviewed by p

Re: RFR: 8274412: Add a method to Stream API to consume and close the stream without using try-with-resources

2021-10-11 Thread Remi Forax
I agree with the idea of a try() syntax, but i don't think we need more interfaces. Yes, John is right about the fact that the TWR Aucloseable does not work well with checked exceptions, but the issue is more that there is nothing that works well with checked exceptions because Java has no way

Re: RFR: 8275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE [v2]

2021-10-11 Thread Pavel Rappo
On Mon, 11 Oct 2021 18:52:07 GMT, Andrey Turbanov wrote: >> 8275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 275002: Remove unused AbstractStringBuilder.MAX_ARRA

Re: RFR: 8275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE [v2]

2021-10-11 Thread Andrey Turbanov
> 8275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE update javadoc of 'newCapacity' method to refer ArraysSuppo

Re: RFR: 8275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE [v2]

2021-10-11 Thread Andrey Turbanov
On Sun, 10 Oct 2021 22:13:29 GMT, Sergey Bylokhov wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE >> update javadoc of 'newCapacity' method to refer

Re: RFR: 8274412: Add a method to Stream API to consume and close the stream without using try-with-resources

2021-10-11 Thread John Rose
So the purpose of TWR is to hold an object with a “close-debt” (debt of a future call to close) and pay it at the end of a block, sort of like C++ RAII (but also sort of not). But fluent syntaxes (which I like very much and hope to see more of in the future!) don’t play well with blocks, so if a f

Re: RFR: 8273111: Default timezone should return zone ID if /etc/localtime is valid but not canonicalization on linux [v2]

2021-10-11 Thread Naoto Sato
On Thu, 9 Sep 2021 08:25:44 GMT, Wu Yan wrote: >> Hi, >> Please help me review the change to enhance getting time zone ID from >> /etc/localtime on linux. >> >> We use `realpath` instead of `readlink` to obtain the link name of >> /etc/localtime, because `readlink` can only read the value of

Re: RFR: 8275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE

2021-10-11 Thread Martin Buchholz
On Sat, 9 Oct 2021 17:54:16 GMT, Andrey Turbanov wrote: > 8275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE JDK sources should not contain dead unused fields - thanks for fixing. The change to use newLength in this file should have adjusted the javadoc of newCapacity, perhaps simply

Re: RFR: 8274412: Add a method to Stream API to consume and close the stream without using try-with-resources

2021-10-11 Thread Paul Sandoz
Hi Tagir, Do you mind if we slow down on this and let the idea bake somewhat, captured in this thread/issue/PR(draft). I am always a little wary of compact-only or fluent-only methods, as I find them harder to justify. In this case I think there might be something more with regards to a patter

Re: RFR: 8193682: Infinite loop in ZipOutputStream.close() [v2]

2021-10-11 Thread Ravi Reddy
On Mon, 11 Oct 2021 13:42:35 GMT, Ravi Reddy wrote: >> Hi all, >> >> Please review this fix for Infinite loop in ZipOutputStream.close(). >> The main issue here is when ever there is an exception during close >> operations on GZip we are not setting the deflator to a finished state which >> is

Re: RFR: 8193682: Infinite loop in ZipOutputStream.close() [v2]

2021-10-11 Thread Ravi Reddy
> Hi all, > > Please review this fix for Infinite loop in ZipOutputStream.close(). > The main issue here is when ever there is an exception during close > operations on GZip we are not setting the deflator to a finished state which > is leading to an infinite loop when we try writing on the same

Re: RFR: 8177814: jdk/editpad is not in jdk TEST.groups

2021-10-11 Thread Aleksey Shipilev
On Thu, 23 Sep 2021 08:54:48 GMT, Aleksey Shipilev wrote: > @prrace notices this here: > https://github.com/openjdk/jdk/pull/5544#issuecomment-925396869. And I think > it is the already open issue that this patch is fixing. While the original > patch added the test in `jdk_other`, Phil suggest

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v2]

2021-10-11 Thread Raffaello Giulietti
On Fri, 16 Apr 2021 11:30:32 GMT, Raffaello Giulietti wrote: >> Hello, >> >> here's a PR for a patch submitted on March 2020 >> [1](https://cr.openjdk.java.net/~bpb/4511638/webrev.04/) when Mercurial was >> a thing. >> >> The patch has been edited to adhere to OpenJDK code conventions about