Integrated: 8299504: Resolve `uses` and `provides` at run time if the service is optional and missing

2025-01-24 Thread Alan Bateman
On Thu, 16 Jan 2025 11:38:19 GMT, Alan Bateman wrote: > Extend the support for optional dependences to allow for a service to be > optional. The post-resolution consistency check specified by > `Configuration.resolve` is relaxed to allow for the possibility that the > service from a module in

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer to use java.lang.ref.Cleaner [v9]

2025-01-24 Thread Aleksey Shipilev
On Fri, 24 Jan 2025 22:01:59 GMT, Brent Christian wrote: > Did the change to > `test/jdk/sun/security/provider/FileInputStreamPool/FileInputStreamPoolTest.java` > get lost? I'm pretty sure it was updated, but I no longer see that in the > changes, and it failed in my automated test run. It wa

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer to use java.lang.ref.Cleaner [v10]

2025-01-24 Thread Aleksey Shipilev
> DirectByteBuffers are still using old `jdk.internal.ref.Cleaner` > implementation. That implementation carries a doubly-linked list, and so > makes DBB suffer from the same issue fixed for generic > `java.lang.ref.Cleaner` users with > [JDK-8343704](https://bugs.openjdk.org/browse/JDK-8343704

Re: RFR: 8347009: Speed ​​up parseInt and parseLong [v9]

2025-01-24 Thread Shaojin Wen
> This is an optimization for decimal Integer.parseInt and Long.parseLong, > which improves performance by about 10%. The optimization includes: > 1. Improve performance by parsing 2 numbers at a time, which has performance > improvements for numbers with length >= 3. > 2. It uses charAt(0) for t

Withdrawn: 8315585: Optimization for decimal to string

2025-01-24 Thread Shaojin Wen
On Mon, 11 Nov 2024 11:21:01 GMT, Shaojin Wen wrote: > Continue to complete PR #16006 and PR #21593 to improve BigDecimal::toString > and BigDecimal::toPlainString performance and reduce duplicate code This pull request has been closed without being integrated. - PR: https://git.o

Integrated: 8343962: [REDO] Move getChars to DecimalDigits

2025-01-24 Thread Shaojin Wen
On Tue, 12 Nov 2024 01:25:16 GMT, Shaojin Wen wrote: > This PR is a resubmission after PR #21593 was rolled back, and the unsafe > offset overflow issue has been fixed. > > 1) Move getChars methods of StringLatin1 and StringUTF16 to DecimalDigits to > reduce duplication. > > 2) HexDigits and

Re: RFR: 8347009: Speed ​​up parseInt and parseLong [v8]

2025-01-24 Thread Shaojin Wen
On Sat, 25 Jan 2025 02:20:34 GMT, Shaojin Wen wrote: >> This is an optimization for decimal Integer.parseInt and Long.parseLong, >> which improves performance by about 10%. The optimization includes: >> 1. Improve performance by parsing 2 numbers at a time, which has performance >> improvements

Re: RFR: 8345687: Improve the implementation of SegmentFactories::allocateSegment [v3]

2025-01-24 Thread Quan Anh Mai
On Fri, 24 Jan 2025 11:57:06 GMT, Maurizio Cimadamore wrote: >> The main goal here is that passing/receiving raw addresses as longs is >> cheaper than as `MemorySegment`s. > > But the address is immediately converted to memory segment using > MemorySegment::ofAddress, which is what the linker

Re: RFR: 8347009: Speed ​​up parseInt and parseLong [v8]

2025-01-24 Thread Shaojin Wen
> This is an optimization for decimal Integer.parseInt and Long.parseLong, > which improves performance by about 10%. The optimization includes: > 1. Improve performance by parsing 2 numbers at a time, which has performance > improvements for numbers with length >= 3. > 2. It uses charAt(0) for t

Re: [jdk24] RFR: 8347498: JDK 24 RDP2 L10n resource files update

2025-01-24 Thread Iris Clark
On Fri, 24 Jan 2025 21:51:39 GMT, Justin Lu wrote: > Please review this PR which is a backport of > [dec93675](https://github.com/openjdk/jdk/commit/dec93675ab3e4c271b14a254df75dc838f1346ea) > that updates the l10n translations for jdk24. > > The commit being backported was authored by Justin

Re: RFR: 8342465: Improve API documentation for java.lang.classfile [v2]

2025-01-24 Thread Joe Darcy
On Fri, 24 Jan 2025 22:42:27 GMT, Chen Liang wrote: >> This is the last piece in the API documentation improvement of the >> Class-File API. >> >> This includes general documentation about transforms, models (and >> traversals), options, constants, and CodeBuilder factories. In particular, >

Re: RFR: 8347009: Speed ​​up parseInt and parseLong [v7]

2025-01-24 Thread Shaojin Wen
> This is an optimization for decimal Integer.parseInt and Long.parseLong, > which improves performance by about 10%. The optimization includes: > 1. Improve performance by parsing 2 numbers at a time, which has performance > improvements for numbers with length >= 3. > 2. It uses charAt(0) for t

RFR: 8348205: Improve cutover time selection when building available currencies set

2025-01-24 Thread Justin Lu
Please review this PR which improves the time measurement for cut-over time comparisons when building the available set of currencies in _java.util.Currency._ Currently, a new time was measured for each special case currency. This PR updates the behavior to use the same time for all such cases

Re: RFR: 8343191: Cgroup v1 subsystem fails to set subsystem path [v11]

2025-01-24 Thread Sergey Chernyshev
On Thu, 12 Dec 2024 01:11:33 GMT, Sergey Chernyshev wrote: >> Cgroup V1 subsustem fails to initialize mounted controllers properly in >> certain cases, that may lead to controllers left undetected/inactive. We >> observed the behavior in CloudFoundry deployments, it affects also host >> syste

Re: RFR: 8342465: Improve API documentation for java.lang.classfile [v2]

2025-01-24 Thread Chen Liang
On Fri, 24 Jan 2025 22:42:27 GMT, Chen Liang wrote: >> This is the last piece in the API documentation improvement of the >> Class-File API. >> >> This includes general documentation about transforms, models (and >> traversals), options, constants, and CodeBuilder factories. In particular, >

Re: [jdk24] RFR: 8347498: JDK 24 RDP2 L10n resource files update

2025-01-24 Thread Naoto Sato
On Fri, 24 Jan 2025 21:51:39 GMT, Justin Lu wrote: > Please review this PR which is a backport of > [dec93675](https://github.com/openjdk/jdk/commit/dec93675ab3e4c271b14a254df75dc838f1346ea) > that updates the l10n translations for jdk24. > > The commit being backported was authored by Justin

Re: RFR: 8342465: Improve API documentation for java.lang.classfile [v2]

2025-01-24 Thread Chen Liang
> This is the last piece in the API documentation improvement of the Class-File > API. > > This includes general documentation about transforms, models (and > traversals), options, constants, and CodeBuilder factories. In particular, > this preserves the package summary to avoid extra disrupti

Re: RFR: 8342807: Update links in java.base to use https:// [v5]

2025-01-24 Thread Magnus Ihse Bursie
On Tue, 21 Jan 2025 13:56:30 GMT, Eirik Bjørsnøs wrote: >> Please review this cleanup PR which updates a total of 12 links to external >> documentation or references in `java.base` to use https instead of plain >> text http. >> >> Links in `java.security` and `share/data/tzdata` are excluded f

Re: [jdk24] RFR: 8347498: JDK 24 RDP2 L10n resource files update

2025-01-24 Thread Damon Nguyen
On Fri, 24 Jan 2025 21:51:39 GMT, Justin Lu wrote: > Please review this PR which is a backport of > [dec93675](https://github.com/openjdk/jdk/commit/dec93675ab3e4c271b14a254df75dc838f1346ea) > that updates the l10n translations for jdk24. > > The commit being backported was authored by Justin

Re: Factory methods for SequencedSet and SequencedMap

2025-01-24 Thread Joseph D. Darcy
On 1/17/2025 5:49 PM, David Alayachew wrote: It definitely helps. I guess my next question is, there is no bridge method, which is why this fails. Why not add a bridge method? What is stopping Java from doing this? The default response to the question "Should we fundamentally change how

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer to use java.lang.ref.Cleaner [v9]

2025-01-24 Thread Brent Christian
On Fri, 24 Jan 2025 11:30:16 GMT, Aleksey Shipilev wrote: > Testing is still clean on my side. I would appreciate if folks can run this > through their CIs. > > I am planning to integrate this on Monday, as long as we discover no new > issues. Did the change to `test/jdk/sun/security/provide

[jdk24] RFR: 8347498: JDK 24 RDP2 L10n resource files update

2025-01-24 Thread Justin Lu
Please review this PR which is a backport of [dec93675](https://github.com/openjdk/jdk/commit/dec93675ab3e4c271b14a254df75dc838f1346ea) that updates the l10n translations for jdk24. The commit being backported was authored by Justin Lu on 24 Jan 2025 and was reviewed by Severin Gehwolf, Damon N

Integrated: 8347498: JDK 24 RDP2 L10n resource files update

2025-01-24 Thread Justin Lu
On Fri, 17 Jan 2025 22:29:15 GMT, Justin Lu wrote: > Please review this PR which contains the l10n translations for between RDP1 > and RDP2 for the JDK24 stabilization branch. > > Note that these translations are only associated with changes made to the > stabilization branch. This PR will not

Re: RFR: 8347498: JDK 24 RDP2 L10n resource files update [v2]

2025-01-24 Thread Justin Lu
On Wed, 22 Jan 2025 18:39:47 GMT, Justin Lu wrote: >> Please review this PR which contains the l10n translations for between RDP1 >> and RDP2 for the JDK24 stabilization branch. >> >> Note that these translations are only associated with changes made to the >> stabilization branch. This PR wil

Re: Proposal to extend Math.min and Math.max to support multiple parameters

2025-01-24 Thread Chen Liang
On a side note, there are already Collections.min and Collections.max. We can use Collections.min(Arrays.asList(v1, v2, v3)) to find the minimum, too, and it works for antique Java versions. Regards, Chen From: core-libs-dev on behalf of Joseph D. Darcy Sent:

Re: Proposal to extend Math.min and Math.max to support multiple parameters

2025-01-24 Thread Joseph D. Darcy
Hello Aviad, A brief reply here, there is some utility in having direct support for finding the min or max over an aggregate of data and min/max methods taking an array is something that could have been added to the platform at any point since its inception. The fact that such methods weren't

Re: RFR: 8343962: [REDO] Move getChars to DecimalDigits [v14]

2025-01-24 Thread Claes Redestad
On Mon, 20 Jan 2025 14:32:22 GMT, Shaojin Wen wrote: >> This PR is a resubmission after PR #21593 was rolled back, and the unsafe >> offset overflow issue has been fixed. >> >> 1) Move getChars methods of StringLatin1 and StringUTF16 to DecimalDigits to >> reduce duplication. >> >> 2) HexDigi

Integrated: 8291027: Some of TimeZone methods marked 'synchronized' unnecessarily

2025-01-24 Thread Andrey Turbanov
On Tue, 16 Jan 2024 10:19:44 GMT, Andrey Turbanov wrote: > There are 3 methods in `java.util.TimeZone` which are `public static` and > marked as `synchronized`: > 1. getTimeZone(String) > 2. getAvailableIDs(int) > 3. getAvailableIDs() > > This means it is a bottle neck for the whole VM. > I've

Re: RFR: 4452735: Add GZIPOutputStream constructor to specify Deflater [v3]

2025-01-24 Thread Eirik Bjørsnøs
On Thu, 2 Jan 2025 18:26:16 GMT, Archie Cobbs wrote: >> The class `GZIPOutputStream` extends `DeflaterOutputStream`, which is >> logical because the GZIP encoding is based on ZLIB "deflate" encoding. >> >> However, while `DeflaterOutputStream` provides constructors that take a >> custom `Defla

Re: RFR: 8342807: Update links in java.base to use https:// [v5]

2025-01-24 Thread Roger Riggs
On Tue, 21 Jan 2025 13:56:30 GMT, Eirik Bjørsnøs wrote: >> Please review this cleanup PR which updates a total of 12 links to external >> documentation or references in `java.base` to use https instead of plain >> text http. >> >> Links in `java.security` and `share/data/tzdata` are excluded f

Re: RFR: 4452735: Add GZIPOutputStream constructor to specify Deflater

2025-01-24 Thread Lance Andersen
On Fri, 19 Jul 2024 15:16:01 GMT, Lance Andersen wrote: >>> I understand the request here, but is there a current use case for needing >>> a custom Deflater? >> >> I think the primary use case is when you want to set a non-default >> compression level, e.g., "best" or "fast". This is a pretty

Re: RFR: 8347491: IllegalArgumentationException thrown by ThreadPoolExecutor doesn't have a useful message

2025-01-24 Thread kerr
On Sat, 11 Jan 2025 07:10:53 GMT, He-Pin(kerr) wrote: > Motivation: > When a user passes a wrong parameter, the current implementation throws an > IllegalArgumentException with an error message `null`, which is not helpful. > > Modification: > Add detail error messages. > > Result: > Helpful m

Re: RFR: 8347491: IllegalArgumentationException thrown by ThreadPoolExecutor doesn't have a useful message

2025-01-24 Thread Julian Waters
On Sat, 11 Jan 2025 07:10:53 GMT, He-Pin(kerr) wrote: > Motivation: > When a user passes a wrong parameter, the current implementation throws an > IllegalArgumentException with an error message `null`, which is not helpful. > > Modification: > Add detail error messages. > > Result: > Helpful m

RFR: 8347491: IllegalArgumentationException thrown by ThreadPoolExecutor doesn't have a useful message

2025-01-24 Thread kerr
Motivation: When a user passes a wrong parameter, the current implementation throws an IllegalArgumentException with an error message `null`, which is not helpful. Modification: Add detail error messages. Result: Helpful messages. - Commit messages: - . - chore: add messages for

Re: RFR: 8342807: Update links in java.base to use https:// [v5]

2025-01-24 Thread Eirik Bjørsnøs
On Tue, 21 Jan 2025 16:25:34 GMT, Roger Riggs wrote: > I agree doing (in this PR) anything more than fix the link is out of scope. Good. My understanding is that we are converging on a consensus to: * Change the broken IBM AIX emprempral port link to the suggested IBM FAQ one in `PortConfig.j

Re: RFR: 8347009: Speed ​​up parseInt and parseLong [v6]

2025-01-24 Thread Raffaello Giulietti
On Tue, 14 Jan 2025 15:53:36 GMT, Shaojin Wen wrote: >> This is an optimization for decimal Integer.parseInt and Long.parseLong, >> which improves performance by about 10%. The optimization includes: >> 1. Improve performance by parsing 2 numbers at a time, which has performance >> improvements

Re: RFR: 8344943: Mark not subclassable classes final in java.base exported classes [v2]

2025-01-24 Thread Eirik Bjørsnøs
On Fri, 17 Jan 2025 18:19:56 GMT, Eirik Bjørsnøs wrote: >> Please review this PR which adds the `final` modifier to non-subclassable >> classes in `java.base`. >> >> The classes were identified using an automated analysis. See CSR for details. >> >> Besides simply adding the `final` access mod

Integrated: 8344943: Mark not subclassable classes final in java.base exported classes

2025-01-24 Thread Eirik Bjørsnøs
On Tue, 26 Nov 2024 13:04:41 GMT, Eirik Bjørsnøs wrote: > Please review this PR which adds the `final` modifier to non-subclassable > classes in `java.base`. > > The classes were identified using an automated analysis. See CSR for details. > > Besides simply adding the `final` access modifier,

Re: RFR: 8347009: Speed ​​up parseInt and parseLong [v6]

2025-01-24 Thread Shaojin Wen
On Fri, 24 Jan 2025 18:42:44 GMT, Raffaello Giulietti wrote: > Correction: I forgot to add a check for `result <= 0` in the `while` > condition. Without it, `Integer.parseInt("0214748369900")` wrongly returns > `5100`, for example. > > The correction has no statistical impact on the benchmark

Re: RFR: 8347009: Speed ​​up parseInt and parseLong [v6]

2025-01-24 Thread Raffaello Giulietti
On Tue, 14 Jan 2025 15:53:36 GMT, Shaojin Wen wrote: >> This is an optimization for decimal Integer.parseInt and Long.parseLong, >> which improves performance by about 10%. The optimization includes: >> 1. Improve performance by parsing 2 numbers at a time, which has performance >> improvements

Re: RFR: 8347009: Speed ​​up parseInt and parseLong [v6]

2025-01-24 Thread Raffaello Giulietti
On Tue, 14 Jan 2025 15:53:36 GMT, Shaojin Wen wrote: >> This is an optimization for decimal Integer.parseInt and Long.parseLong, >> which improves performance by about 10%. The optimization includes: >> 1. Improve performance by parsing 2 numbers at a time, which has performance >> improvements

Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs [v4]

2025-01-24 Thread Naoto Sato
On Fri, 24 Jan 2025 18:00:06 GMT, Justin Lu wrote: >> Please review this PR and CSR which add a pair of methods to >> _java.util.TimeZone_ that return a stream of the available IDs. See the CSR >> for the motivation. >> >> A number of existing tests are modified to use the new methods. See >>

Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs [v4]

2025-01-24 Thread Justin Lu
> Please review this PR and CSR which add a pair of methods to > _java.util.TimeZone_ that return a stream of the available IDs. See the CSR > for the motivation. > > A number of existing tests are modified to use the new methods. See > _test/jdk/java/util/TimeZone/AvailableIDsTest.java_ which

Re: RFR: 8291027: Some of TimeZone methods marked 'synchronized' unnecessarily [v2]

2025-01-24 Thread Justin Lu
On Thu, 16 Jan 2025 13:02:34 GMT, Andrey Turbanov wrote: >> There are 3 methods in `java.util.TimeZone` which are `public static` and >> marked as `synchronized`: >> 1. getTimeZone(String) >> 2. getAvailableIDs(int) >> 3. getAvailableIDs() >> >> This means it is a bottle neck for the whole VM.

Re: RFR: 8291027: Some of TimeZone methods marked 'synchronized' unnecessarily [v2]

2025-01-24 Thread Naoto Sato
On Thu, 16 Jan 2025 13:02:34 GMT, Andrey Turbanov wrote: >> There are 3 methods in `java.util.TimeZone` which are `public static` and >> marked as `synchronized`: >> 1. getTimeZone(String) >> 2. getAvailableIDs(int) >> 3. getAvailableIDs() >> >> This means it is a bottle neck for the whole VM.

Re: RFR: 8348586: Optionally silence make warnings about non-control variables

2025-01-24 Thread Magnus Ihse Bursie
On Fri, 24 Jan 2025 17:08:42 GMT, Magnus Ihse Bursie wrote: > When you set a variable on the make command line that is not a known control > variable, make emits a note like this: > > > Note: Command line contains non-control variables: > * MODULES= > * IDEA_OUTPUT=/mnt/h/openjdk/git-jdk2/.ide

RFR: 8348586: Optionally silence make warnings about non-control variables

2025-01-24 Thread Magnus Ihse Bursie
When you set a variable on the make command line that is not a known control variable, make emits a note like this: Note: Command line contains non-control variables: * MODULES= * IDEA_OUTPUT=/mnt/h/openjdk/git-jdk2/.idea Make sure it is not mistyped, and that you intend to override this variabl

Re: RFR: 8347825: Make IDEA ide support use proper build system mechanisms [v2]

2025-01-24 Thread Magnus Ihse Bursie
On Wed, 15 Jan 2025 16:13:04 GMT, Magnus Ihse Bursie wrote: >> The idea.sh script which creates a configuration for IDEA does at some point >> call a makefile, to extract information from the build system. However, this >> is done in an ad-hoc manner that does not fit properly in the build syst

Re: RFR: 8347825: Make IDEA ide support use proper build system mechanisms [v2]

2025-01-24 Thread Magnus Ihse Bursie
On Fri, 24 Jan 2025 15:45:19 GMT, Maurizio Cimadamore wrote: > The additional warnings seem to be creating some confusion among new adopters > of the script Ok, that's bad. I'll fix it. - PR Comment: https://git.openjdk.org/jdk/pull/23140#issuecomment-2612943000

Re: RFR: 8347825: Make IDEA ide support use proper build system mechanisms [v2]

2025-01-24 Thread Maurizio Cimadamore
On Wed, 15 Jan 2025 16:13:04 GMT, Magnus Ihse Bursie wrote: >> The idea.sh script which creates a configuration for IDEA does at some point >> call a makefile, to extract information from the build system. However, this >> is done in an ad-hoc manner that does not fit properly in the build syst

Re: RFR: 8344802: Crash in StubRoutines::verify_mxcsr with -XX:+EnableX86ECoreOpts and -Xcheck:jni [v3]

2025-01-24 Thread Jorn Vernee
On Thu, 23 Jan 2025 18:23:01 GMT, Volodymyr Paprotski wrote: >> Volodymyr Paprotski has updated the pull request incrementally with one >> additional commit since the last revision: >> >> whitespace > > src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp line 185: > >> 183: // On ECore,

Re: RFR: 8342465: Improve API documentation for java.lang.classfile

2025-01-24 Thread Adam Sotona
On Thu, 23 Jan 2025 19:48:55 GMT, Chen Liang wrote: > This is the last piece in the API documentation improvement of the Class-File > API. > > This includes general documentation about transforms, models (and > traversals), options, constants, and CodeBuilder factories. In particular, > this

[jdk24] Integrated: 8342466: Improve API documentation for java.lang.classfile.attribute

2025-01-24 Thread Chen Liang
On Thu, 23 Jan 2025 16:55:20 GMT, Chen Liang wrote: > This is a non-clean backport the java.lang.classfile.attribute documentation > improvements 973c630777d4075bc85c7ddc1eb02cc65904344d to JDK 24 , the release > where the API is finalized. Also backported a tier1 docs build hotfix > 28e01e655

Re: [jdk24] RFR: 8342466: Improve API documentation for java.lang.classfile.attribute

2025-01-24 Thread Chen Liang
On Thu, 23 Jan 2025 16:55:20 GMT, Chen Liang wrote: > This is a non-clean backport the java.lang.classfile.attribute documentation > improvements 973c630777d4075bc85c7ddc1eb02cc65904344d to JDK 24 , the release > where the API is finalized. Also backported a tier1 docs build hotfix > 28e01e655

Re: RFR: 8291027: Some of TimeZone methods marked 'synchronized' unnecessarily [v2]

2025-01-24 Thread Chen Liang
On Thu, 16 Jan 2025 13:02:34 GMT, Andrey Turbanov wrote: >> There are 3 methods in `java.util.TimeZone` which are `public static` and >> marked as `synchronized`: >> 1. getTimeZone(String) >> 2. getAvailableIDs(int) >> 3. getAvailableIDs() >> >> This means it is a bottle neck for the whole VM.

Re: Adding BigDecimal.valueOf(float val) constructor

2025-01-24 Thread Jan Kowalski
I ran the benchmark once again for a smaller float, and a bigger float, and seems like suggested implementation still outperforms current one, however as the number grows the difference seems to be less significant. Benchmark (iterations) (value) Mod

Re: RFR: 8347123: Add missing @serial tags to other modules [v2]

2025-01-24 Thread Hannes Wallnöfer
On Thu, 23 Jan 2025 16:16:03 GMT, Hannes Wallnöfer wrote: >> There's not a great number of "good" examples of this in the JDK, so >> probably OK except it >> seems like most cases will do it like a normal javadoc method so you'd want >> an @param tag too. >> >> note : this is a desktop class,

Re: RFR: 8345687: Improve the implementation of SegmentFactories::allocateSegment [v3]

2025-01-24 Thread Maurizio Cimadamore
On Wed, 22 Jan 2025 16:45:39 GMT, Quan Anh Mai wrote: >> test/micro/org/openjdk/bench/java/lang/foreign/AllocTest.java line 77: >> >>> 75: var freeAddr = lookup.findOrThrow("free"); >>> 76: CALLOC = linker.downcallHandle(callocAddr, >>> FunctionDescriptor.of(ValueLayout.

Re: RFR: 8342103: C2 compiler support for Float16 type and associated scalar operations [v12]

2025-01-24 Thread Jatin Bhateja
> Hi All, > > This patch adds C2 compiler support for various Float16 operations added by > [PR#22128](https://github.com/openjdk/jdk/pull/22128) > > Following is the summary of changes included with this patch:- > > 1. Detection of various Float16 operations through inline expansion or > patt

Re: New candidate JEP: 502: Stable Values (Preview)

2025-01-24 Thread Maurizio Cimadamore
Hi Alan, I think it's fair to say that the StableValue API is a safe view of the `@Stable` JVM internal annotation that has been around for quite some time. If you look inside the JDK code, you will see that `@Stable` is used frequently in conjunction with lazily populated caches of method han

Re: Adding BigDecimal.valueOf(float val) constructor

2025-01-24 Thread Raffaello Giulietti
Hi Jan, just to note that the benchmark results only measure the case 0.1f. For more general floats, the perf gains might look less impressive (but I didn't check). Anyway, a fresh name seems to be the less risky solution, if we agree that the problem is widespread enough to justify adding t

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer to use java.lang.ref.Cleaner [v9]

2025-01-24 Thread Aleksey Shipilev
On Thu, 23 Jan 2025 08:51:38 GMT, Aleksey Shipilev wrote: >> DirectByteBuffers are still using old `jdk.internal.ref.Cleaner` >> implementation. That implementation carries a doubly-linked list, and so >> makes DBB suffer from the same issue fixed for generic >> `java.lang.ref.Cleaner` users w

Re: RFR: 8347123: Add missing @serial tags to other modules [v2]

2025-01-24 Thread Hannes Wallnöfer
> Please review a doc-only change to mostly add missing `@serial` javadoc tags. > This is a sub-task of [JDK-8286931] to allow us to re-enable the javadoc > `-serialwarn` option in the JDK doc build, which has been disabled since JDK > 19. > > [JDK-8286931]: https://bugs.openjdk.org/browse/JDK-

Re: Adding BigDecimal.valueOf(float val) constructor

2025-01-24 Thread Jan Kowalski
Thank you all for your replies! I'm aware of the workaround (we are using this approach in our project) and the problematic issues with decimal conversions. However, I also think that we should make sure that the behaviour of the code is more predictable. For me and other developers, it might be c

Re: RFR: 8342103: C2 compiler support for Float16 type and associated scalar operations [v11]

2025-01-24 Thread Jatin Bhateja
On Fri, 17 Jan 2025 16:02:55 GMT, Jatin Bhateja wrote: >> Hi All, >> >> This patch adds C2 compiler support for various Float16 operations added by >> [PR#22128](https://github.com/openjdk/jdk/pull/22128) >> >> Following is the summary of changes included with this patch:- >> >> 1. Detection

Re: Adding BigDecimal.valueOf(float val) constructor

2025-01-24 Thread Raffaello Giulietti
Hi Jan, to add to the other replies, it's a bit unfortunate that the doc of valueOf(double) suggests that this method should preferably be used to convert _float_ values as well. You are right that your valueOf(float) would be a better fit, but again, that's hardly possible for source compat

Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs [v3]

2025-01-24 Thread Andrey Turbanov
On Thu, 23 Jan 2025 22:48:17 GMT, Chen Liang wrote: >> Right, it can be removed. Actually, I think `getAvailableIDs()` and >> `getAvailableIDs(int)` also do not need to be synchronized. The internal IDs >> are eagerly initialized in the static block of `ZoneInfoFile.java` and are >> effectivel

Re: [jdk24] RFR: 8342466: Improve API documentation for java.lang.classfile.attribute

2025-01-24 Thread Adam Sotona
On Thu, 23 Jan 2025 16:55:20 GMT, Chen Liang wrote: > This is a non-clean backport the java.lang.classfile.attribute documentation > improvements 973c630777d4075bc85c7ddc1eb02cc65904344d to JDK 24 , the release > where the API is finalized. Also backported a tier1 docs build hotfix > 28e01e655