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

2023-06-28 Thread 温绍锦
On Tue, 27 Jun 2023 14:10:45 GMT, Roger Riggs wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> fix UUID.java import, rename jdk.util.HexDigits to jdk.util.Hex256 and >> make private constructor. > > src/java.base/share/clas

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

2023-06-28 Thread 温绍锦
On Tue, 27 Jun 2023 16:12:50 GMT, 温绍锦 wrote: >>> Sadly, jdk.internal.util is exported to other modules so it does need to be >>> looked at from an integrity perspective. >> >> This is indeed a problem to consider. >> >> Maybe we can move this array back into `HexDigits`. Then we create a new

Integrated: 8311020: Typo cleanup in Classfile API

2023-06-28 Thread Chen Liang
On Wed, 28 Jun 2023 06:09:08 GMT, Chen Liang wrote: > This is a cleanup patch that fixes: > 1. `ClassfileBuilder` should be sealed but was not; it's now sealed. > 2. Various typo fixes, including spelling errors, wrong descriptions, and > unnecessary full qualifications for classes in the same p

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v18]

2023-06-28 Thread Chen Liang
On Tue, 27 Jun 2023 16:33:11 GMT, Chen Liang wrote: >> As John Rose has pointed out in this issue, the current j.l.r.Proxy based >> implementation of MethodHandleProxies.asInterface has a few issues: >> 1. Exposes too much information via Proxy supertype (and WrapperInstance >> interface) >> 2.

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v19]

2023-06-28 Thread Chen Liang
> As John Rose has pointed out in this issue, the current j.l.r.Proxy based > implementation of MethodHandleProxies.asInterface has a few issues: > 1. Exposes too much information via Proxy supertype (and WrapperInstance > interface) > 2. Does not allow future expansion to support SAM[^1] abstrac

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization [v14]

2023-06-28 Thread Chen Liang
On Wed, 28 Jun 2023 19:15:02 GMT, Paul Sandoz wrote: >> I use this block to remove the overhead around MethodHandle and VarHandle >> infrastructure initialization (such as LF spinning) that is not related to >> any particular class; so that I measure only the impact of encountering a >> new cl

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization [v17]

2023-06-28 Thread Chen Liang
On Wed, 28 Jun 2023 23:08:28 GMT, Mandy Chung wrote: > I suggest to create a CSR to document the behavioral change to match the > specification. CSR filed for this behavior change; no spec updates but there's minor class-loading compatibility risk. I would be grateful if you can review the CSR

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization [v19]

2023-06-28 Thread Chen Liang
> This patch implements lazy initialization for VarHandle working on static > fields. It has a good initial call performance. > > We introduce a new internal API, `target()` to unpack a lazy VarHandle in VH > implementation methods. If called via MethodHandle, a barrier is added in the > Method

Re: RFR: JDK-8310814: Clarify the targetName parameter of Lookup::findClass [v2]

2023-06-28 Thread Chen Liang
On Mon, 26 Jun 2023 23:13:19 GMT, Mandy Chung wrote: >> This PR updates the spec of `Lookup::findClass` to reflect the current >> behavior that requires a binary name or a string representing an array class >> in the form as returned by `Class::getName`. >> >> `test/jdk/java/lang/invoke/ac

Integrated: 8301569: jmod list option and jimage list --help not interpreted correctly on turkish locale

2023-06-28 Thread Glavo
On Sun, 29 Jan 2023 15:37:28 GMT, Glavo wrote: > When the default Locale is `tr`, the jmod and jimage commands have the > following problems: > > * The jmod command does not correctly recognize the `list` mode typed in > lowercase; > * The jimage command cannot obtain the help information of t

Re: List extending Collection/SequencedCollection

2023-06-28 Thread Joseph D. Darcy
Hello, What is Painless doing that would fail under     List extends SequencedCollection ... but work under     List extends SequencedCollection, Collection ... The two definition are semantically equivalent since SequencedCollection itself extends Collection. The JDK 22 javadoc for List s

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization [v18]

2023-06-28 Thread Chen Liang
> This patch implements lazy initialization for VarHandle working on static > fields. It has a good initial call performance. > > We introduce a new internal API, `target()` to unpack a lazy VarHandle in VH > implementation methods. If called via MethodHandle, a barrier is added in the > Method

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

2023-06-28 Thread Chen Liang
On Tue, 27 Jun 2023 20:29:36 GMT, Glavo wrote: >> `ByteArray` and `ByteArrayLittleEndian` are very useful tool classes that >> can be used in many places to performance tuning. >> >> Currently they are implemented by `VarHandle`, so using them may have some >> impact on startup time. >> >> Th

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

2023-06-28 Thread 温绍锦
On Wed, 28 Jun 2023 17:53:04 GMT, Raffaello Giulietti wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> postpone the division > > src/java.base/share/classes/java/lang/Integer.java line 478: > >> 476: >> 477: byte[

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization [v17]

2023-06-28 Thread Mandy Chung
On Wed, 28 Jun 2023 01:34:30 GMT, Chen Liang wrote: >> This patch implements lazy initialization for VarHandle working on static >> fields. It has a good initial call performance. >> >> We introduce a new internal API, `target()` to unpack a lazy VarHandle in VH >> implementation methods. If c

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

2023-06-28 Thread 温绍锦
> 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. > > # Benchmark Result > > > make test TEST="micro:j

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

2023-06-28 Thread Justin Lu
> 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 dependent on each other (order of execution does not > matter) >

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

2023-06-28 Thread Pavel Rappo
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. While I still cannot see any malignancy in that race, the proposed change makes the code simpler to reason about and probably faster to exe

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

2023-06-28 Thread Brian Goetz
Thanks for these comments.  To respond indirectly to your point about parallelization, many of the challenges arise from a tradeoff made in designing Spliterator, that arises from the desire to be able to extract parallelism not only from the really easy case (arrays), but also more complex cas

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

2023-06-28 Thread Justin Lu
> 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 dependent on each other (order of execution does not > matter) >

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

2023-06-28 Thread Justin Lu
> 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 dependent on each other (order of execution does not > matter) >

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

2023-06-28 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. +1 - Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/14692#pullrequestreview-1503927831

Re: RFR: 8310241: OffsetDateTime compareTo redundant computation [v2]

2023-06-28 Thread Naoto Sato
On Wed, 28 Jun 2023 17:46:51 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

Re: RFR: 8310033: Clarify return value of Java Time compareTo methods [v4]

2023-06-28 Thread Roger Riggs
> In java.time packages, clarify timeline order javadoc to mention "before" and > "after" in the value of the `compareTo` method return values. > Add javadoc @see tags to isBefore and isAfter methods > > Replace use of "negative" and positive with "less than zero" and "greater > than zero" in j

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

2023-06-28 Thread Tagir Valeev
Hello! Interesting read, thanks. I'm the author of the StreamEx library, which actually enhances Stream API, and I use it during my daily job, so I have some thoughts about extending Stream API as well. Below are some of them. First, there are many useful operations that can be trivially defined

Re: RFR: 8310241: OffsetDateTime compareTo redundant computation [v2]

2023-06-28 Thread Roger Riggs
On Wed, 28 Jun 2023 19:35:27 GMT, Naoto Sato wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reopen to work on an improved fix >> Add a test for the specific condition being optimized, the test was >> missing in

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

2023-06-28 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. Looks ok; was this a tool detected race? - Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pu

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v18]

2023-06-28 Thread Mandy Chung
On Tue, 27 Jun 2023 16:33:11 GMT, Chen Liang wrote: >> As John Rose has pointed out in this issue, the current j.l.r.Proxy based >> implementation of MethodHandleProxies.asInterface has a few issues: >> 1. Exposes too much information via Proxy supertype (and WrapperInstance >> interface) >> 2.

Re: RFR: 8310241: OffsetDateTime compareTo redundant computation [v2]

2023-06-28 Thread Naoto Sato
On Wed, 28 Jun 2023 17:46:51 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

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

2023-06-28 Thread Glavo
On Tue, 27 Jun 2023 20:29:36 GMT, Glavo wrote: >> `ByteArray` and `ByteArrayLittleEndian` are very useful tool classes that >> can be used in many places to performance tuning. >> >> Currently they are implemented by `VarHandle`, so using them may have some >> impact on startup time. >> >> Th

Re: RFR: 8310929: Optimization for Integer.toString

2023-06-28 Thread Glavo
On Wed, 28 Jun 2023 17:06:56 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. > > # B

[jdk21] Integrated: 8310914: Remove 2 malformed java/foreign ProblemList entries

2023-06-28 Thread Jorn Vernee
On Tue, 27 Jun 2023 20:48:57 GMT, Jorn Vernee wrote: > Hi all, > > This pull request contains a backport of commit > [f07e396b](https://github.com/openjdk/jdk/commit/f07e396bda4567fd35677704b9aa974426266363) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit bein

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization [v14]

2023-06-28 Thread Paul Sandoz
On Tue, 27 Jun 2023 23:33:25 GMT, Chen Liang wrote: >> test/micro/org/openjdk/bench/java/lang/invoke/LazyStaticColdStart.java line >> 92: >> >>> 90: }); >>> 91: >>> 92: static { >> >> Is this static block required? > > I use this block to remove the overhead around Met

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v18]

2023-06-28 Thread Mandy Chung
On Tue, 27 Jun 2023 16:33:11 GMT, Chen Liang wrote: >> As John Rose has pointed out in this issue, the current j.l.r.Proxy based >> implementation of MethodHandleProxies.asInterface has a few issues: >> 1. Exposes too much information via Proxy supertype (and WrapperInstance >> interface) >> 2.

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization [v14]

2023-06-28 Thread Paul Sandoz
On Wed, 28 Jun 2023 00:08:35 GMT, Chen Liang wrote: >> The MH on VH case is worth considering; the indirect VH cases are already >> covered by `-Djava.lang.invoke.VarHandle.VAR_HANDLE_IDENTITY_ADAPT=true`. > > Done; added a test case to test initialization on toMethodHandle use in > latest push

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization [v17]

2023-06-28 Thread Paul Sandoz
On Wed, 28 Jun 2023 01:34:30 GMT, Chen Liang wrote: >> This patch implements lazy initialization for VarHandle working on static >> fields. It has a good initial call performance. >> >> We introduce a new internal API, `target()` to unpack a lazy VarHandle in VH >> implementation methods. If c

Withdrawn: 8302987: Add uniform and spatially equidistributed bounded double streams to RandomGenerator

2023-06-28 Thread duke
On Wed, 22 Feb 2023 15:23:13 GMT, Raffaello Giulietti wrote: > The `default` method `nextDouble(double origin, double bound)` in > `java.util.random.RandomGenerator` aims at generating a uniformly and > spatially equidistributed random `double` in the left-closed and right-open > range [`orig

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v18]

2023-06-28 Thread Mandy Chung
On Tue, 27 Jun 2023 16:33:11 GMT, Chen Liang wrote: >> As John Rose has pointed out in this issue, the current j.l.r.Proxy based >> implementation of MethodHandleProxies.asInterface has a few issues: >> 1. Exposes too much information via Proxy supertype (and WrapperInstance >> interface) >> 2.

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v18]

2023-06-28 Thread Mandy Chung
On Tue, 27 Jun 2023 16:33:11 GMT, Chen Liang wrote: >> As John Rose has pointed out in this issue, the current j.l.r.Proxy based >> implementation of MethodHandleProxies.asInterface has a few issues: >> 1. Exposes too much information via Proxy supertype (and WrapperInstance >> interface) >> 2.

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

2023-06-28 Thread Sergey Tsypanov
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. It'd be a benign race in case all members of `HashSet` are `final`, but they aren't, so there are no safe publication guarantees.

Re: RFR: 8308995: Update Network IO JFR events to be static mirror events [v4]

2023-06-28 Thread Tim Prinzing
> The socket read/write JFR events currently use instrumentation of java.base > code using templates in the jdk.jfr modules. This results in some java.base > code residing in the jdk.jfr module which is undesirable. > > JDK19 added static support for event classes. The old instrumentor classes

[jdk21] Integrated: 8310405: Linker.Option.firstVariadicArg should specify which index values are valid

2023-06-28 Thread Jorn Vernee
On Wed, 28 Jun 2023 17:34:51 GMT, Jorn Vernee wrote: > Hi all, > > This pull request contains a backport of commit > [7fffdb5e](https://github.com/openjdk/jdk/commit/7fffdb5e60351026c9ee77f438b8fe505d85de4c) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit bein

Re: RFR: 8310929: Optimization for Integer.toString

2023-06-28 Thread Raffaello Giulietti
On Wed, 28 Jun 2023 17:06:56 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. > > # B

Re: [jdk21] RFR: 8310405: Linker.Option.firstVariadicArg should specify which index values are valid

2023-06-28 Thread Maurizio Cimadamore
On Wed, 28 Jun 2023 17:34:51 GMT, Jorn Vernee wrote: > Hi all, > > This pull request contains a backport of commit > [7fffdb5e](https://github.com/openjdk/jdk/commit/7fffdb5e60351026c9ee77f438b8fe505d85de4c) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit bein

Re: RFR: 8310241: OffsetDateTime compareTo redundant computation [v2]

2023-06-28 Thread Roger Riggs
> 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 found > equal, the `compareTo` method unnecessarily does i

Re: RFR: 8310241: OffsetDateTime compareTo redundant computation

2023-06-28 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

[jdk21] RFR: 8310405: Linker.Option.firstVariadicArg should specify which index values are valid

2023-06-28 Thread Jorn Vernee
Hi all, This pull request contains a backport of commit [7fffdb5e](https://github.com/openjdk/jdk/commit/7fffdb5e60351026c9ee77f438b8fe505d85de4c) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Jorn Vernee on 28 Jun 2023 and was revi

Integrated: 8310405: Linker.Option.firstVariadicArg should specify which index values are valid

2023-06-28 Thread Jorn Vernee
On Tue, 20 Jun 2023 14:21:26 GMT, Jorn Vernee wrote: > Improve the specification of `Linker.Option.firstVariadicArg`, by specifying > more clearly which index values are valid. This pull request has now been integrated. Changeset: 7fffdb5e Author:Jorn Vernee URL: https://git.openjd

Re: RFR: 8310405: Linker.Option.firstVariadicArg should specify which index values are valid [v3]

2023-06-28 Thread Maurizio Cimadamore
On Fri, 23 Jun 2023 23:58:05 GMT, Jorn Vernee wrote: >> Improve the specification of `Linker.Option.firstVariadicArg`, by specifying >> more clearly which index values are valid. > > Jorn Vernee has updated the pull request incrementally with three additional > commits since the last revision:

RFR: 8310929: Optimization for Integer.toString

2023-06-28 Thread 温绍锦
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. # Benchmark Result make test TEST="micro:java.lang.Integers.to

RFR: 8311043: Remove trailing blank lines in source files

2023-06-28 Thread Leo Korinth
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 this in jcheck for Skara, however it seems jcheck code handling h

Re: RFR: 8310232: java.time.Clock$TickClock.millis() fails in runtime when tick is 1 microsecond [v2]

2023-06-28 Thread Naoto Sato
On Wed, 28 Jun 2023 14:12:53 GMT, Roger Riggs wrote: >> src/java.base/share/classes/java/time/Clock.java line 762: >> >>> 760: public long millis() { >>> 761: long millis = baseClock.millis(); >>> 762: return tickNanos < 1000_000L ? millis : millis - >>> Math.flo

Re: RFR: 8311020: Typo cleanup in Classfile API [v2]

2023-06-28 Thread Adam Sotona
On Wed, 28 Jun 2023 14:12:12 GMT, Chen Liang wrote: >> This is a cleanup patch that fixes: >> 1. `ClassfileBuilder` should be sealed but was not; it's now sealed. >> 2. Various typo fixes, including spelling errors, wrong descriptions, and >> unnecessary full qualifications for classes in the sa

Re: RFR: 8310848: Convert ClassDesc and MethodTypeDesc to be stored in static final fields [v5]

2023-06-28 Thread Adam Sotona
On Wed, 28 Jun 2023 15:30:37 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

Re: RFR: 8310848: Convert ClassDesc and MethodTypeDesc to be stored in static final fields [v4]

2023-06-28 Thread Chen Liang
On Tue, 27 Jun 2023 14:20:20 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

Re: RFR: 8310848: Convert ClassDesc and MethodTypeDesc to be stored in static final fields [v5]

2023-06-28 Thread Chen Liang
> 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 main codebase and benchmarks; tests are left untouched. >

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

2023-06-28 Thread Pavel Rappo
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. To put this into perspective, the race you are trying to fix seems benign, so the PR qualifies as a performance improvement, not a bug fix.

Re: RFR: 8310232: java.time.Clock$TickClock.millis() fails in runtime when tick is 1 microsecond [v2]

2023-06-28 Thread Roger Riggs
On Wed, 28 Jun 2023 10:12:18 GMT, Aleksey Shipilev wrote: >> Naoto Sato 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 four additional >> commi

Re: RFR: 8311020: Typo cleanup in Classfile API [v2]

2023-06-28 Thread Chen Liang
On Wed, 28 Jun 2023 08:56:28 GMT, Adam Sotona wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix classfile test typos detected by IDE, fix tests > > src/java.base/share/classes/jdk/internal/classfile/impl/ClassPrint

Re: RFR: 8311020: Typo cleanup in Classfile API [v2]

2023-06-28 Thread Chen Liang
> This is a cleanup patch that fixes: > 1. `ClassfileBuilder` should be sealed but was not; it's now sealed. > 2. Various typo fixes, including spelling errors, wrong descriptions, and > unnecessary full qualifications for classes in the same package. > > Requesting a review from @asotona. There'

Re: RFR: JDK-8310550: Adjust references to rt.jar

2023-06-28 Thread Matthias Baesken
On Wed, 28 Jun 2023 13:16:30 GMT, Alan Bateman wrote: >> Hi Alan, regarding usage of class VM I get >> 'package jdk.internal.misc is declared in module java.base, which does not >> export it to module java.sql' >> Is there any concern to export it as well to module java.sql ? >> And btw did yo

Re: RFR: JDK-8310550: Adjust references to rt.jar

2023-06-28 Thread Alan Bateman
On Wed, 28 Jun 2023 12:54:10 GMT, Matthias Baesken wrote: > Hi Alan, regarding usage of class VM I get 'package jdk.internal.misc is > declared in module java.base, which does not export it to module java.sql' Is > there any concern to export it as well to module java.sql ? And btw did you > m

Re: RFR: JDK-8310550: Adjust references to rt.jar

2023-06-28 Thread Matthias Baesken
On Thu, 22 Jun 2023 14:20:30 GMT, Alan Bateman wrote: >> There are a few references to rt.jar in comments and in the codebase itself. >> Some of them might be removed or adjusted. > > src/java.sql/share/classes/java/sql/DriverManager.java line 658: > >> 656: * (which is invoking this c

Re: RFR: 8310848: Convert ClassDesc and MethodTypeDesc to be stored in static final fields [v4]

2023-06-28 Thread Adam Sotona
On Tue, 27 Jun 2023 14:20:20 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

RFR: 8311030: ResourceBundle.handleKeySet() is racy

2023-06-28 Thread Sergey Tsypanov
Double-checked locking should rely on local variable to avoid racy reads from volatile field. - Commit messages: - 8311030: ResourceBundle.handleKeySet() is racy Changes: https://git.openjdk.org/jdk/pull/14692/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14692&range=00

Re: RFR: 8310232: java.time.Clock$TickClock.millis() fails in runtime when tick is 1 microsecond [v2]

2023-06-28 Thread Aleksey Shipilev
On Tue, 27 Jun 2023 16:34:40 GMT, Naoto Sato wrote: >> Fixing the `/ by zero` exception with tick durations less than a millisecond. > > Naoto Sato 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

Re: RFR: 8310901: Convert String::newStringNoRepl with Latin-1 to String::newStringLatin1NoRepl [v4]

2023-06-28 Thread Glavo
On Wed, 28 Jun 2023 01:45:51 GMT, Chen Liang wrote: > On a side note, `NoRepl` means "no replication", implying the passed array is > already trusted. I think you should do something like this instead: I think `NoRepl` means "no replace", it's an ambiguous acronym. It cannot be replaced by `ne

Re: RFR: 8311020: Typo cleanup in Classfile API

2023-06-28 Thread Adam Sotona
On Wed, 28 Jun 2023 06:09:08 GMT, Chen Liang wrote: > This is a cleanup patch that fixes: > 1. `ClassfileBuilder` should be sealed but was not; it's now sealed. > 2. Various typo fixes, including spelling errors, wrong descriptions, and > unnecessary full qualifications for classes in the same p

Re: RFR: 8301569: jmod list option and jimage list --help not interpreted correctly on turkish locale [v4]

2023-06-28 Thread Jaikiran Pai
On Tue, 27 Jun 2023 15:20:33 GMT, Glavo wrote: >> When the default Locale is `tr`, the jmod and jimage commands have the >> following problems: >> >> * The jmod command does not correctly recognize the `list` mode typed in >> lowercase; >> * The jimage command cannot obtain the help informatio

Re: RFR: JDK-8311009: Long.toUnsignedString(long, int) doesn't have to create a BigInteger [v2]

2023-06-28 Thread Raffaello Giulietti
On Wed, 28 Jun 2023 07:57:25 GMT, Tingjun Yuan wrote: >> This PR changes the implementation of `Long.toUnsignedString(long, int)` for >> "default" radices, which avoids creating a `BigInteger` and makes use of >> `Long.divideUnsigned` and `Long.remainderUnsigned`. >> >> I've run the test on `t

Re: RFR: JDK-8311009: Long.toUnsignedString(long, int) doesn't have to create a BigInteger

2023-06-28 Thread Tingjun Yuan
On Mon, 26 Jun 2023 14:58:56 GMT, Tingjun Yuan wrote: > This PR changes the implementation of `Long.toUnsignedString(long, int)` for > "default" radices, which avoids creating a `BigInteger` and makes use of > `Long.divideUnsigned` and `Long.remainderUnsigned`. > > I've run the test on `test/j

Re: RFR: JDK-8311009: Long.toUnsignedString(long, int) doesn't have to create a BigInteger [v2]

2023-06-28 Thread Tingjun Yuan
> This PR changes the implementation of `Long.toUnsignedString(long, int)` for > "default" radices, which avoids creating a `BigInteger` and makes use of > `Long.divideUnsigned` and `Long.remainderUnsigned`. > > I've run the test on `test/jdk/java/lang/Long/Unsigned.java` and it works > correct

Re: RFR: JDK-8311009: Long.toUnsignedString(long, int) doesn't have to create a BigInteger

2023-06-28 Thread Raffaello Giulietti
On Mon, 26 Jun 2023 14:58:56 GMT, Tingjun Yuan wrote: > This PR changes the implementation of `Long.toUnsignedString(long, int)` for > "default" radices, which avoids creating a `BigInteger` and makes use of > `Long.divideUnsigned` and `Long.remainderUnsigned`. > > I've run the test on `test/j

Withdrawn: 8289220: Locale.forLanguageTag throws NPE due to soft ref used in locale cache being cleared

2023-06-28 Thread SUN Guoyun
On Tue, 30 May 2023 08:31:08 GMT, SUN Guoyun wrote: > command: make test CONF=fastdebug JTREG="VM_OPTIONS=-Xcomp" > TEST=gc/TestAllocHumongousFragment.java > error info: > > Caused by: java.lang.NullPointerException: Cannot invoke > "sun.util.locale.BaseLocale.getVariant()" because "base" is

Re: RFR: 8294977: Convert test/jdk/java tests from ASM library to Classfile API [v9]

2023-06-28 Thread Chen Liang
> Summaries: > 1. A few recommendations about updating the constant API is made at > https://mail.openjdk.org/pipermail/classfile-api-dev/2023-March/000233.html > and I may update this patch shall the API changes be integrated before > 2. One ASM library-specific test, `LambdaAsm` is removed. Oth