Enhancement proposal regarding bufferization of InputStream

2021-04-15 Thread Сергей Цыпанов
Hello, buffering with j.i.BufferedInputStream is a handy way to improve performance of IO operations. However in many cases buffering is redundant. Consider this code snippet from Spring Framework: static ClassReader getClassReader(Resource rsc) throws Exception { try (var is = new BufferedInp

Re: Enhancement proposal regarding bufferization of InputStream

2021-04-15 Thread Pavel Rappo
> On 15 Apr 2021, at 08:33, Сергей Цыпанов wrote: > > Hello, > > buffering with j.i.BufferedInputStream is a handy way to improve performance > of IO operations. > However in many cases buffering is redundant. Consider this code snippet from > Spring Framework: > > static ClassReader getClas

Re: RFR: 8265237: String.join and StringJoiner can be improved further

2021-04-15 Thread Florent Guillaume
On Wed, 14 Apr 2021 22:23:57 GMT, Peter Levart wrote: >> src/java.base/share/classes/java/lang/String.java line 3230: >> >>> 3228: >>> 3229: /** >>> 3230: * Designated join routine. >> >> Did you mean "dedicated"? > > No, I meant designated. It is the routine that all other public API

Re: RFR: 8265137: java.util.Random suddenly has new public methods nowhere documented [v4]

2021-04-15 Thread Jim Laskey
> Move makeXXXSpilterator from public (@hidden) to protected. No API ch Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Move makeXXXSpliterator methods to RandomSupport - Changes: - all: https://git.openjdk.java.net/jdk/

Re: RFR: 8265137: java.util.Random suddenly has new public methods nowhere documented [v4]

2021-04-15 Thread Uwe Schindler
On Thu, 15 Apr 2021 12:01:07 GMT, Jim Laskey wrote: >> Move makeXXXSpilterator from public (@hidden) to protected. No API ch > > Jim Laskey has updated the pull request incrementally with one additional > commit since the last revision: > > Move makeXXXSpliterator methods to RandomSupport sr

Re: RFR: 8265137: java.util.Random suddenly has new public methods nowhere documented [v4]

2021-04-15 Thread Jim Laskey
On Thu, 15 Apr 2021 12:11:56 GMT, Uwe Schindler wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Move makeXXXSpliterator methods to RandomSupport > > src/java.base/share/classes/jdk/internal/util/random/RandomSupport.

Re: RFR: 4890732: GZIPOutputStream doesn't support optional GZIP fields [v5]

2021-04-15 Thread Lin Zang
> 4890732: GZIPOutputStream doesn't support optional GZIP fields Lin Zang has updated the pull request incrementally with one additional commit since the last revision: Use record and Builder pattern - Changes: - all: https://git.openjdk.java.net/jdk/pull/3072/files - new: ht

Re: RFR: 4890732: GZIPOutputStream doesn't support optional GZIP fields [v3]

2021-04-15 Thread Lin Zang
On Wed, 24 Mar 2021 10:25:44 GMT, Lance Andersen wrote: >> Lin Zang has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - update copyright >> - reuse arguments constructor for non-argument one. > > Hi Lin, > > On Mar 24, 2021, at 2:51 AM,

Re: RFR: 8265137: java.util.Random suddenly has new public methods nowhere documented [v5]

2021-04-15 Thread Jim Laskey
> Move makeXXXSpilterator from public (@hidden) to protected. No API ch Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Remove extraneous references to makeXXXSpliterator - Changes: - all: https://git.openjdk.java.net/jd

Re: RFR: 4890732: GZIPOutputStream doesn't support optional GZIP fields [v6]

2021-04-15 Thread Lin Zang
> 4890732: GZIPOutputStream doesn't support optional GZIP fields Lin Zang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains ten additional commits since t

RFR: 8265279: Remove unused RandomGeneratorFactory.all(Class category)

2021-04-15 Thread Jim Laskey
No longer needed - Commit messages: - RandomGeneratorFactory.all(Class category) no longer needed - Remove extraneous references to makeXXXSpliterator - Move makeXXXSpliterator methods to RandomSupport - change static final from 'proxy' to 'PROXY' - Make makeXXXSpliterator final

Re: Enhancement proposal regarding bufferization of InputStream

2021-04-15 Thread Roger Riggs
Hi Sergey, Are you taking into account that for many reads the data is not copied into the local buffer. See the comments in BufferedInputStream.read1: 277:280? How much is the slowdown, when BufferedInputStreams are chained? Thanks, Roger On 4/15/21 7:08 AM, Pavel Rappo wrote: On 15 Apr 20

Integrated: 8048199: Replace anonymous inner classes with lambdas, where applicable, in JNDI

2021-04-15 Thread Conor Cleary
On Fri, 9 Apr 2021 13:15:16 GMT, Conor Cleary wrote: > ### Description > This fix is part of a previous effort to both cleanup/modernise JNDI code, > the details of which can be seen in > [JDK-8048091](https://bugs.openjdk.java.net/browse/JDK-8048091). A number > JNDI methods under `java.namin

Re: RFR: 8264208: Console charset API [v8]

2021-04-15 Thread Alan Bateman
On Wed, 14 Apr 2021 17:17:03 GMT, Naoto Sato wrote: >> Please review the changes for the subject issue. This has been suggested in >> a recent discussion thread for the JEP 400 >> [[1](https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-March/075214.html)]. >> A CSR has also been draft

Integrated: 8265173: [test] divert spurious log output away from stream under test in ProcessBuilder Basic test

2021-04-15 Thread Roger Riggs
On Wed, 14 Apr 2021 14:08:50 GMT, Roger Riggs wrote: > The most recent intermittent failure showed that the error occurred during VM > initialization. > Only the tty output was diverted, but not log output. > Add diversion of log output as well tty output. > > Add `-Xlog:all=warning:stderr` and

Re: RFR: 8265173: [test] divert spurious log output away from stream under test in ProcessBuilder Basic test

2021-04-15 Thread Roger Riggs
On Wed, 14 Apr 2021 14:08:50 GMT, Roger Riggs wrote: > The most recent intermittent failure showed that the error occurred during VM > initialization. > Only the tty output was diverted, but not log output. > Add diversion of log output as well tty output. > > Add `-Xlog:all=warning:stderr` and

Re: RFR: 8263154: [macos] DMG builds have finder errors

2021-04-15 Thread Andy Herrick
On Thu, 15 Apr 2021 01:24:04 GMT, Alexander Matveev wrote: > - Issue was reproducible when install-dir points to some invalid location. > - Fixed by defaulting DMG drag and drop location to /Applications folder and > --install-dir will be ignored with warning for DMG. > - I do not see any way

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

2021-04-15 Thread Jan Lahoda
On Thu, 8 Apr 2021 21:12:21 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 > multi

Re: RFR: 8264208: Console charset API [v9]

2021-04-15 Thread Naoto Sato
> Please review the changes for the subject issue. This has been suggested in > a recent discussion thread for the JEP 400 > [[1](https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-March/075214.html)]. > A CSR has also been drafted, and comments are welcome > [[2](https://bugs.openjdk.

Re: RFR: 8264208: Console charset API [v8]

2021-04-15 Thread Naoto Sato
On Thu, 15 Apr 2021 14:17:11 GMT, Alan Bateman wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Added @see links. > > src/java.base/share/classes/java/io/Console.java line 397: > >> 395: /** >> 396: * Return

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

2021-04-15 Thread Joe Darcy
Hi Jan, I recommend using {Double, Float}.toHexString to get a straightforward textual form of the floating-point values. The hex string is isomorphic to the big-level value, but is (more) human readable as a numerical quantity. -Joe On 4/15/2021 10:26 AM, Jan Lahoda wrote: On Thu, 8 Apr 2

Re: RFR: 8265237: String.join and StringJoiner can be improved further [v2]

2021-04-15 Thread Peter Levart
> While JDK-8148937 improved StringJoiner class by replacing internal use of > getChars that copies out characters from String elements into a char[] array > with StringBuilder which is somehow more optimal, the improvement was > marginal in speed (0% ... 10%) and mainly for smaller strings, whi

Re: RFR: 8265237: String.join and StringJoiner can be improved further

2021-04-15 Thread Peter Levart
On Wed, 14 Apr 2021 20:03:27 GMT, Claes Redestad wrote: > There's a StringJoinerBenchmark micro added by JDK-8148937 which could > perhaps be expanded with the scenarios you've experimented with here? I modified that micro benchmark and added a method to also measure String.join static method

Integrated: 8261301: StringWriter.flush() is NOOP but documentation does not indicate it

2021-04-15 Thread Brian Burkhalter
On Wed, 7 Apr 2021 21:01:48 GMT, Brian Burkhalter wrote: > The specification of the method `flush()` in the `java.io` classes > `CharArrayWriter` and `StringWriter` is not explicit about the fact that the > method has no effect. This request proposes to add to the specification of > each flush

Integrated: 8258794: Support for CLDR version 39

2021-04-15 Thread Naoto Sato
On Wed, 14 Apr 2021 21:13:51 GMT, Naoto Sato wrote: > Please review the changes to support CLDR version 39. The vast majority of > the changes are purely data changes from Unicode. The only change affected in > logic was in `CLDRLocaleProviderAdapter.java`, where it needed to deal with > CLDR'

Re: RFR: 8263154: [macos] DMG builds have finder errors

2021-04-15 Thread Alexander Matveev
On Thu, 15 Apr 2021 01:24:04 GMT, Alexander Matveev wrote: > - Issue was reproducible when install-dir points to some invalid location. > - Fixed by defaulting DMG drag and drop location to /Applications folder and > --install-dir will be ignored with warning for DMG. > - I do not see any way

RFR: 8260517: implement Sealed Classes as a standard feature

2021-04-15 Thread Vicente Romero
Please review this PR that intents to make sealed classes a final feature in Java. This PR contains compiler and VM changes. In line with similar PRs, which has made preview features final, this one is mostly removing preview related comments from APIs plus options in test cases. Thanks --

Re: RFR: 8260517: implement Sealed Classes as a standard feature in Java [v2]

2021-04-15 Thread David Holmes
On Fri, 16 Apr 2021 02:11:10 GMT, Vicente Romero wrote: >> Please review this PR that intents to make sealed classes a final feature in >> Java. This PR contains compiler and VM changes. In line with similar PRs, >> which has made preview features final, this one is mostly removing preview >>

Re: RFR: 8260517: implement Sealed Classes as a standard feature in Java [v2]

2021-04-15 Thread Vicente Romero
> Please review this PR that intents to make sealed classes a final feature in > Java. This PR contains compiler and VM changes. In line with similar PRs, > which has made preview features final, this one is mostly removing preview > related comments from APIs plus options in test cases. Please

Re: RFR: 8262108: SimpleDateFormat formatting broken for sq_MK Locale [v4]

2021-04-15 Thread Jaikiran Pai
On Thu, 15 Apr 2021 03:57:18 GMT, Naoto Sato wrote: >> Jaikiran Pai has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - update existing testcase based on review comment >> - Improve code comment to be clear it's only applicable for >>

Re: RFR: 8260517: implement Sealed Classes as a standard feature in Java [v2]

2021-04-15 Thread Vicente Romero
On Fri, 16 Apr 2021 02:10:05 GMT, David Holmes wrote: > Hi Vicente, > > Hotspot and hotspot tests all look fine. One query: why was this test removed? > > test/hotspot/jtreg/runtime/sealedClasses/AbstractSealedTest.java > > is that functionality tested elsewhere? (The other deleted test seemed

Re: RFR: 8260517: implement Sealed Classes as a standard feature in Java [v3]

2021-04-15 Thread Vicente Romero
> Please review this PR that intents to make sealed classes a final feature in > Java. This PR contains compiler and VM changes. In line with similar PRs, > which has made preview features final, this one is mostly removing preview > related comments from APIs plus options in test cases. Please

Re: RFR: 8262108: SimpleDateFormat formatting broken for sq_MK Locale [v4]

2021-04-15 Thread Naoto Sato
On Fri, 16 Apr 2021 02:35:23 GMT, Jaikiran Pai wrote: >> test/jdk/java/util/Calendar/NarrowNamesTest.java line 115: >> >>> 113: } else { >>> 114: testMap(US, AM_PM, ALL_STYLES, >>> 115: "AM", "PM", >> >> What I meant was there is no need to check the prov

Re: RFR: 8262108: SimpleDateFormat formatting broken for sq_MK Locale [v5]

2021-04-15 Thread Jaikiran Pai
> Can I please get a review for this proposed fix for > https://bugs.openjdk.java.net/browse/JDK-8262108? > > As noted in a comment in that issue, the bug relates to the return value of > `Calendar.getDisplayNames` for the `Calendar.AM_PM` field. The implementation > has started returning inval

Re: RFR: 8262108: SimpleDateFormat formatting broken for sq_MK Locale [v4]

2021-04-15 Thread Jaikiran Pai
On Fri, 16 Apr 2021 03:51:22 GMT, Naoto Sato wrote: >> Hello Naoto, >> >> As far as I can see, the testMap cannot be used to test the day period >> strings. More specifically, consider this change (git diff) that I did as >> you suggested (unless I misunderstood what you meant): >> >> >> +

Re: RFR: 8262108: SimpleDateFormat formatting broken for sq_MK Locale [v5]

2021-04-15 Thread Naoto Sato
On Fri, 16 Apr 2021 04:06:54 GMT, Jaikiran Pai wrote: >> Can I please get a review for this proposed fix for >> https://bugs.openjdk.java.net/browse/JDK-8262108? >> >> As noted in a comment in that issue, the bug relates to the return value of >> `Calendar.getDisplayNames` for the `Calendar.AM

Integrated: 8262108: SimpleDateFormat formatting broken for sq_MK Locale

2021-04-15 Thread Jaikiran Pai
On Tue, 13 Apr 2021 11:42:41 GMT, Jaikiran Pai wrote: > Can I please get a review for this proposed fix for > https://bugs.openjdk.java.net/browse/JDK-8262108? > > As noted in a comment in that issue, the bug relates to the return value of > `Calendar.getDisplayNames` for the `Calendar.AM_PM`

Re: RFR: 8262108: SimpleDateFormat formatting broken for sq_MK Locale [v5]

2021-04-15 Thread Jaikiran Pai
On Fri, 16 Apr 2021 04:06:54 GMT, Jaikiran Pai wrote: >> Can I please get a review for this proposed fix for >> https://bugs.openjdk.java.net/browse/JDK-8262108? >> >> As noted in a comment in that issue, the bug relates to the return value of >> `Calendar.getDisplayNames` for the `Calendar.AM