Re: RFR: 8311043: Remove trailing blank lines in source files

2023-06-29 Thread Erik Joelsson
On Wed, 28 Jun 2023 16:54:51 GMT, Leo Korinth wrote: > Remove trailing "blank" lines in source files. > > I like to use global-whitespace-cleanup-mode, but I can not use it if the > files are "dirty" to begin with. This fix will make more files "clean". I > also considered adding a check for t

Re: RFR: 8311043: Remove trailing blank lines in source files

2023-06-29 Thread David Holmes
On Wed, 28 Jun 2023 16:54:51 GMT, Leo Korinth wrote: > Remove trailing "blank" lines in source files. > > I like to use global-whitespace-cleanup-mode, but I can not use it if the > files are "dirty" to begin with. This fix will make more files "clean". I > also considered adding a check for t

Re: RFR: 8310843: Reimplement ByteArray and ByteArrayLittleEndian with Unsafe [v6]

2023-06-29 Thread Alan Bateman
On Mon, 26 Jun 2023 07:09:11 GMT, Glavo wrote: > I deleted some incorrect comments. > > The original author of these two classes misunderstood the behavior of > `intBitsToFloat` and `longBitsToDouble`. These two methods never collapse NaN > values to a "canonical" NaN value, so the comments is

Re: RFR: 8310843: Reimplement ByteArray and ByteArrayLittleEndian with Unsafe [v9]

2023-06-29 Thread Alan Bateman
On Wed, 28 Jun 2023 19:32:44 GMT, Glavo wrote: > Can someone review this PR? What issue are you running into at startup that require this change? - PR Comment: https://git.openjdk.org/jdk/pull/14636#issuecomment-1612568927

Re: RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v30]

2023-06-29 Thread Alan Bateman
On Tue, 27 Jun 2023 17:44:23 GMT, 温绍锦 wrote: >> By optimizing the implementation of java.lang.Long#fastUUID, the performance >> of the java.util.UUID#toString method can be significantly improved. >> >> The following are the test results of JMH: >> >> Benchmark Mode Cnt

Re: RFR: 8310843: Reimplement ByteArray and ByteArrayLittleEndian with Unsafe [v9]

2023-06-29 Thread Chen Liang
On Thu, 29 Jun 2023 07:42:21 GMT, Alan Bateman wrote: > What issue are you running into at startup that require this change? I wish to use this too before java.lang.invoke is ready, such as reading unaligned in the Classfile API. - PR Comment: https://git.openjdk.org/jdk/pull/1463

Re: RFR: 8311043: Remove trailing blank lines in source files

2023-06-29 Thread Erik Joelsson
On Thu, 29 Jun 2023 07:41:11 GMT, David Holmes wrote: > This seems to run contrary to the requirement that files end in a newline, > which git will complain about if the newline is missing. The patch is leaving exactly one newline at the end of the file. - PR Comment: https://git.

Re: RFR: 8310843: Reimplement ByteArray and ByteArrayLittleEndian with Unsafe [v6]

2023-06-29 Thread Glavo
On Thu, 29 Jun 2023 07:41:29 GMT, Alan Bateman wrote: > You'll need to go back through the discussion in the original PRs (there was > more than one) as there was lengthy discussion this already. https://github.com/openjdk/jdk/pull/11840#discussion_r1064489163 Are you referring to this discuss

Re: java.util.stream.Stream: API for user-extensible intermediate operations

2023-06-29 Thread Remi Forax
> From: "Viktor Klang" > To: "core-libs-dev" > Sent: Tuesday, June 27, 2023 7:10:42 PM > Subject: java.util.stream.Stream: API for user-extensible intermediate > operations > Hi core-libs-dev, > Over the past 6+ months I've been thinking about, and tinkering with, how we'd > be able to expose a

Re: RFR: 8281658: Add a security category to the java -XshowSettings option [v8]

2023-06-29 Thread Alan Bateman
On Tue, 27 Jun 2023 15:06:45 GMT, Sean Coffey wrote: >> New functionality in the -XshowSettings menu to display relevant information >> about JDK security configuration > > Sean Coffey has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev exclu

Re: RFR: 8310843: Reimplement ByteArray and ByteArrayLittleEndian with Unsafe [v6]

2023-06-29 Thread Uwe Schindler
On Thu, 29 Jun 2023 07:59:42 GMT, Glavo wrote: > I understand the original reason for retaining it before, but this discussion > is outdated for this PR. > > `Unsafe` does not provide `getFloatUnaligned`/`getDoubleUnaligned` and > `putFloatUnaligned`/`putDoubleUnaligned`, so we must convert fl

Re: RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v31]

2023-06-29 Thread 温绍锦
> By optimizing the implementation of java.lang.Long#fastUUID, the performance > of the java.util.UUID#toString method can be significantly improved. > > The following are the test results of JMH: > > Benchmark Mode Cnt Score Error Units > UUIDUtilsBenchmark.new

Re: RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v31]

2023-06-29 Thread 温绍锦
On Thu, 29 Jun 2023 08:46:32 GMT, 温绍锦 wrote: >> By optimizing the implementation of java.lang.Long#fastUUID, the performance >> of the java.util.UUID#toString method can be significantly improved. >> >> The following are the test results of JMH: >> >> Benchmark Mode Cnt

Re: RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v32]

2023-06-29 Thread 温绍锦
> By optimizing the implementation of java.lang.Long#fastUUID, the performance > of the java.util.UUID#toString method can be significantly improved. > > The following are the test results of JMH: > > Benchmark Mode Cnt Score Error Units > UUIDUtilsBenchmark.new

Re: RFR: 8311043: Remove trailing blank lines in source files

2023-06-29 Thread Leo Korinth
On Thu, 29 Jun 2023 07:41:11 GMT, David Holmes wrote: > This seems to run contrary to the requirement that files end in a newline, > which git will complain about if the newline is missing. > > It also seems far too large and disruptive. Do you still think it is too disruptive after Erik's expl

Re: RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v32]

2023-06-29 Thread Alan Bateman
On Thu, 29 Jun 2023 08:51:58 GMT, 温绍锦 wrote: >> By optimizing the implementation of java.lang.Long#fastUUID, the performance >> of the java.util.UUID#toString method can be significantly improved. >> >> The following are the test results of JMH: >> >> Benchmark Mode Cnt

Re: java.util.stream.Stream: API for user-extensible intermediate operations

2023-06-29 Thread Viktor Klang
From: Remi Forax Sent: Thursday, 29 June 2023 10:03 To: Viktor Klang Cc: core-libs-dev Subject: [External] : Re: java.util.stream.Stream: API for user-extensible intermediate operations From: "Viktor Klang" To: "core-libs-d

Integrated: 8308286 Fix clang warnings in linux code

2023-06-29 Thread Artem Semenov
On Wed, 17 May 2023 12:28:47 GMT, Artem Semenov wrote: > When using the clang compiler to build OpenJDk on Linux, we encounter various > "warnings as errors". > They can be fixed with small changes. This pull request has now been integrated. Changeset: 98a954ee Author:Artem Semenov URL:

Re: RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v32]

2023-06-29 Thread Chen Liang
On Thu, 29 Jun 2023 08:51:58 GMT, 温绍锦 wrote: >> By optimizing the implementation of java.lang.Long#fastUUID, the performance >> of the java.util.UUID#toString method can be significantly improved. >> >> The following are the test results of JMH: >> >> Benchmark Mode Cnt

Re: RFR: 8311030: ResourceBundle.handleKeySet() is racy

2023-06-29 Thread Sergey Tsypanov
On Wed, 28 Jun 2023 20:02:58 GMT, Roger Riggs wrote: >> Double-checked locking should rely on local variable to avoid racy reads >> from volatile field. > > Looks ok; was this a tool detected race? @RogerRiggs no tool, just fell into the sources while debugging my application - PR

Re: RFR: 8311043: Remove trailing blank lines in source files

2023-06-29 Thread Coleen Phillimore
On Wed, 28 Jun 2023 16:54:51 GMT, Leo Korinth wrote: > Remove trailing "blank" lines in source files. > > I like to use global-whitespace-cleanup-mode, but I can not use it if the > files are "dirty" to begin with. This fix will make more files "clean". I > also considered adding a check for t

Re: java.util.stream.Stream: API for user-extensible intermediate operations

2023-06-29 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" > Cc: "core-libs-dev" > Sent: Thursday, June 29, 2023 11:09:22 AM > Subject: Re: java.util.stream.Stream: API for user-extensible intermediate > operations > From: Remi Forax > Sent: Thursday, 29 June 2023 10:03 > To: Viktor Klang > Cc: core-libs-dev

Re: RFR: 8311043: Remove trailing blank lines in source files

2023-06-29 Thread David Holmes
On Wed, 28 Jun 2023 16:54:51 GMT, Leo Korinth wrote: > Remove trailing "blank" lines in source files. > > I like to use global-whitespace-cleanup-mode, but I can not use it if the > files are "dirty" to begin with. This fix will make more files "clean". I > also considered adding a check for t

Re: RFR: 8311030: ResourceBundle.handleKeySet() is racy

2023-06-29 Thread David Holmes
On Wed, 28 Jun 2023 11:05:11 GMT, Sergey Tsypanov wrote: > Double-checked locking should rely on local variable to avoid racy reads from > volatile field. I don't see any race here. The addition of the local serves no purpose AFAICS - we don't even save any volatile reads. - PR C

Re: RFR: 8311030: ResourceBundle.handleKeySet() is racy

2023-06-29 Thread Raffaello Giulietti
On Wed, 28 Jun 2023 11:05:11 GMT, Sergey Tsypanov wrote: > Double-checked locking should rely on local variable to avoid racy reads from > volatile field. The role of the local `keySet` seems pretty useless. It doesn't save neither volatile reads nor writes. - PR Comment: https:/

Re: RFR: 8311030: ResourceBundle.handleKeySet() is racy

2023-06-29 Thread Viktor Klang
On Thu, 29 Jun 2023 10:08:27 GMT, Sergey Tsypanov wrote: >> Looks ok; was this a tool detected race? > > @RogerRiggs no tool, just fell into the sources while debugging my application @stsypanov I don't see that there's any issue with the existing code as the volatile field is only written at m

Re: RFR: JDK-8308047 java/util/concurrent/ScheduledThreadPoolExecutor/BasicCancelTest.java timed out and also had jcmd pipe errors [v2]

2023-06-29 Thread Viktor Klang
On Fri, 9 Jun 2023 16:53:05 GMT, Alan Bateman wrote: >> Viktor Klang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Decresing the number of iterations proportional to the increase in the max >> memory size > > This looks okay to me and

Integrated: 8310848: Convert ClassDesc and MethodTypeDesc to be stored in static final fields

2023-06-29 Thread Chen Liang
On Sun, 25 Jun 2023 02:57:04 GMT, Chen Liang wrote: > This would encourage Classfile API users to use the descriptors as constants, > which can improve performance by avoiding repeated validation and reusing > cached descriptor strings for MethodTypeDesc. This patch updates usages in > the mai

Re: RFR: 8311043: Remove trailing blank lines in source files

2023-06-29 Thread Leo Korinth
On Thu, 29 Jun 2023 12:01:03 GMT, Coleen Phillimore wrote: > Why do we care about this? I care because of global-whitespace-cleanup-mode (in emacs). It helps me remove trailing whitespaces and blanklines when saving but it will not fix a file that was "dirty" when it was opened. Trailing blank

Re: RFR: 8311043: Remove trailing blank lines in source files

2023-06-29 Thread Coleen Phillimore
On Wed, 28 Jun 2023 16:54:51 GMT, Leo Korinth wrote: > Remove trailing "blank" lines in source files. > > I like to use global-whitespace-cleanup-mode, but I can not use it if the > files are "dirty" to begin with. This fix will make more files "clean". I > also considered adding a check for t

Re: RFR: 8311043: Remove trailing blank lines in source files

2023-06-29 Thread Leo Korinth
On Thu, 29 Jun 2023 12:11:40 GMT, David Holmes wrote: > Neither the PR diffs nor the webrev make it easy to see exactly what is being > changed here. It appeared to me that the last empty line of each file was > being deleted, leaving no newline at the end. My changes look like this in the dif

Re: java.util.stream.Stream: API for user-extensible intermediate operations

2023-06-29 Thread Brian Goetz
Please be mindful of the request Viktor made: for feedback on the approach and the API concepts.  It should be pretty clear that low-level details like "unsupportedCombiner" are many levels down below "approach and concepts".  (And, you know the rule: when you bikeshed on a low-level detail whe

Re: RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v33]

2023-06-29 Thread 温绍锦
> By optimizing the implementation of java.lang.Long#fastUUID, the performance > of the java.util.UUID#toString method can be significantly improved. > > The following are the test results of JMH: > > Benchmark Mode Cnt Score Error Units > UUIDUtilsBenchmark.new

RFR: 8311085: Remove implementation detail writeTo from LocalVariable(Type)

2023-06-29 Thread Chen Liang
`LocalVariable` and `LocalVariableType` includes `writeTo(BufWriter)`, which should be implementation details. See https://mail.openjdk.org/pipermail/classfile-api-dev/2023-June/000381.html for context. This patch moves the implementation to `DirectCodeBuilder`'s original use sites; the old `b

RFR: 8311084: Add typeSymbol() API for applicable constant pool entries

2023-06-29 Thread Chen Liang
5 Constant Pool entries, namely ConstantDynamicEntry, InvokeDynamicEntry, FieldRefEntry, MethodRefEntry, and InterfaceMethodRefEntry should have a typeSymbol() API to return the nominal/symbolic descriptor (ClassDesc or MethodTypeDesc). This API is not added to NameAndTypeEntry itself, for a Na

Re: RFR: 8311030: ResourceBundle.handleKeySet() is racy

2023-06-29 Thread Daniel Fuchs
On Wed, 28 Jun 2023 11:05:11 GMT, Sergey Tsypanov wrote: > Double-checked locking should rely on local variable to avoid racy reads from > volatile field. The new code makes it more visible that 1. keySet is expected to be volatile and 2. that there is no path were code could be reordered lead

Re: RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v33]

2023-06-29 Thread Jie Fu
On Thu, 29 Jun 2023 13:13:33 GMT, 温绍锦 wrote: >> By optimizing the implementation of java.lang.Long#fastUUID, the performance >> of the java.util.UUID#toString method can be significantly improved. >> >> The following are the test results of JMH: >> >> Benchmark Mode Cnt

Re: java.util.stream.Stream: API for user-extensible intermediate operations

2023-06-29 Thread Viktor Klang
Over the past 6+ months I've been thinking about, and tinkering with, how we'd be able to expose a user-facing API for extensible intermediate java.util.stream.Stream operations―a feature envisioned all the way back when Streams were created. I'm now at a point where I have a viable design an

Re: RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v34]

2023-06-29 Thread 温绍锦
> By optimizing the implementation of java.lang.Long#fastUUID, the performance > of the java.util.UUID#toString method can be significantly improved. > > The following are the test results of JMH: > > Benchmark Mode Cnt Score Error Units > UUIDUtilsBenchmark.new

Re: RFR: 8311084: Add typeSymbol() API for applicable constant pool entries

2023-06-29 Thread Brian Goetz
On Thu, 29 Jun 2023 13:23:51 GMT, Brian Goetz wrote: >> 5 Constant Pool entries, namely ConstantDynamicEntry, InvokeDynamicEntry, >> FieldRefEntry, MethodRefEntry, and InterfaceMethodRefEntry should have a >> typeSymbol() API to return the nominal/symbolic descriptor (ClassDesc or >> MethodTyp

Re: RFR: 8311084: Add typeSymbol() API for applicable constant pool entries

2023-06-29 Thread Brian Goetz
On Thu, 29 Jun 2023 09:59:30 GMT, Chen Liang wrote: > 5 Constant Pool entries, namely ConstantDynamicEntry, InvokeDynamicEntry, > FieldRefEntry, MethodRefEntry, and InterfaceMethodRefEntry should have a > typeSymbol() API to return the nominal/symbolic descriptor (ClassDesc or > MethodTypeDesc

Integrated: JDK-8310502 : Optimization for j.l.Long.fastUUID()

2023-06-29 Thread 温绍锦
On Wed, 21 Jun 2023 07:28:54 GMT, 温绍锦 wrote: > By optimizing the implementation of java.lang.Long#fastUUID, the performance > of the java.util.UUID#toString method can be significantly improved. > > The following are the test results of JMH: > > Benchmark Mode Cnt Sc

Re: RFR: 8311085: Remove implementation detail writeTo from LocalVariable(Type)

2023-06-29 Thread Brian Goetz
On Thu, 29 Jun 2023 09:59:08 GMT, Chen Liang wrote: > `LocalVariable` and `LocalVariableType` includes `writeTo(BufWriter)`, which > should be implementation details. > > See > https://mail.openjdk.org/pipermail/classfile-api-dev/2023-June/000381.html > for context. > > This patch moves the

Re: RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v34]

2023-06-29 Thread Alan Bateman
On Thu, 29 Jun 2023 13:26:18 GMT, 温绍锦 wrote: >> By optimizing the implementation of java.lang.Long#fastUUID, the performance >> of the java.util.UUID#toString method can be significantly improved. >> >> The following are the test results of JMH: >> >> Benchmark Mode Cnt

Re: RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v34]

2023-06-29 Thread Roger Riggs
On Thu, 29 Jun 2023 13:26:18 GMT, 温绍锦 wrote: >> By optimizing the implementation of java.lang.Long#fastUUID, the performance >> of the java.util.UUID#toString method can be significantly improved. >> >> The following are the test results of JMH: >> >> Benchmark Mode Cnt

Re: RFR: 8311085: Remove implementation detail writeTo from LocalVariable(Type)

2023-06-29 Thread Chen Liang
On Thu, 29 Jun 2023 13:41:17 GMT, Brian Goetz wrote: >> `LocalVariable` and `LocalVariableType` includes `writeTo(BufWriter)`, which >> should be implementation details. >> >> See >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-June/000381.html >> for context. >> >> This patch m

Re: RFR: 8311030: ResourceBundle.handleKeySet() is racy

2023-06-29 Thread Roger Riggs
On Wed, 28 Jun 2023 11:05:11 GMT, Sergey Tsypanov wrote: > Double-checked locking should rely on local variable to avoid racy reads from > volatile field. Given all the comments, I don't think this is ready to integrate. - Changes requested by rriggs (Reviewer). PR Review: https:

Re: RFR: 8311085: Remove implementation detail writeTo from LocalVariable(Type)

2023-06-29 Thread Brian Goetz
It is irritating that one is a type descriptor and one is a signature, but we can launder that by observing that both are Utf8Entry. On 6/29/2023 9:53 AM, Chen Liang wrote: On Thu, 29 Jun 2023 13:41:17 GMT, Brian Goetz wrote: `LocalVariable` and `LocalVariableType` includes `writeTo(BufWrite

Re: RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v34]

2023-06-29 Thread Jie Fu
On Thu, 29 Jun 2023 13:45:20 GMT, Alan Bateman wrote: > @DamonFool In the future, please wait at least 24 hours before sponsoring > changes like this. There have been 33 revisions of this change, many of the > people that have commented, potential reviewers are in many time zones and > need to

Re: RFR: 8311043: Remove trailing blank lines in source files

2023-06-29 Thread Leo Korinth
On Thu, 29 Jun 2023 12:40:34 GMT, Coleen Phillimore wrote: > You could fix your emacs functions. It is a *very nice* feature of global-whitespace-cleanup-mode - PR Comment: https://git.openjdk.org/jdk/pull/14698#issuecomment-1613252347

Re: RFR: 8311030: ResourceBundle.handleKeySet() is racy

2023-06-29 Thread Aleksey Shipilev
On Wed, 28 Jun 2023 11:05:11 GMT, Sergey Tsypanov wrote: > Double-checked locking should rely on local variable to avoid racy reads from > volatile field. Yeah, current code looks like a correct volatile-bearing-DCL. `keySet` is safely published already. Introducing local variable gains us not

Re: RFR: 8310929: Optimization for Integer.toString [v2]

2023-06-29 Thread Glavo
On Wed, 28 Jun 2023 22:19:04 GMT, 温绍锦 wrote: >> Speed up Integer.toString with a precomputed cache array of length 1000, use >> division by 1000, so that each iteration can calculate three digits. >> >> this optimization can also be used in StringBuilder#appent(int) and >> Long#toString. >>

Re: RFR: 8310929: Optimization for Integer.toString [v2]

2023-06-29 Thread Glavo
On Wed, 28 Jun 2023 22:19:04 GMT, 温绍锦 wrote: >> Speed up Integer.toString with a precomputed cache array of length 1000, use >> division by 1000, so that each iteration can calculate three digits. >> >> this optimization can also be used in StringBuilder#appent(int) and >> Long#toString. >>

RFR: JDK-8310913 Move ReferencedKeyMap to jdk.internal so it may be shared

2023-06-29 Thread Jim Laskey
java.lang.runtime.ReferencedKeyMap was introduced to provide a concurrent caching scheme for Carrier objects. The technique used is generally useful for a variety of caching schemes and is being moved to be shared in other parts of the jdk. The MethodType interning case is one example.

Re: RFR: 8311043: Remove trailing blank lines in source files

2023-06-29 Thread Coleen Phillimore
On Wed, 28 Jun 2023 16:54:51 GMT, Leo Korinth wrote: > Remove trailing "blank" lines in source files. > > I like to use global-whitespace-cleanup-mode, but I can not use it if the > files are "dirty" to begin with. This fix will make more files "clean". I > also considered adding a check for t

Re: RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger

2023-06-29 Thread Roger Riggs
On Fri, 23 Jun 2023 17:27:00 GMT, Pavel Rappo wrote: > Please review this PR to use modern APIs and language features to simplify > equals, hashCode, and compareTo for BigInteger. If you have any performance > concerns, please raise them. > > This PR is cherry-picked from a bigger, not-yet-pub

Re: RFR: 8311030: ResourceBundle.handleKeySet() is racy

2023-06-29 Thread Naoto Sato
On Wed, 28 Jun 2023 11:05:11 GMT, Sergey Tsypanov wrote: > Double-checked locking should rely on local variable to avoid racy reads from > volatile field. Retrieving the approval, per the discussion. - Changes requested by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/

Integrated: 8310232: java.time.Clock$TickClock.millis() fails in runtime when tick is 1 microsecond

2023-06-29 Thread Naoto Sato
On Mon, 26 Jun 2023 17:31:29 GMT, Naoto Sato wrote: > Fixing the `/ by zero` exception with tick durations less than a millisecond. This pull request has now been integrated. Changeset: a995aa6c Author:Naoto Sato URL: https://git.openjdk.org/jdk/commit/a995aa6cd1cd89c2ca6db72b060177

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v6]

2023-06-29 Thread Adam Sotona
> javap uses proprietary com.sun.tools.classfile library to parse class files. > > This patch converts javap to use Classfile API. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 222

Re: RFR: 8311043: Remove trailing blank lines in source files

2023-06-29 Thread Leo Korinth
On Wed, 28 Jun 2023 16:54:51 GMT, Leo Korinth wrote: > Remove trailing "blank" lines in source files. > > I like to use global-whitespace-cleanup-mode, but I can not use it if the > files are "dirty" to begin with. This fix will make more files "clean". I > also considered adding a check for t

Withdrawn: 8311043: Remove trailing blank lines in source files

2023-06-29 Thread Leo Korinth
On Wed, 28 Jun 2023 16:54:51 GMT, Leo Korinth wrote: > Remove trailing "blank" lines in source files. > > I like to use global-whitespace-cleanup-mode, but I can not use it if the > files are "dirty" to begin with. This fix will make more files "clean". I > also considered adding a check for t

Re: RFR: JDK-8310913 Move ReferencedKeyMap to jdk.internal so it may be shared

2023-06-29 Thread Naoto Sato
On Tue, 27 Jun 2023 19:07:12 GMT, Jim Laskey wrote: > java.lang.runtime.ReferencedKeyMap was introduced to provide a concurrent > caching scheme for Carrier objects. The technique used is generally useful > for a variety of caching schemes and is being moved to be shared in other > parts of th

Re: RFR: JDK-8310913 Move ReferencedKeyMap to jdk.internal so it may be shared

2023-06-29 Thread Jim Laskey
On Thu, 29 Jun 2023 16:58:13 GMT, Naoto Sato wrote: >> java.lang.runtime.ReferencedKeyMap was introduced to provide a concurrent >> caching scheme for Carrier objects. The technique used is generally useful >> for a variety of caching schemes and is being moved to be shared in other >> parts o

Re: RFR: 8310929: Optimization for Integer.toString [v2]

2023-06-29 Thread 温绍锦
On Wed, 28 Jun 2023 22:19:04 GMT, 温绍锦 wrote: >> Speed up Integer.toString with a precomputed cache array of length 1000, use >> division by 1000, so that each iteration can calculate three digits. >> >> this optimization can also be used in StringBuilder#appent(int) and >> Long#toString. >>

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v5]

2023-06-29 Thread Alan Bateman
On Fri, 23 Jun 2023 12:10:33 GMT, Oliver Kopp wrote: >> Fix for [JDK-8240567](https://bugs.openjdk.org/browse/JDK-8240567): >> "MethodTooLargeException thrown while creating a jlink image". >> >> Java still has a 64kb limit: A method may not be longer than 64kb. The idea >> of the fix is to sp

RFR: 6960866: [Fmt-Ch] ChoiceFormat claims impossible and unimplemented functionality

2023-06-29 Thread Justin Lu
Please review this PR, which clarifies the parameter description of ChoiceFormat.setChoices(). `ChoiceFormat.setChoices(double[] limits, String[] formats)` claims that `formats` can either be "Format objects or Strings". It also claims that "When formatting with object Y, if the object is a Num

Re: RFR: JDK-8310913 Move ReferencedKeyMap to jdk.internal so it may be shared [v2]

2023-06-29 Thread Jim Laskey
> java.lang.runtime.ReferencedKeyMap was introduced to provide a concurrent > caching scheme for Carrier objects. The technique used is generally useful > for a variety of caching schemes and is being moved to be shared in other > parts of the jdk. The MethodType interning case is one example.

Re: List extending Collection/SequencedCollection

2023-06-29 Thread Ryan Ernst
Thanks for replying, Joe. First, let me reiterate, we fully admit there was a bug in painless, we stopped short in walking the class hierarchy. There is no bug in the SequencedCollection hierarchy. But I do think there is an inconsistency. > The two definition are semantically equivalent > ... > T

Re: RFR: JDK-8308398 Move SunEC crypto provider into java.base [v2]

2023-06-29 Thread Valerie Peng
On Mon, 26 Jun 2023 22:52:18 GMT, Anthony Scarpino wrote: >> Hi, >> >> I need a code review for moving the contents of the jdk.crypto.ec module >> into java.base. This moves the SunEC JCE Provider (Elliptic Curve) into >> java.base. EC has always been separate from the base module/pkg becau

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v6]

2023-06-29 Thread Oliver Kopp
> Fix for [JDK-8240567](https://bugs.openjdk.org/browse/JDK-8240567): > "MethodTooLargeException thrown while creating a jlink image". > > Java still has a 64kb limit: A method may not be longer than 64kb. The idea > of the fix is to split up the generated methods in several smaller methods > >

Re: RFR: 8309622: Re-examine the cache mechanism in BaseLocale [v4]

2023-06-29 Thread Naoto Sato
> This is stemming from the PR: https://github.com/openjdk/jdk/pull/14211 where > aggressive GC can cause NPE in `BaseLocale$Key` class. I refactored the > in-house cache with WeakHashMap, and removed the Key class as it is no longer > needed (thus the original NPE will no longer be possible). A

Re: RFR: JDK-8308398 Move SunEC crypto provider into java.base [v2]

2023-06-29 Thread Anthony Scarpino
On Thu, 29 Jun 2023 18:36:55 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> update for review: changed test, removed commented out code in module, >> fixed switch statement, added --limit-m

RFR: JDK-8311115: Type in java.lang.reflect.AccessFlag.METHOD_PARAMETER

2023-06-29 Thread Joe Darcy
Typo fix; running a spell check over the comments and strings in the file, didn't notice any other problems. - Commit messages: - JDK-835: Type in java.lang.reflect.AccessFlag.METHOD_PARAMETER Changes: https://git.openjdk.org/jdk/pull/14717/files Webrev: https://webrevs.openjd

Re: RFR: JDK-8311115: Type in java.lang.reflect.AccessFlag.METHOD_PARAMETER

2023-06-29 Thread Jim Laskey
On Thu, 29 Jun 2023 20:14:10 GMT, Joe Darcy wrote: > Typo fix; running a spell check over the comments and strings in the file, > didn't notice any other problems. Marked as reviewed by jlaskey (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/14717#pullrequestreview-15060

Re: RFR: JDK-8311115: Type in java.lang.reflect.AccessFlag.METHOD_PARAMETER

2023-06-29 Thread Brian Burkhalter
On Thu, 29 Jun 2023 20:14:10 GMT, Joe Darcy wrote: > Typo fix; running a spell check over the comments and strings in the file, > didn't notice any other problems. Marked as reviewed by bpb (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/14717#pullrequestreview-150607156

Re: RFR: JDK-8311115: Type in java.lang.reflect.AccessFlag.METHOD_PARAMETER

2023-06-29 Thread Mandy Chung
On Thu, 29 Jun 2023 20:14:10 GMT, Joe Darcy wrote: > Typo fix; running a spell check over the comments and strings in the file, > didn't notice any other problems. Marked as reviewed by mchung (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/14717#pullrequestreview-150607

Integrated: JDK-8311115: Type in java.lang.reflect.AccessFlag.METHOD_PARAMETER

2023-06-29 Thread Joe Darcy
On Thu, 29 Jun 2023 20:14:10 GMT, Joe Darcy wrote: > Typo fix; running a spell check over the comments and strings in the file, > didn't notice any other problems. This pull request has now been integrated. Changeset: d9796626 Author:Joe Darcy URL: https://git.openjdk.org/jdk/commi

[jdk21] RFR: 8311115: Type in java.lang.reflect.AccessFlag.METHOD_PARAMETER

2023-06-29 Thread Joe Darcy
Make the docs in JDK 21 better too. - Commit messages: - Backport d97966266e343671693825d2211a34fa45dd271d Changes: https://git.openjdk.org/jdk21/pull/82/files Webrev: https://webrevs.openjdk.org/?repo=jdk21&pr=82&range=00 Issue: https://bugs.openjdk.org/browse/JDK-835 Stat

Re: [jdk21] RFR: 8311115: Type in java.lang.reflect.AccessFlag.METHOD_PARAMETER

2023-06-29 Thread Pavel Rappo
On Thu, 29 Jun 2023 20:37:09 GMT, Joe Darcy wrote: > Make the docs in JDK 21 better too. Marked as reviewed by prappo (Reviewer). - PR Review: https://git.openjdk.org/jdk21/pull/82#pullrequestreview-1506105696

[jdk21] Integrated: 8311115: Type in java.lang.reflect.AccessFlag.METHOD_PARAMETER

2023-06-29 Thread Joe Darcy
On Thu, 29 Jun 2023 20:37:09 GMT, Joe Darcy wrote: > Make the docs in JDK 21 better too. This pull request has now been integrated. Changeset: 60db329e Author:Joe Darcy URL: https://git.openjdk.org/jdk21/commit/60db329e4cd2a9fe7f7f23e0ddde3356bab8ba51 Stats: 2 lines in 1 file ch

Re: RFR: JDK-8310913 Move ReferencedKeyMap to jdk.internal so it may be shared [v2]

2023-06-29 Thread Roger Riggs
On Thu, 29 Jun 2023 18:24:33 GMT, Jim Laskey wrote: >> java.lang.runtime.ReferencedKeyMap was introduced to provide a concurrent >> caching scheme for Carrier objects. The technique used is generally useful >> for a variety of caching schemes and is being moved to be shared in other >> parts o

Re: RFR: 8311030: ResourceBundle.handleKeySet() is racy

2023-06-29 Thread Sergey Tsypanov
On Thu, 29 Jun 2023 12:23:11 GMT, Raffaello Giulietti wrote: >> Double-checked locking should rely on local variable to avoid racy reads >> from volatile field. > > The role of the local `keySet` seems pretty useless. It doesn't save neither > volatile reads nor writes. @rgiulietti `keySet` i

Integrated: 8310241: OffsetDateTime compareTo redundant computation

2023-06-29 Thread Roger Riggs
On Thu, 22 Jun 2023 19:03:03 GMT, Roger Riggs wrote: > Remove a redundant comparison in java.time `OffsetDateTime.compareTo()`. > If the `compareInstant` utility method returns 0 (equal), it compares the > `LocalDateTime`. > However, `compareInstant` has already done that comparison; if it foun

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v6]

2023-06-29 Thread Mandy Chung
On Thu, 29 Jun 2023 20:34:58 GMT, Mandy Chung wrote: >> Oliver Kopp has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix threshold > > test/jdk/tools/jlink/JLink100Modules.java line 47: > >> 45: * jdk.compiler >> 46: * @build

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v6]

2023-06-29 Thread Mandy Chung
On Thu, 29 Jun 2023 19:15:15 GMT, Oliver Kopp wrote: >> Fix for [JDK-8240567](https://bugs.openjdk.org/browse/JDK-8240567): >> "MethodTooLargeException thrown while creating a jlink image". >> >> Java still has a 64kb limit: A method may not be longer than 64kb. The idea >> of the fix is to sp

Re: RFR: JDK-8310913 Move ReferencedKeyMap to jdk.internal so it may be shared [v2]

2023-06-29 Thread Jim Laskey
On Thu, 29 Jun 2023 20:54:31 GMT, Roger Riggs wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove warning tied to String Templates > > src/java.base/share/classes/jdk/internal/util/ReferencedKeySet.java line 65: >

RFR: 8311122: Fix typos in java.base

2023-06-29 Thread Pavel Rappo
Please review this IDE-assisted typo hunt, which I plan to backport to jdk21. - Commit messages: - Fix copyright years - Initial commit Changes: https://git.openjdk.org/jdk/pull/14718/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14718&range=00 Issue: https://bugs.openj

Re: RFR: 8311122: Fix typos in java.base

2023-06-29 Thread Joe Darcy
On Thu, 29 Jun 2023 21:17:49 GMT, Pavel Rappo wrote: > Please review this IDE-assisted typo hunt, which I plan to backport to jdk21. Looks fine, but please give some time for others reviewers before pushing. - Marked as reviewed by darcy (Reviewer). PR Review: https://git.openjdk.

Re: RFR: 8311122: Fix typos in java.base

2023-06-29 Thread Pavel Rappo
On Thu, 29 Jun 2023 21:28:39 GMT, Joe Darcy wrote: > Looks fine, but please give some time for others reviewers before pushing. Absolutely! Also, this PR contains a code change (a typo in an error message), which, technically speaking, disqualifies the bug from being "noreg-doc" and requires

Re: RFR: 8311122: Fix typos in java.base

2023-06-29 Thread Naoto Sato
On Thu, 29 Jun 2023 21:17:49 GMT, Pavel Rappo wrote: > Please review this IDE-assisted typo hunt, which I plan to backport to jdk21. LGTM - Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/14718#pullrequestreview-1506183994

Re: RFR: 8311122: Fix typos in java.base

2023-06-29 Thread Mandy Chung
On Thu, 29 Jun 2023 21:17:49 GMT, Pavel Rappo wrote: > Please review this IDE-assisted typo hunt, which I plan to backport to jdk21. Marked as reviewed by mchung (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/14718#pullrequestreview-1506186255

Re: RFR: 8311122: Fix typos in java.base

2023-06-29 Thread Iris Clark
On Thu, 29 Jun 2023 21:17:49 GMT, Pavel Rappo wrote: > Please review this IDE-assisted typo hunt, which I plan to backport to jdk21. Marked as reviewed by iris (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/14718#pullrequestreview-1506190678

Re: RFR: 6960866: [Fmt-Ch] ChoiceFormat claims impossible and unimplemented functionality

2023-06-29 Thread Naoto Sato
On Thu, 29 Jun 2023 18:02:00 GMT, Justin Lu wrote: > Please review this PR, which clarifies the parameter description of > ChoiceFormat.setChoices(). > > `ChoiceFormat.setChoices(double[] limits, String[] formats)` claims that > `formats` can either be "Format objects or Strings". It also clai

Re: RFR: 8301341: LinkedTransferQueue does not respect timeout for poll() [v2]

2023-06-29 Thread Doug Lea
> This now uses Thread.isVirtual to distinguish spin vs immediate block cases, > enabling re-introduction of spin control from the previous version, removing > anomalies like this one. Doug Lea has updated the pull request with a new target base due to a merge or a rebase. The incremental webre

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v5]

2023-06-29 Thread Oliver Kopp
On Thu, 29 Jun 2023 17:37:02 GMT, Alan Bateman wrote: > The size of the generated moduleDescriptors is a function of the number of > modules, the number of packages in the modules, number of exports, ... I > think your approach is okay for now, meaning pick some threshold that you are > confid

Re: RFR: 8311122: Fix typos in java.base

2023-06-29 Thread Pavel Rappo
On Thu, 29 Jun 2023 21:17:49 GMT, Pavel Rappo wrote: > Please review this IDE-assisted typo hunt, which I plan to backport to jdk21. Our CI tests are fine with this change. That said, I'll wait for security-dev to complete the review, and then wait for a few more days so that others could also

Re: RFR: 8301341: LinkedTransferQueue does not respect timeout for poll() [v3]

2023-06-29 Thread Doug Lea
> This now uses Thread.isVirtual to distinguish spin vs immediate block cases, > enabling re-introduction of spin control from the previous version, removing > anomalies like this one. Doug Lea has updated the pull request incrementally with one additional commit since the last revision: Ove

Re: RFR: 8310923: Refactor Currency tests to use JUnit [v4]

2023-06-29 Thread Naoto Sato
On Wed, 28 Jun 2023 20:49:18 GMT, Justin Lu wrote: >> Please review this PR which refactors Currency tests to use JUnit. >> >> The most significant change occurs in `ValidateISO4217.java`. Other changes >> to this file excluding the JUnit refactoring include >> >> - Tests are no longer depende

RFR: 8254566: Clarify the spec of ClassLoader::getClassLoadingLock for non-parallel capable loader

2023-06-29 Thread Mandy Chung
8254566: Clarify the spec of ClassLoader::getClassLoadingLock for non-parallel capable loader - Commit messages: - 8254566: Clarify the spec of ClassLoader::loadClass about the lock acquired by non-parallel capable loader Changes: https://git.openjdk.org/jdk/pull/14720/files Webr

Re: RFR: 8254566: Clarify the spec of ClassLoader::getClassLoadingLock for non-parallel capable loader

2023-06-29 Thread David Holmes
On Thu, 29 Jun 2023 23:39:55 GMT, Mandy Chung wrote: > The spec of `ClassLoader::getClassLoadingLock` is unclear that this method is > intended for parallel-capable class loader implementations to provide an > alternate implementation. For non-parallel-capable class loaders, this > method sh

  1   2   >