From lkorinth at openjdk.org Mon Sep 1 08:07:48 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Mon, 1 Sep 2025 08:07:48 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v8] In-Reply-To: References: Message-ID: <1SVkL88-a7Es6cosezvIjvZ63F4nv-2Kut2oKG27Eo8=.f2e2a083-b51d-4df9-ab6e-ec324467ebb9@github.com> > This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) > > In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). > > My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. > > These fixes have been created when I have ploughed through test cases: > JDK-8352719: Add an equals sign to the modules statement > JDK-8352709: Remove bad timing annotations from WhileOpTest.java > JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test > CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE > CODETOOLS-7903961: Make default timeout configurable > > After the review, I will update the copyrights. > > I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. > > I got 4 timing related faults: > 1) runtime/Thread/TestThreadDumpMonitorContention.java > This is probably: https://bugs.openjdk.org/browse/JDK-8361370 > 2) sun/tools/jhsdb/BasicLauncherTest.java > I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. > 3) gc/stress/TestReclaimStringsLeaksMemory.java > I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. > 4) sun/security/ssl/X509KeyManager/CertChecking.java > This is a new test that I got on last rebase. I have added a timeout of 480 to it. > > In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. > > From the review of the cancelled "8356171: Increase timeout for test cases as preparation for change of... Leo Korinth 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 10 additional commits since the last revision: - new timeouts - Merge branch '_master_jdk' into _8260555 - update copyright - revert added timeout, it is not needed - feedback from Mark Sheppard - update testing.md, remove makefile link, fix bad text - after suggestion from Daniel - added extra timeout for: jdk/internal/vm/Continuation/BasicExt.java#COMP_WINDOW_LENGTH_{1-3}-GC_AFTER_YIELD - After suggestions from Erik and Andrey - 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26749/files - new: https://git.openjdk.org/jdk/pull/26749/files/4b33904a..7ca719c8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26749&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26749&range=06-07 Stats: 37788 lines in 1054 files changed: 23834 ins; 9562 del; 4392 mod Patch: https://git.openjdk.org/jdk/pull/26749.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26749/head:pull/26749 PR: https://git.openjdk.org/jdk/pull/26749 From lkorinth at openjdk.org Mon Sep 1 13:21:49 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Mon, 1 Sep 2025 13:21:49 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v9] In-Reply-To: References: Message-ID: > This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) > > In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). > > My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. > > These fixes have been created when I have ploughed through test cases: > JDK-8352719: Add an equals sign to the modules statement > JDK-8352709: Remove bad timing annotations from WhileOpTest.java > JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test > CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE > CODETOOLS-7903961: Make default timeout configurable > > After the review, I will update the copyrights. > > I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. > > I got 4 timing related faults: > 1) runtime/Thread/TestThreadDumpMonitorContention.java > This is probably: https://bugs.openjdk.org/browse/JDK-8361370 > 2) sun/tools/jhsdb/BasicLauncherTest.java > I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. > 3) gc/stress/TestReclaimStringsLeaksMemory.java > I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. > 4) sun/security/ssl/X509KeyManager/CertChecking.java > This is a new test that I got on last rebase. I have added a timeout of 480 to it. > > In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. > > From the review of the cancelled "8356171: Increase timeout for test cases as preparation for change of... Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: changed both test in GetStackTraceALotWhenBlocking to use timeout of 1200 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26749/files - new: https://git.openjdk.org/jdk/pull/26749/files/7ca719c8..5c0bcd19 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26749&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26749&range=07-08 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/26749.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26749/head:pull/26749 PR: https://git.openjdk.org/jdk/pull/26749 From alanb at openjdk.org Mon Sep 1 13:55:46 2025 From: alanb at openjdk.org (Alan Bateman) Date: Mon, 1 Sep 2025 13:55:46 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v9] In-Reply-To: References: Message-ID: On Mon, 1 Sep 2025 13:21:49 GMT, Leo Korinth wrote: >> This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) >> >> In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). >> >> My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. >> >> These fixes have been created when I have ploughed through test cases: >> JDK-8352719: Add an equals sign to the modules statement >> JDK-8352709: Remove bad timing annotations from WhileOpTest.java >> JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test >> CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE >> CODETOOLS-7903961: Make default timeout configurable >> >> After the review, I will update the copyrights. >> >> I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. >> >> I got 4 timing related faults: >> 1) runtime/Thread/TestThreadDumpMonitorContention.java >> This is probably: https://bugs.openjdk.org/browse/JDK-8361370 >> 2) sun/tools/jhsdb/BasicLauncherTest.java >> I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. >> 3) gc/stress/TestReclaimStringsLeaksMemory.java >> I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. >> 4) sun/security/ssl/X509KeyManager/CertChecking.java >> This is a new test that I got on last rebase. I have added a timeout of 480 to it. >> >> In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. >> >> From the review of the cancelled "8356171: ... > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > changed both test in GetStackTraceALotWhenBlocking to use timeout of 1200 Marked as reviewed by alanb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26749#pullrequestreview-3173774701 From lkorinth at openjdk.org Mon Sep 1 16:00:47 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Mon, 1 Sep 2025 16:00:47 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v5] In-Reply-To: References: Message-ID: <9X-5PBm7G1Y8vJ8bw02E501aWdgleLyUWMk3nhSrF08=.bb490a54-e687-49cc-9ecc-df7c051eef18@github.com> On Fri, 22 Aug 2025 15:46:18 GMT, Albert Mingkun Yang wrote: >> Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: >> >> update testing.md, remove makefile link, fix bad text > > test/hotspot/jtreg/serviceability/jvmti/vthread/SuspendResume2/SuspendResume2.java line 31: > >> 29: * @compile SuspendResume2.java >> 30: * @run driver jdk.test.lib.FileInstaller . . >> 31: * @run main/othervm/native/timeout=700 > > Why `700` instead of `480` in this file? I think this is one of the earlier tests that failed with a timeout factor of `0.7` on 480. Later on I doubled it, but here I was a bit more conservative. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2314279387 From lkorinth at openjdk.org Mon Sep 1 16:09:44 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Mon, 1 Sep 2025 16:09:44 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v5] In-Reply-To: References: Message-ID: On Mon, 25 Aug 2025 13:48:10 GMT, Albert Mingkun Yang wrote: >> It is a way to give a "4x" lowest value, while not multiplying a 10x factor with four resulting in a 40x factor. I think (but I am not sure) that it would sometime time out if I only used the given timeout factor and not "guarding" with the max(x, 4). > >> while not multiplying a 10x factor with four resulting in a 40x factor. > > Why is that undesirable? The base is `(HOLD_TARGET_TIME + 30000) * 4` and the timeout-factor changes that linearly. Using `max(..., 4)` here may come as a surprise to end users, IMO. Because 40x is a very large timeout factor. I think I might misunderstand you in some way. My change is conservative, and will give a timeout that is not smaller than before (but can be larger if an explicit (non-default) timeout factor less than 4 was used before). Does that make sense, or do I answer something different from what you are asking? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2314295263 From lkorinth at openjdk.org Tue Sep 2 07:29:57 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Tue, 2 Sep 2025 07:29:57 GMT Subject: Integrated: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 In-Reply-To: References: Message-ID: On Tue, 12 Aug 2025 17:01:41 GMT, Leo Korinth wrote: > This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) > > In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). > > My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. > > These fixes have been created when I have ploughed through test cases: > JDK-8352719: Add an equals sign to the modules statement > JDK-8352709: Remove bad timing annotations from WhileOpTest.java > JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test > CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE > CODETOOLS-7903961: Make default timeout configurable > > After the review, I will update the copyrights. > > I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. > > I got 4 timing related faults: > 1) runtime/Thread/TestThreadDumpMonitorContention.java > This is probably: https://bugs.openjdk.org/browse/JDK-8361370 > 2) sun/tools/jhsdb/BasicLauncherTest.java > I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. > 3) gc/stress/TestReclaimStringsLeaksMemory.java > I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. > 4) sun/security/ssl/X509KeyManager/CertChecking.java > This is a new test that I got on last rebase. I have added a timeout of 480 to it. > > In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. > > From the review of the cancelled "8356171: Increase timeout for test cases as preparation for change of... This pull request has now been integrated. Changeset: 55e7af05 Author: Leo Korinth URL: https://git.openjdk.org/jdk/commit/55e7af0560335ef69af072cee60956cf8e6d00a1 Stats: 901 lines in 342 files changed: 51 ins; 91 del; 759 mod 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 Reviewed-by: alanb, sspitsyn, lmesnik, ihse ------------- PR: https://git.openjdk.org/jdk/pull/26749 From duke at openjdk.org Tue Sep 2 09:27:52 2025 From: duke at openjdk.org (Vanitha B P) Date: Tue, 2 Sep 2025 09:27:52 GMT Subject: RFR: 8366537: Test "java/util/TimeZone/DefaultTimeZoneTest.java" is not updating the zone ID as expected Message-ID: Problem Statements: 1. ZoneID is not updating when the user change the platform time zone setting, then click the "Update Time Zone" button. 2. ZoneID was not displaying in the window as it is displaying in the lower releases. Test Results: jdk-25.0.1/bin/java -jar jtreg/lib/jtreg.jar -verbose:summary -testjdk:jdk-25.0.1 -dir:open/test/jdk java/util/TimeZone/DefaultTimeZoneTest.java Passed: java/util/TimeZone/DefaultTimeZoneTest.java Test results: passed: 1 ------------- Commit messages: - 8366537: Test "java/util/TimeZone/DefaultTimeZoneTest.java" is not updating the zone ID as expected Changes: https://git.openjdk.org/jdk/pull/27043/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27043&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8366537 Stats: 30 lines in 1 file changed: 26 ins; 1 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/27043.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27043/head:pull/27043 PR: https://git.openjdk.org/jdk/pull/27043 From duke at openjdk.org Tue Sep 2 10:50:33 2025 From: duke at openjdk.org (Vanitha B P) Date: Tue, 2 Sep 2025 10:50:33 GMT Subject: RFR: 8366537: Test "java/util/TimeZone/DefaultTimeZoneTest.java" is not updating the zone ID as expected [v2] In-Reply-To: References: Message-ID: <2LPtj3TfEBNxn52lApbp5klrVVW2DZ-bG2nApVAgEoY=.711dc754-ef17-4139-a3b3-cb5666b71324@github.com> > Problem Statements: > 1. ZoneID is not updating when the user change the platform time zone setting, then click the "Update Time Zone" button. > 2. ZoneID was not displaying in the window as it is displaying in the lower releases. > > Test Results: > jdk-25.0.1/bin/java -jar jtreg/lib/jtreg.jar -verbose:summary -testjdk:jdk-25.0.1 -dir:open/test/jdk java/util/TimeZone/DefaultTimeZoneTest.java > > Passed: java/util/TimeZone/DefaultTimeZoneTest.java > Test results: passed: 1 Vanitha B P has updated the pull request incrementally with one additional commit since the last revision: modified tzid variable ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27043/files - new: https://git.openjdk.org/jdk/pull/27043/files/303709d8..7a2a87d3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27043&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27043&range=00-01 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/27043.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27043/head:pull/27043 PR: https://git.openjdk.org/jdk/pull/27043 From myankelevich at openjdk.org Tue Sep 2 14:38:44 2025 From: myankelevich at openjdk.org (Mikhail Yankelevich) Date: Tue, 2 Sep 2025 14:38:44 GMT Subject: RFR: 8366537: Test "java/util/TimeZone/DefaultTimeZoneTest.java" is not updating the zone ID as expected [v2] In-Reply-To: <2LPtj3TfEBNxn52lApbp5klrVVW2DZ-bG2nApVAgEoY=.711dc754-ef17-4139-a3b3-cb5666b71324@github.com> References: <2LPtj3TfEBNxn52lApbp5klrVVW2DZ-bG2nApVAgEoY=.711dc754-ef17-4139-a3b3-cb5666b71324@github.com> Message-ID: On Tue, 2 Sep 2025 10:50:33 GMT, Vanitha B P wrote: >> Problem Statements: >> 1. ZoneID is not updating when the user change the platform time zone setting, then click the "Update Time Zone" button. >> 2. ZoneID was not displaying in the window as it is displaying in the lower releases. >> >> Test Results: >> jdk-25.0.1/bin/java -jar jtreg/lib/jtreg.jar -verbose:summary -testjdk:jdk-25.0.1 -dir:open/test/jdk java/util/TimeZone/DefaultTimeZoneTest.java >> >> Passed: java/util/TimeZone/DefaultTimeZoneTest.java >> Test results: passed: 1 > > Vanitha B P has updated the pull request incrementally with one additional commit since the last revision: > > modified tzid variable test/jdk/java/util/TimeZone/DefaultTimeZoneTest.java line 111: > 109: panel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS)); > 110: // Time zone ID label > 111: var tzid = new JLabel("Time zone ID: " + SDF.getTimeZone().getID(), SwingConstants.CENTER); minor: do you think changing it to a more intuitive `timeZoneID` would make it easier to read? If you want to leave it as is - I don't mind ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27043#discussion_r2316292304 From duke at openjdk.org Tue Sep 2 15:50:59 2025 From: duke at openjdk.org (Vanitha B P) Date: Tue, 2 Sep 2025 15:50:59 GMT Subject: RFR: 8366537: Test "java/util/TimeZone/DefaultTimeZoneTest.java" is not updating the zone ID as expected [v2] In-Reply-To: References: <2LPtj3TfEBNxn52lApbp5klrVVW2DZ-bG2nApVAgEoY=.711dc754-ef17-4139-a3b3-cb5666b71324@github.com> Message-ID: On Tue, 2 Sep 2025 14:35:47 GMT, Mikhail Yankelevich wrote: >> Vanitha B P has updated the pull request incrementally with one additional commit since the last revision: >> >> modified tzid variable > > test/jdk/java/util/TimeZone/DefaultTimeZoneTest.java line 111: > >> 109: panel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS)); >> 110: // Time zone ID label >> 111: var tzid = new JLabel("Time zone ID: " + SDF.getTimeZone().getID(), SwingConstants.CENTER); > > minor: do you think changing it to a more intuitive `timeZoneID` would make it easier to read? If you want to leave it as is - I don't mind Done, changed to timeZoneID. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27043#discussion_r2316501052 From duke at openjdk.org Tue Sep 2 15:50:58 2025 From: duke at openjdk.org (Vanitha B P) Date: Tue, 2 Sep 2025 15:50:58 GMT Subject: RFR: 8366537: Test "java/util/TimeZone/DefaultTimeZoneTest.java" is not updating the zone ID as expected [v3] In-Reply-To: References: Message-ID: > Problem Statements: > 1. ZoneID is not updating when the user change the platform time zone setting, then click the "Update Time Zone" button. > 2. ZoneID was not displaying in the window as it is displaying in the lower releases. > > Test Results: > jdk-25.0.1/bin/java -jar jtreg/lib/jtreg.jar -verbose:summary -testjdk:jdk-25.0.1 -dir:open/test/jdk java/util/TimeZone/DefaultTimeZoneTest.java > > Passed: java/util/TimeZone/DefaultTimeZoneTest.java > Test results: passed: 1 Vanitha B P has updated the pull request incrementally with one additional commit since the last revision: changed tzid to more readable timeZoneID ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27043/files - new: https://git.openjdk.org/jdk/pull/27043/files/7a2a87d3..1d553994 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27043&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27043&range=01-02 Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/27043.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27043/head:pull/27043 PR: https://git.openjdk.org/jdk/pull/27043 From naoto at openjdk.org Tue Sep 2 16:10:44 2025 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 2 Sep 2025 16:10:44 GMT Subject: RFR: 8366401: JCK test api/java_text/DecimalFormatSymbols/serial/InputTests.html fails after JDK-8363972 In-Reply-To: References: Message-ID: On Fri, 29 Aug 2025 18:00:25 GMT, Justin Lu wrote: > This PR addresses a JCK test failure related to `DecimalFormatSymbols` de-serialization. While the current public API of DFS disallows a null locale, it was possible to set in the past. Thus, the `loadNumberData(locale)` call currently throws NPE when locale is null in the stream. The call should be guarded with a null check, such that if locale is null, then `lenientMinusSigns` defaults to `minusSignText`. > > Defaulting the locale field when `null` to Locale.ROOT is also a reasonable solution, but I think that the current one is preferable as a user would not expect locale data related logic to occur if locale is `null`. There are some tests for serializing DecimalFormatSymbols, but I agree that it would be desirable to revisit and cover missing cases. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27008#issuecomment-3245960204 From naoto at openjdk.org Tue Sep 2 17:04:46 2025 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 2 Sep 2025 17:04:46 GMT Subject: RFR: 8366400: JCK test api/java_text/DecimalFormat/Parse.html fails after JDK-8363972 In-Reply-To: <02TLmr4b78WC1ZSLPW0GsAgyoew4OwsFqbatVUuVvmY=.b49bb16a-6890-4ea7-bd8b-5ef2103981db@github.com> References: <02TLmr4b78WC1ZSLPW0GsAgyoew4OwsFqbatVUuVvmY=.b49bb16a-6890-4ea7-bd8b-5ef2103981db@github.com> Message-ID: <7Dkg3RT7FqyGD32gIbhB5uu-SvTy02SXCPah2dVLbaA=.8dc7a5e2-5f8d-4937-89af-f287bc5e7ddd@github.com> On Fri, 29 Aug 2025 23:59:54 GMT, Justin Lu wrote: > This PR addresses a JCK test failure of an unexpected SIOOBE during DecimalFormat parsing. During the char by char comparison in `matchAffix`, the minimum of the length of the parsed String and the PP index + affix length are iterated on. The parse position index needs to be checked to not be negative to ensure that we do not index the String below 0. Taking the minimum of those two previously mentioned values already guarantees that we do not index the String above the length. test/jdk/java/text/Format/NumberFormat/LenientParseTest.java line 172: > 170: assertNull(assertDoesNotThrow(() -> new DecimalFormat().parse("1", new ParsePosition(-1)))); > 171: } > 172: Thanks for writing the invalid case test. As Alan suggested, maybe we could provide more edge case tests. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27014#discussion_r2316676697 From naoto at openjdk.org Tue Sep 2 18:50:45 2025 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 2 Sep 2025 18:50:45 GMT Subject: RFR: 8366537: Test "java/util/TimeZone/DefaultTimeZoneTest.java" is not updating the zone ID as expected [v3] In-Reply-To: References: Message-ID: <5I7FdKVr3PH_8Fkwh87wAizc_efngMwxbv0YBsEIKec=.9c0e0b28-54d9-426c-9b7e-a138d6e2c935@github.com> On Tue, 2 Sep 2025 15:50:58 GMT, Vanitha B P wrote: >> Problem Statements: >> 1. ZoneID is not updating when the user change the platform time zone setting, then click the "Update Time Zone" button. >> 2. ZoneID was not displaying in the window as it is displaying in the lower releases. >> >> Test Results: >> jdk-25.0.1/bin/java -jar jtreg/lib/jtreg.jar -verbose:summary -testjdk:jdk-25.0.1 -dir:open/test/jdk java/util/TimeZone/DefaultTimeZoneTest.java >> >> Passed: java/util/TimeZone/DefaultTimeZoneTest.java >> Test results: passed: 1 > > Vanitha B P has updated the pull request incrementally with one additional commit since the last revision: > > changed tzid to more readable timeZoneID LGTM ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27043#pullrequestreview-3177729678 From jlu at openjdk.org Tue Sep 2 18:55:23 2025 From: jlu at openjdk.org (Justin Lu) Date: Tue, 2 Sep 2025 18:55:23 GMT Subject: RFR: 8366401: JCK test api/java_text/DecimalFormatSymbols/serial/InputTests.html fails after JDK-8363972 [v2] In-Reply-To: References: Message-ID: > This PR addresses a JCK test failure related to `DecimalFormatSymbols` de-serialization. While the current public API of DFS disallows a null locale, it was possible to set in the past. Thus, the `loadNumberData(locale)` call currently throws NPE when locale is null in the stream. The call should be guarded with a null check, such that if locale is null, then `lenientMinusSigns` defaults to `minusSignText`. > > Defaulting the locale field when `null` to Locale.ROOT is also a reasonable solution, but I think that the current one is preferable as a user would not expect locale data related logic to occur if locale is `null`. Justin Lu has updated the pull request incrementally with two additional commits since the last revision: - Nested class rename - Add JDK regression test ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27008/files - new: https://git.openjdk.org/jdk/pull/27008/files/0ace8f6a..751d00be Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27008&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27008&range=00-01 Stats: 262 lines in 1 file changed: 262 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/27008.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27008/head:pull/27008 PR: https://git.openjdk.org/jdk/pull/27008 From jlu at openjdk.org Tue Sep 2 18:55:24 2025 From: jlu at openjdk.org (Justin Lu) Date: Tue, 2 Sep 2025 18:55:24 GMT Subject: RFR: 8366401: JCK test api/java_text/DecimalFormatSymbols/serial/InputTests.html fails after JDK-8363972 In-Reply-To: References: Message-ID: On Sat, 30 Aug 2025 06:41:53 GMT, Alan Bateman wrote: >> This PR addresses a JCK test failure related to `DecimalFormatSymbols` de-serialization. While the current public API of DFS disallows a null locale, it was possible to set in the past. Thus, the `loadNumberData(locale)` call currently throws NPE when locale is null in the stream. The call should be guarded with a null check, such that if locale is null, then `lenientMinusSigns` defaults to `minusSignText`. >> >> Defaulting the locale field when `null` to Locale.ROOT is also a reasonable solution, but I think that the current one is preferable as a user would not expect locale data related logic to occur if locale is `null`. > > Have you considered adding a unit or regression test to exercise DecimalFormatSymbols serialization? I assume this issue slipped through and was caught else where because the jdk repo doesn't have any tests for this. @AlanBateman @naotoj Initially I relied on the JCK test since this was a non-standard situation. But you are right that we should not have to rely on the JCK tests to discover an issue in the JDK, I've removed the `noreg-jck` label and added a serialization test. It checks all of the correct behavior based on the stream version, as well as other invariants. I also filed [JDK-8366733](https://bugs.openjdk.org/browse/JDK-8366733) because many of the existing serialization tests for DFS seem to be relics and can either be removed or are redundant with the newly added test. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27008#issuecomment-3246431509 From naoto at openjdk.org Tue Sep 2 19:35:57 2025 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 2 Sep 2025 19:35:57 GMT Subject: RFR: 8366517: DateFormatSymbols(Locale) throws NPE if Locale argument is null Message-ID: Adding a `@throws` clause for NPE in `java.text.DateFormatSymbols(Locale)` constructor. The bug suggests it should throw a `MissingResourceException`, but I don't think we can change this long standing behavior. Instead, explicitly specify the NPE in the javadoc. ------------- Commit messages: - initial commit Changes: https://git.openjdk.org/jdk/pull/27060/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27060&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8366517 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/27060.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27060/head:pull/27060 PR: https://git.openjdk.org/jdk/pull/27060 From naoto at openjdk.org Tue Sep 2 20:27:41 2025 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 2 Sep 2025 20:27:41 GMT Subject: RFR: 8366401: JCK test api/java_text/DecimalFormatSymbols/serial/InputTests.html fails after JDK-8363972 [v2] In-Reply-To: References: Message-ID: On Tue, 2 Sep 2025 18:55:23 GMT, Justin Lu wrote: >> This PR addresses a JCK test failure related to `DecimalFormatSymbols` de-serialization. While the current public API of DFS disallows a null locale, it was possible to set in the past. Thus, the `loadNumberData(locale)` call currently throws NPE when locale is null in the stream. The call should be guarded with a null check, such that if locale is null, then `lenientMinusSigns` defaults to `minusSignText`. >> >> Defaulting the locale field when `null` to Locale.ROOT is also a reasonable solution, but I think that the current one is preferable as a user would not expect locale data related logic to occur if locale is `null`. > > Justin Lu has updated the pull request incrementally with two additional commits since the last revision: > > - Nested class rename > - Add JDK regression test Thanks for providing new tests. test/jdk/java/text/Format/DecimalFormat/DFSSerializationTest.java line 140: > 138: } > 139: > 140: // Previous versions of DFS could contain a null locale "Previous" suggests it would not allow null with this change, which is not the case. test/jdk/java/text/Format/DecimalFormat/DFSSerializationTest.java line 224: > 222: ObjectInputStream ois = new ObjectInputStream(byteArrayInputStream)) { > 223: return (DecimalFormatSymbols) ois.readObject(); > 224: } I guess if an error occured in this try block, the test should fail. Just wondering the reason it did not use `assertDoesNotThrow()` method. ------------- PR Review: https://git.openjdk.org/jdk/pull/27008#pullrequestreview-3177975352 PR Review Comment: https://git.openjdk.org/jdk/pull/27008#discussion_r2317077376 PR Review Comment: https://git.openjdk.org/jdk/pull/27008#discussion_r2317062931 From jlu at openjdk.org Tue Sep 2 20:38:42 2025 From: jlu at openjdk.org (Justin Lu) Date: Tue, 2 Sep 2025 20:38:42 GMT Subject: RFR: 8366401: JCK test api/java_text/DecimalFormatSymbols/serial/InputTests.html fails after JDK-8363972 [v2] In-Reply-To: References: Message-ID: On Tue, 2 Sep 2025 20:22:50 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with two additional commits since the last revision: >> >> - Nested class rename >> - Add JDK regression test > > test/jdk/java/text/Format/DecimalFormat/DFSSerializationTest.java line 140: > >> 138: } >> 139: >> 140: // Previous versions of DFS could contain a null locale > > "Previous" suggests it would not allow null with this change, which is not the case. Instances created from the current standard _public_ API **do not allow** a null locale, hence the clarification that previous versions **can contain** a null locale. i.e. We do not expect to see null locales with up-to-date versions of DFS that are not tampered with, so I think the comment is accurate. > test/jdk/java/text/Format/DecimalFormat/DFSSerializationTest.java line 224: > >> 222: ObjectInputStream ois = new ObjectInputStream(byteArrayInputStream)) { >> 223: return (DecimalFormatSymbols) ois.readObject(); >> 224: } > > I guess if an error occured in this try block, the test should fail. Just wondering the reason it did not use `assertDoesNotThrow()` method. I did not swallow the error with `assertDoesNotThrow()` here becasue `disagreeingTextTest` expects to see an `InvalidObjectException.class`. Future tests/changes can easily check for expected de-serialization failures with this setup. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27008#discussion_r2317106675 PR Review Comment: https://git.openjdk.org/jdk/pull/27008#discussion_r2317106647 From jlu at openjdk.org Tue Sep 2 20:46:46 2025 From: jlu at openjdk.org (Justin Lu) Date: Tue, 2 Sep 2025 20:46:46 GMT Subject: RFR: 8365175: Replace Unicode extension anchor elements with link tag [v3] In-Reply-To: <0t5YDtu6ylWIPC8qsRpR49hwn6xGWRub8ebABKKD5DY=.42d97385-3974-4eb8-93da-da7ec64c274f@github.com> References: <-Xpp4i_f9UglODJqIAJyt8seYC7GaFw1WN6z21CRgeI=.d94de2eb-e94b-4d36-b2d2-91a3930a5a58@github.com> <0t5YDtu6ylWIPC8qsRpR49hwn6xGWRub8ebABKKD5DY=.42d97385-3974-4eb8-93da-da7ec64c274f@github.com> Message-ID: On Fri, 29 Aug 2025 20:44:00 GMT, Justin Lu wrote: >> This PR is a cleanup change which replaces anchor element references of the Locale `def_locale_extension` section with the Javadoc link tag. This is a doc only change and is a result of the discussion in the PR of https://github.com/openjdk/jdk/pull/26683. >> >> This includes one additional conversion of the `legacy_language_codes` section to get rid of all Locale.html anchor element references. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > link -> linkplain Thank you for the reviews. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26996#issuecomment-3246731929 From jlu at openjdk.org Tue Sep 2 20:46:47 2025 From: jlu at openjdk.org (Justin Lu) Date: Tue, 2 Sep 2025 20:46:47 GMT Subject: Integrated: 8365175: Replace Unicode extension anchor elements with link tag In-Reply-To: <-Xpp4i_f9UglODJqIAJyt8seYC7GaFw1WN6z21CRgeI=.d94de2eb-e94b-4d36-b2d2-91a3930a5a58@github.com> References: <-Xpp4i_f9UglODJqIAJyt8seYC7GaFw1WN6z21CRgeI=.d94de2eb-e94b-4d36-b2d2-91a3930a5a58@github.com> Message-ID: On Thu, 28 Aug 2025 20:23:32 GMT, Justin Lu wrote: > This PR is a cleanup change which replaces anchor element references of the Locale `def_locale_extension` section with the Javadoc link tag. This is a doc only change and is a result of the discussion in the PR of https://github.com/openjdk/jdk/pull/26683. > > This includes one additional conversion of the `legacy_language_codes` section to get rid of all Locale.html anchor element references. This pull request has now been integrated. Changeset: 80fb7088 Author: Justin Lu URL: https://git.openjdk.org/jdk/commit/80fb7088a10136080d23ea93b4840f17d738500c Stats: 36 lines in 12 files changed: 0 ins; 0 del; 36 mod 8365175: Replace Unicode extension anchor elements with link tag Reviewed-by: liach, iris, naoto ------------- PR: https://git.openjdk.org/jdk/pull/26996 From naoto at openjdk.org Tue Sep 2 20:54:41 2025 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 2 Sep 2025 20:54:41 GMT Subject: RFR: 8366401: JCK test api/java_text/DecimalFormatSymbols/serial/InputTests.html fails after JDK-8363972 [v2] In-Reply-To: References: Message-ID: On Tue, 2 Sep 2025 20:35:50 GMT, Justin Lu wrote: >> test/jdk/java/text/Format/DecimalFormat/DFSSerializationTest.java line 140: >> >>> 138: } >>> 139: >>> 140: // Previous versions of DFS could contain a null locale >> >> "Previous" suggests it would not allow null with this change, which is not the case. > > Instances created from the current standard _public_ API **do not allow** a null locale, hence the clarification that previous versions **can contain** a null locale. > > i.e. We do not expect to see null locales with up-to-date versions of DFS that are not tampered with, so I think the comment is accurate. I guess I mistook "previous" as previous implementation of DFS, but your comment refers to previous "stream" versions. Probably clarify it may help here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27008#discussion_r2317147454 From jlu at openjdk.org Tue Sep 2 21:02:46 2025 From: jlu at openjdk.org (Justin Lu) Date: Tue, 2 Sep 2025 21:02:46 GMT Subject: RFR: 8366401: JCK test api/java_text/DecimalFormatSymbols/serial/InputTests.html fails after JDK-8363972 [v3] In-Reply-To: References: Message-ID: <06XwUOKKgaicVdJcVCaOpuWBNE56acEtKeEYNNj2Y64=.e7328343-b82e-402c-b20e-e5525da7ef78@github.com> > This PR addresses a JCK test failure related to `DecimalFormatSymbols` de-serialization. While the current public API of DFS disallows a null locale, it was possible to set in the past. Thus, the `loadNumberData(locale)` call currently throws NPE when locale is null in the stream. The call should be guarded with a null check, such that if locale is null, then `lenientMinusSigns` defaults to `minusSignText`. > > Defaulting the locale field when `null` to Locale.ROOT is also a reasonable solution, but I think that the current one is preferable as a user would not expect locale data related logic to occur if locale is `null`. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Clarify the null locale comment ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27008/files - new: https://git.openjdk.org/jdk/pull/27008/files/751d00be..445bbe85 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27008&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27008&range=01-02 Stats: 4 lines in 1 file changed: 2 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/27008.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27008/head:pull/27008 PR: https://git.openjdk.org/jdk/pull/27008 From jlu at openjdk.org Tue Sep 2 21:14:43 2025 From: jlu at openjdk.org (Justin Lu) Date: Tue, 2 Sep 2025 21:14:43 GMT Subject: RFR: 8366537: Test "java/util/TimeZone/DefaultTimeZoneTest.java" is not updating the zone ID as expected [v3] In-Reply-To: References: Message-ID: On Tue, 2 Sep 2025 15:50:58 GMT, Vanitha B P wrote: >> Problem Statements: >> 1. ZoneID is not updating when the user change the platform time zone setting, then click the "Update Time Zone" button. >> 2. ZoneID was not displaying in the window as it is displaying in the lower releases. >> >> Test Results: >> jdk-25.0.1/bin/java -jar jtreg/lib/jtreg.jar -verbose:summary -testjdk:jdk-25.0.1 -dir:open/test/jdk java/util/TimeZone/DefaultTimeZoneTest.java >> >> Passed: java/util/TimeZone/DefaultTimeZoneTest.java >> Test results: passed: 1 > > Vanitha B P has updated the pull request incrementally with one additional commit since the last revision: > > changed tzid to more readable timeZoneID Thanks for the change. I ran the manual test and can confirm that the zone ID now updates in the window when the platform tz is changed. Nit: Copyright year can be updated. ------------- Marked as reviewed by jlu (Committer). PR Review: https://git.openjdk.org/jdk/pull/27043#pullrequestreview-3178145140 From jlu at openjdk.org Tue Sep 2 21:21:04 2025 From: jlu at openjdk.org (Justin Lu) Date: Tue, 2 Sep 2025 21:21:04 GMT Subject: RFR: 8366401: JCK test api/java_text/DecimalFormatSymbols/serial/InputTests.html fails after JDK-8363972 [v4] In-Reply-To: References: Message-ID: > This PR addresses a JCK test failure related to `DecimalFormatSymbols` de-serialization. While the current public API of DFS disallows a null locale, it was possible to set in the past. Thus, the `loadNumberData(locale)` call currently throws NPE when locale is null in the stream. The call should be guarded with a null check, such that if locale is null, then `lenientMinusSigns` defaults to `minusSignText`. > > Defaulting the locale field when `null` to Locale.ROOT is also a reasonable solution, but I think that the current one is preferable as a user would not expect locale data related logic to occur if locale is `null`. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: public API is too broad ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27008/files - new: https://git.openjdk.org/jdk/pull/27008/files/445bbe85..dfb818c7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27008&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27008&range=02-03 Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/27008.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27008/head:pull/27008 PR: https://git.openjdk.org/jdk/pull/27008 From jlu at openjdk.org Tue Sep 2 22:15:29 2025 From: jlu at openjdk.org (Justin Lu) Date: Tue, 2 Sep 2025 22:15:29 GMT Subject: RFR: 8366400: JCK test api/java_text/DecimalFormat/Parse.html fails after JDK-8363972 [v2] In-Reply-To: <02TLmr4b78WC1ZSLPW0GsAgyoew4OwsFqbatVUuVvmY=.b49bb16a-6890-4ea7-bd8b-5ef2103981db@github.com> References: <02TLmr4b78WC1ZSLPW0GsAgyoew4OwsFqbatVUuVvmY=.b49bb16a-6890-4ea7-bd8b-5ef2103981db@github.com> Message-ID: > This PR addresses a JCK test failure of an unexpected SIOOBE during DecimalFormat parsing. During the char by char comparison in `matchAffix`, the minimum of the length of the parsed String and the PP index + affix length are iterated on. The parse position index needs to be checked to not be negative to ensure that we do not index the String below 0. Taking the minimum of those two previously mentioned values already guarantees that we do not index the String above the length. Justin Lu has updated the pull request incrementally with two additional commits since the last revision: - Missing the bug ID in the new test - Adding additional tests and moving tests to PositionTest ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27014/files - new: https://git.openjdk.org/jdk/pull/27014/files/79b57021..96f71a0f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27014&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27014&range=00-01 Stats: 75 lines in 2 files changed: 56 ins; 14 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/27014.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27014/head:pull/27014 PR: https://git.openjdk.org/jdk/pull/27014 From jlu at openjdk.org Tue Sep 2 22:15:30 2025 From: jlu at openjdk.org (Justin Lu) Date: Tue, 2 Sep 2025 22:15:30 GMT Subject: RFR: 8366400: JCK test api/java_text/DecimalFormat/Parse.html fails after JDK-8363972 [v2] In-Reply-To: <7Dkg3RT7FqyGD32gIbhB5uu-SvTy02SXCPah2dVLbaA=.8dc7a5e2-5f8d-4937-89af-f287bc5e7ddd@github.com> References: <02TLmr4b78WC1ZSLPW0GsAgyoew4OwsFqbatVUuVvmY=.b49bb16a-6890-4ea7-bd8b-5ef2103981db@github.com> <7Dkg3RT7FqyGD32gIbhB5uu-SvTy02SXCPah2dVLbaA=.8dc7a5e2-5f8d-4937-89af-f287bc5e7ddd@github.com> Message-ID: On Tue, 2 Sep 2025 17:01:58 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with two additional commits since the last revision: >> >> - Missing the bug ID in the new test >> - Adding additional tests and moving tests to PositionTest > > test/jdk/java/text/Format/NumberFormat/LenientParseTest.java line 172: > >> 170: assertNull(assertDoesNotThrow(() -> new DecimalFormat().parse("1", new ParsePosition(-1)))); >> 171: } >> 172: > > Thanks for writing the invalid case test. As Alan suggested, maybe we could provide more edge case tests. Added some additional tests with a focus on affix matching, specifically ensuring SIOOBE does not leak out in any of those cases. i.e. The bounds checks should ensure `false` is returned for those cases. But specifically for the failing JCK test, the main test we need on the JDK repo side is a negative ParsePosition index test. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27014#discussion_r2317281582 From naoto at openjdk.org Tue Sep 2 22:29:41 2025 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 2 Sep 2025 22:29:41 GMT Subject: RFR: 8366401: JCK test api/java_text/DecimalFormatSymbols/serial/InputTests.html fails after JDK-8363972 [v4] In-Reply-To: References: Message-ID: On Tue, 2 Sep 2025 21:21:04 GMT, Justin Lu wrote: >> This PR addresses a JCK test failure related to `DecimalFormatSymbols` de-serialization. While the current public API of DFS disallows a null locale, it was possible to set in the past. Thus, the `loadNumberData(locale)` call currently throws NPE when locale is null in the stream. The call should be guarded with a null check, such that if locale is null, then `lenientMinusSigns` defaults to `minusSignText`. >> >> Defaulting the locale field when `null` to Locale.ROOT is also a reasonable solution, but I think that the current one is preferable as a user would not expect locale data related logic to occur if locale is `null`. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > public API is too broad LGTM ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27008#pullrequestreview-3178334115 From naoto at openjdk.org Tue Sep 2 22:58:46 2025 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 2 Sep 2025 22:58:46 GMT Subject: RFR: 8366400: JCK test api/java_text/DecimalFormat/Parse.html fails after JDK-8363972 [v2] In-Reply-To: References: <02TLmr4b78WC1ZSLPW0GsAgyoew4OwsFqbatVUuVvmY=.b49bb16a-6890-4ea7-bd8b-5ef2103981db@github.com> Message-ID: On Tue, 2 Sep 2025 22:15:29 GMT, Justin Lu wrote: >> This PR addresses a JCK test failure of an unexpected SIOOBE during DecimalFormat parsing. During the char by char comparison in `matchAffix`, the minimum of the length of the parsed String and the PP index + affix length are iterated on. The parse position index needs to be checked to not be negative to ensure that we do not index the String below 0. Taking the minimum of those two previously mentioned values already guarantees that we do not index the String above the length. > > Justin Lu has updated the pull request incrementally with two additional commits since the last revision: > > - Missing the bug ID in the new test > - Adding additional tests and moving tests to PositionTest LGTM. Moving position tests unrelated to lenient minus parsing to here is good. test/jdk/java/text/Format/NumberFormat/PositionTest.java line 60: > 58: // begins at the valid portion. Ensure PP is properly updated. > 59: @Test > 60: public void modifiedPositionTest() { JUnit5 tests default to package-private visibility, but I think aligning with other tests is more important. ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27014#pullrequestreview-3178377182 PR Review Comment: https://git.openjdk.org/jdk/pull/27014#discussion_r2317343019 From jlu at openjdk.org Tue Sep 2 23:10:41 2025 From: jlu at openjdk.org (Justin Lu) Date: Tue, 2 Sep 2025 23:10:41 GMT Subject: RFR: 8366517: DateFormatSymbols(Locale) throws NPE if Locale argument is null In-Reply-To: References: Message-ID: <8O740YRFXmkIrb1Hgu_qQUnYRSHYv0SWqXACpWWSOEc=.31959706-e26a-41fd-8a60-a99742e32e24@github.com> On Tue, 2 Sep 2025 19:29:37 GMT, Naoto Sato wrote: > Adding a `@throws` clause for NPE in `java.text.DateFormatSymbols(Locale)` constructor. The bug suggests it should throw a `MissingResourceException`, but I don't think we can change this long standing behavior. Instead, explicitly specify the NPE in the javadoc. Looks good to me and the static factory methods already specify the NPE. fyi: PR title is missing the ` around code portions. ------------- Marked as reviewed by jlu (Committer). PR Review: https://git.openjdk.org/jdk/pull/27060#pullrequestreview-3178410659 From rriggs at openjdk.org Wed Sep 3 01:00:59 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 3 Sep 2025 01:00:59 GMT Subject: RFR: 8366517: `DateFormatSymbols(Locale)` throws NPE if `Locale` argument is null In-Reply-To: References: Message-ID: On Tue, 2 Sep 2025 19:29:37 GMT, Naoto Sato wrote: > Adding a `@throws` clause for NPE in `java.text.DateFormatSymbols(Locale)` constructor. The bug suggests it should throw a `MissingResourceException`, but I don't think we can change this long standing behavior. Instead, explicitly specify the NPE in the javadoc. src/java.base/share/classes/java/text/DateFormatSymbols.java line 148: > 146: * if the resources for the specified locale cannot be > 147: * found or cannot be loaded. > 148: * @throws NullPointerException if {@code locale} is null Adding an explicit Objects.requireNull(locale, "locale") would clearly identify when the NPE is thrown. Though it might be earlier than without the check. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27060#discussion_r2317509928 From duke at openjdk.org Wed Sep 3 05:24:02 2025 From: duke at openjdk.org (Vanitha B P) Date: Wed, 3 Sep 2025 05:24:02 GMT Subject: RFR: 8366537: Test "java/util/TimeZone/DefaultTimeZoneTest.java" is not updating the zone ID as expected [v4] In-Reply-To: References: Message-ID: <3ZZxxJN7so5fHtNVcmAktY-suviU-OrNfZejnuPBFRw=.7102d369-ab3d-46ec-a7d0-ef5ca4199d20@github.com> > Problem Statements: > 1. ZoneID is not updating when the user change the platform time zone setting, then click the "Update Time Zone" button. > 2. ZoneID was not displaying in the window as it is displaying in the lower releases. > > Test Results: > jdk-25.0.1/bin/java -jar jtreg/lib/jtreg.jar -verbose:summary -testjdk:jdk-25.0.1 -dir:open/test/jdk java/util/TimeZone/DefaultTimeZoneTest.java > > Passed: java/util/TimeZone/DefaultTimeZoneTest.java > Test results: passed: 1 Vanitha B P has updated the pull request incrementally with one additional commit since the last revision: Copyright year changed to 2025 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27043/files - new: https://git.openjdk.org/jdk/pull/27043/files/1d553994..676cd48a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27043&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27043&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/27043.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27043/head:pull/27043 PR: https://git.openjdk.org/jdk/pull/27043 From duke at openjdk.org Wed Sep 3 06:13:17 2025 From: duke at openjdk.org (Vanitha B P) Date: Wed, 3 Sep 2025 06:13:17 GMT Subject: RFR: 8366537: Test "java/util/TimeZone/DefaultTimeZoneTest.java" is not updating the zone ID as expected [v5] In-Reply-To: References: Message-ID: > Problem Statements: > 1. ZoneID is not updating when the user change the platform time zone setting, then click the "Update Time Zone" button. > 2. ZoneID was not displaying in the window as it is displaying in the lower releases. > > Test Results: > jdk-25.0.1/bin/java -jar jtreg/lib/jtreg.jar -verbose:summary -testjdk:jdk-25.0.1 -dir:open/test/jdk java/util/TimeZone/DefaultTimeZoneTest.java > > Passed: java/util/TimeZone/DefaultTimeZoneTest.java > Test results: passed: 1 Vanitha B P has updated the pull request incrementally with one additional commit since the last revision: Vanitha B P ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27043/files - new: https://git.openjdk.org/jdk/pull/27043/files/676cd48a..c096a930 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27043&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27043&range=03-04 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/27043.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27043/head:pull/27043 PR: https://git.openjdk.org/jdk/pull/27043 From duke at openjdk.org Wed Sep 3 09:33:43 2025 From: duke at openjdk.org (Vanitha B P) Date: Wed, 3 Sep 2025 09:33:43 GMT Subject: RFR: 8366537: Test "java/util/TimeZone/DefaultTimeZoneTest.java" is not updating the zone ID as expected [v3] In-Reply-To: References: Message-ID: <-9xZMei8RG9SNQZppoVG6F9_SYh0awM4Y5gbAtVdtKo=.8046cba6-2c2a-4194-8747-fe4a852c32b9@github.com> On Tue, 2 Sep 2025 21:12:01 GMT, Justin Lu wrote: >> Vanitha B P has updated the pull request incrementally with one additional commit since the last revision: >> >> changed tzid to more readable timeZoneID > > Thanks for the change. I ran the manual test and can confirm that the zone ID now updates in the window when the platform tz is changed. > Nit: Copyright year can be updated. @justin-curtis-lu I have updated the Copyright year, please review and approve. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27043#issuecomment-3248460755 From alanb at openjdk.org Wed Sep 3 11:36:46 2025 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 3 Sep 2025 11:36:46 GMT Subject: RFR: 8366401: JCK test api/java_text/DecimalFormatSymbols/serial/InputTests.html fails after JDK-8363972 [v4] In-Reply-To: References: Message-ID: On Tue, 2 Sep 2025 21:21:04 GMT, Justin Lu wrote: >> This PR addresses a JCK test failure related to `DecimalFormatSymbols` de-serialization. While the current public API of DFS disallows a null locale, it was possible to set in the past. Thus, the `loadNumberData(locale)` call currently throws NPE when locale is null in the stream. The call should be guarded with a null check, such that if locale is null, then `lenientMinusSigns` defaults to `minusSignText`. >> >> Defaulting the locale field when `null` to Locale.ROOT is also a reasonable solution, but I think that the current one is preferable as a user would not expect locale data related logic to occur if locale is `null`. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > public API is too broad Thanks for adding a test, that will help catch any further regressions when changing this code. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27008#issuecomment-3248859821 From alanb at openjdk.org Wed Sep 3 11:37:43 2025 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 3 Sep 2025 11:37:43 GMT Subject: RFR: 8366400: JCK test api/java_text/DecimalFormat/Parse.html fails after JDK-8363972 [v2] In-Reply-To: References: <02TLmr4b78WC1ZSLPW0GsAgyoew4OwsFqbatVUuVvmY=.b49bb16a-6890-4ea7-bd8b-5ef2103981db@github.com> Message-ID: On Tue, 2 Sep 2025 22:15:29 GMT, Justin Lu wrote: >> This PR addresses a JCK test failure of an unexpected SIOOBE during DecimalFormat parsing. During the char by char comparison in `matchAffix`, the minimum of the length of the parsed String and the PP index + affix length are iterated on. The parse position index needs to be checked to not be negative to ensure that we do not index the String below 0. Taking the minimum of those two previously mentioned values already guarantees that we do not index the String above the length. > > Justin Lu has updated the pull request incrementally with two additional commits since the last revision: > > - Missing the bug ID in the new test > - Adding additional tests and moving tests to PositionTest Thanks for expanding the coverage of the existing tests. That will help catch any regressions when changing the parsing code in the future. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27014#issuecomment-3248863177 From naoto at openjdk.org Wed Sep 3 15:22:23 2025 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 3 Sep 2025 15:22:23 GMT Subject: RFR: 8366517: `DateFormatSymbols(Locale)` throws NPE if `Locale` argument is null [v2] In-Reply-To: References: Message-ID: > Adding a `@throws` clause for NPE in `java.text.DateFormatSymbols(Locale)` constructor. The bug suggests it should throw a `MissingResourceException`, but I don't think we can change this long standing behavior. Instead, explicitly specify the NPE in the javadoc. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Use Objects.requireNonNull() ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27060/files - new: https://git.openjdk.org/jdk/pull/27060/files/5007b81e..7b3d4e00 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27060&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27060&range=00-01 Stats: 10 lines in 2 files changed: 8 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/27060.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27060/head:pull/27060 PR: https://git.openjdk.org/jdk/pull/27060 From naoto at openjdk.org Wed Sep 3 15:23:44 2025 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 3 Sep 2025 15:23:44 GMT Subject: RFR: 8366537: Test "java/util/TimeZone/DefaultTimeZoneTest.java" is not updating the zone ID as expected [v5] In-Reply-To: References: Message-ID: <4mXSGoIkRXmbPtv38taBT4ZT89b46s3IxAq8aAQAJVQ=.b271401a-e04b-4720-9023-dabf2baa2a83@github.com> On Wed, 3 Sep 2025 06:13:17 GMT, Vanitha B P wrote: >> Problem Statements: >> 1. ZoneID is not updating when the user change the platform time zone setting, then click the "Update Time Zone" button. >> 2. ZoneID was not displaying in the window as it is displaying in the lower releases. >> >> Test Results: >> jdk-25.0.1/bin/java -jar jtreg/lib/jtreg.jar -verbose:summary -testjdk:jdk-25.0.1 -dir:open/test/jdk java/util/TimeZone/DefaultTimeZoneTest.java >> >> Passed: java/util/TimeZone/DefaultTimeZoneTest.java >> Test results: passed: 1 > > Vanitha B P has updated the pull request incrementally with one additional commit since the last revision: > > Vanitha B P Marked as reviewed by naoto (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27043#pullrequestreview-3181181899 From naoto at openjdk.org Wed Sep 3 15:24:46 2025 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 3 Sep 2025 15:24:46 GMT Subject: RFR: 8366517: `DateFormatSymbols(Locale)` throws NPE if `Locale` argument is null [v2] In-Reply-To: References: Message-ID: On Wed, 3 Sep 2025 00:57:39 GMT, Roger Riggs wrote: >> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: >> >> Use Objects.requireNonNull() > > src/java.base/share/classes/java/text/DateFormatSymbols.java line 148: > >> 146: * if the resources for the specified locale cannot be >> 147: * found or cannot be loaded. >> 148: * @throws NullPointerException if {@code locale} is null > > Adding an explicit Objects.requireNull(locale, "locale") would clearly identify when the NPE is thrown. > Though it might be earlier than without the check. Right. Added the explicit null check. (and a test case) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27060#discussion_r2319328408 From duke at openjdk.org Wed Sep 3 15:33:48 2025 From: duke at openjdk.org (Vanitha B P) Date: Wed, 3 Sep 2025 15:33:48 GMT Subject: Integrated: 8366537: Test "java/util/TimeZone/DefaultTimeZoneTest.java" is not updating the zone ID as expected In-Reply-To: References: Message-ID: On Tue, 2 Sep 2025 09:22:16 GMT, Vanitha B P wrote: > Problem Statements: > 1. ZoneID is not updating when the user change the platform time zone setting, then click the "Update Time Zone" button. > 2. ZoneID was not displaying in the window as it is displaying in the lower releases. > > Test Results: > jdk-25.0.1/bin/java -jar jtreg/lib/jtreg.jar -verbose:summary -testjdk:jdk-25.0.1 -dir:open/test/jdk java/util/TimeZone/DefaultTimeZoneTest.java > > Passed: java/util/TimeZone/DefaultTimeZoneTest.java > Test results: passed: 1 This pull request has now been integrated. Changeset: a40afdd0 Author: Vanitha B P Committer: Naoto Sato URL: https://git.openjdk.org/jdk/commit/a40afdd08f366afcefb1ac9d5fb184c8e803707e Stats: 30 lines in 1 file changed: 25 ins; 1 del; 4 mod 8366537: Test "java/util/TimeZone/DefaultTimeZoneTest.java" is not updating the zone ID as expected Reviewed-by: naoto, jlu ------------- PR: https://git.openjdk.org/jdk/pull/27043 From jlu at openjdk.org Wed Sep 3 16:03:42 2025 From: jlu at openjdk.org (Justin Lu) Date: Wed, 3 Sep 2025 16:03:42 GMT Subject: RFR: 8366517: `DateFormatSymbols(Locale)` throws NPE if `Locale` argument is null [v2] In-Reply-To: References: Message-ID: On Wed, 3 Sep 2025 15:22:11 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/text/DateFormatSymbols.java line 148: >> >>> 146: * if the resources for the specified locale cannot be >>> 147: * found or cannot be loaded. >>> 148: * @throws NullPointerException if {@code locale} is null >> >> Adding an explicit Objects.requireNull(locale, "locale") would clearly identify when the NPE is thrown. >> Though it might be earlier than without the check. > > Right. Added the explicit null check. (and a test case) If we are adding an explicit check to the ctor, might we also take this opportunity to add the check to the related 1-arg factory method? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27060#discussion_r2319435650 From naoto at openjdk.org Wed Sep 3 17:06:32 2025 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 3 Sep 2025 17:06:32 GMT Subject: RFR: 8366517: `DateFormatSymbols(Locale)` throws NPE if `Locale` argument is null [v3] In-Reply-To: References: Message-ID: > Adding a `@throws` clause for NPE in `java.text.DateFormatSymbols(Locale)` constructor. The bug suggests it should throw a `MissingResourceException`, but I don't think we can change this long standing behavior. Instead, explicitly specify the NPE in the javadoc. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Further requireNonNull() ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27060/files - new: https://git.openjdk.org/jdk/pull/27060/files/7b3d4e00..d7cb9566 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27060&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27060&range=01-02 Stats: 14 lines in 4 files changed: 11 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/27060.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27060/head:pull/27060 PR: https://git.openjdk.org/jdk/pull/27060 From naoto at openjdk.org Wed Sep 3 17:06:32 2025 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 3 Sep 2025 17:06:32 GMT Subject: RFR: 8366517: `DateFormatSymbols(Locale)` throws NPE if `Locale` argument is null [v3] In-Reply-To: References: Message-ID: On Wed, 3 Sep 2025 16:01:01 GMT, Justin Lu wrote: >> Right. Added the explicit null check. (and a test case) > > If we are adding an explicit check to the ctor, might we also take this opportunity to add the check to the related 1-arg factory method? Indeed. Also did the same for `DecimalFormatSymbols`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27060#discussion_r2319613332 From jlu at openjdk.org Wed Sep 3 18:02:49 2025 From: jlu at openjdk.org (Justin Lu) Date: Wed, 3 Sep 2025 18:02:49 GMT Subject: Integrated: 8366401: JCK test api/java_text/DecimalFormatSymbols/serial/InputTests.html fails after JDK-8363972 In-Reply-To: References: Message-ID: On Fri, 29 Aug 2025 18:00:25 GMT, Justin Lu wrote: > This PR addresses a JCK test failure related to `DecimalFormatSymbols` de-serialization. While the current public API of DFS disallows a null locale, it was possible to set in the past. Thus, the `loadNumberData(locale)` call currently throws NPE when locale is null in the stream. The call should be guarded with a null check, such that if locale is null, then `lenientMinusSigns` defaults to `minusSignText`. > > Defaulting the locale field when `null` to Locale.ROOT is also a reasonable solution, but I think that the current one is preferable as a user would not expect locale data related logic to occur if locale is `null`. This pull request has now been integrated. Changeset: e3b36e3b Author: Justin Lu URL: https://git.openjdk.org/jdk/commit/e3b36e3babb860d9d24a610160f47d42cfaafaa3 Stats: 266 lines in 2 files changed: 265 ins; 0 del; 1 mod 8366401: JCK test api/java_text/DecimalFormatSymbols/serial/InputTests.html fails after JDK-8363972 Reviewed-by: naoto ------------- PR: https://git.openjdk.org/jdk/pull/27008 From jlu at openjdk.org Wed Sep 3 18:57:42 2025 From: jlu at openjdk.org (Justin Lu) Date: Wed, 3 Sep 2025 18:57:42 GMT Subject: RFR: 8366517: `DateFormatSymbols(Locale)` throws NPE if `Locale` argument is null [v3] In-Reply-To: References: Message-ID: <7Bd0xA8GDgik-VMG1hitlHAm04HvNWq2muI1MZA6h0E=.8dc8f4c3-4f30-42a1-a38e-8a25618c28bc@github.com> On Wed, 3 Sep 2025 17:06:32 GMT, Naoto Sato wrote: >> Adding a `@throws` clause for NPE in `java.text.DateFormatSymbols(Locale)` constructor. The bug suggests it should throw a `MissingResourceException`, but I don't think we can change this long standing behavior. Instead, explicitly specify the NPE in the javadoc. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > Further requireNonNull() Marked as reviewed by jlu (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27060#pullrequestreview-3182018697 From rriggs at openjdk.org Wed Sep 3 21:24:43 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 3 Sep 2025 21:24:43 GMT Subject: RFR: 8366517: `DateFormatSymbols(Locale)` throws NPE if `Locale` argument is null [v3] In-Reply-To: References: Message-ID: On Wed, 3 Sep 2025 17:06:32 GMT, Naoto Sato wrote: >> Adding a `@throws` clause for NPE in `java.text.DateFormatSymbols(Locale)` constructor. The bug suggests it should throw a `MissingResourceException`, but I don't think we can change this long standing behavior. Instead, explicitly specify the NPE in the javadoc. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > Further requireNonNull() Considerable scope creep here, the issue title and PR title should be updated. And the CSR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27060#issuecomment-3250854288 From naoto at openjdk.org Wed Sep 3 21:39:42 2025 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 3 Sep 2025 21:39:42 GMT Subject: RFR: 8366517: Refine null locale processing of ctor/factory methods in `Date/DecimalFormatSymbols` [v3] In-Reply-To: References: Message-ID: On Wed, 3 Sep 2025 21:22:16 GMT, Roger Riggs wrote: > Considerable scope creep here, the issue title and PR title should be updated. And the CSR. Modified ------------- PR Comment: https://git.openjdk.org/jdk/pull/27060#issuecomment-3250891660 From jlu at openjdk.org Wed Sep 3 22:00:48 2025 From: jlu at openjdk.org (Justin Lu) Date: Wed, 3 Sep 2025 22:00:48 GMT Subject: Integrated: 8366400: JCK test api/java_text/DecimalFormat/Parse.html fails after JDK-8363972 In-Reply-To: <02TLmr4b78WC1ZSLPW0GsAgyoew4OwsFqbatVUuVvmY=.b49bb16a-6890-4ea7-bd8b-5ef2103981db@github.com> References: <02TLmr4b78WC1ZSLPW0GsAgyoew4OwsFqbatVUuVvmY=.b49bb16a-6890-4ea7-bd8b-5ef2103981db@github.com> Message-ID: On Fri, 29 Aug 2025 23:59:54 GMT, Justin Lu wrote: > This PR addresses a JCK test failure of an unexpected SIOOBE during DecimalFormat parsing. During the char by char comparison in `matchAffix`, the minimum of the length of the parsed String and the PP index + affix length are iterated on. The parse position index needs to be checked to not be negative to ensure that we do not index the String below 0. Taking the minimum of those two previously mentioned values already guarantees that we do not index the String above the length. This pull request has now been integrated. Changeset: becc35f2 Author: Justin Lu URL: https://git.openjdk.org/jdk/commit/becc35f28792a48fac488841d0bc43226d7c96a7 Stats: 72 lines in 2 files changed: 60 ins; 9 del; 3 mod 8366400: JCK test api/java_text/DecimalFormat/Parse.html fails after JDK-8363972 Reviewed-by: naoto ------------- PR: https://git.openjdk.org/jdk/pull/27014 From rriggs at openjdk.org Thu Sep 4 22:15:07 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 4 Sep 2025 22:15:07 GMT Subject: RFR: 8366517: Refine null locale processing of ctor/factory methods in `Date/DecimalFormatSymbols` [v3] In-Reply-To: References: Message-ID: On Wed, 3 Sep 2025 17:06:32 GMT, Naoto Sato wrote: >> Adding a `@throws` clause for NPE in `java.text.DateFormatSymbols(Locale)` constructor. The bug suggests it should throw a `MissingResourceException`, but I don't think we can change this long standing behavior. Instead, explicitly specify the NPE in the javadoc. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > Further requireNonNull() LGTM ------------- Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27060#pullrequestreview-3187358527 From jlu at openjdk.org Fri Sep 5 00:59:34 2025 From: jlu at openjdk.org (Justin Lu) Date: Fri, 5 Sep 2025 00:59:34 GMT Subject: RFR: 8366733: Re-examine older java.text NF, DF, and DFS serialization tests Message-ID: This PR cleans up the existing DecimalFormatSymbols, DecimalFormat, and NumberFormat serialization tests. As mentioned in https://github.com/openjdk/jdk/pull/27008 these tests can be re-visited. These older tests are either not run (since they rely on being run by older JDK versions), rely on hex dump files, or are simply outdated. These are now removed or updated and moved under **DecimalFormat/SerializationTest.java** and **DFSSerializationTest.java**. Additionally, tests to check the stream version invariants are added for DecimalFormat. Below are the existing tests that are removed or modified. (Their associated hex dump files are removed as well). **DFSDeserialization142.java & DFSSerialization142.java** (D) - They do not have Jtreg headers and are not run. The comments indicate they require a specific JDK version of 1.4.2. Instead, a currency symbol test is added in place. **NumberFormat/DFSSerialization.java** (D) - Test 1 checks if a DFS written from a 1.4.2 JDK with stream version of 2 when read has the correct String exponent and currency symbol. -> There is an existing test which checks the exponent. A New test is added in place of currency symbol test. - Test 2 checks that a DFS maintains the exponent separator and currency symbol when read. -> Tests are added in place of them of them. - Test 3 is unrelated to de serialization, and checks that the exponent separator symbol setter throws NPE. -> Test 3 is already covered by **SettersShouldThrowNPETest.java**. **SerializationLoad.java & SerializationSave.java** (D) - The save test depends on JDK 1.1.4, and is the code to write a DFS and DF. (It has no header and is not run.) The load test uses the saved 1.1.4 hex dump file to ensure the DFS and DF can be read, it did not check any specific invariants. **NumberRegression.java** (M) - Test4185761 and Test4069754 check NF/DF invariants and are ported to the dedicated serialization test file. ------------- Commit messages: - init Changes: https://git.openjdk.org/jdk/pull/27108/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27108&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8366733 Stats: 1051 lines in 13 files changed: 214 ins; 787 del; 50 mod Patch: https://git.openjdk.org/jdk/pull/27108.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27108/head:pull/27108 PR: https://git.openjdk.org/jdk/pull/27108 From rriggs at openjdk.org Fri Sep 5 14:17:10 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 5 Sep 2025 14:17:10 GMT Subject: RFR: 8366733: Re-examine older java.text NF, DF, and DFS serialization tests In-Reply-To: References: Message-ID: On Thu, 4 Sep 2025 22:03:51 GMT, Justin Lu wrote: > This PR cleans up the existing DecimalFormatSymbols, DecimalFormat, and NumberFormat serialization tests. > > As mentioned in https://github.com/openjdk/jdk/pull/27008 these tests can be re-visited. > > These older tests are either not run (since they rely on being run by older JDK versions), rely on hex dump files, or are simply outdated. These are now removed or updated and moved under **DecimalFormat/SerializationTest.java** and **DFSSerializationTest.java**. Additionally, tests to check the stream version invariants are added for DecimalFormat. > > Below are the existing tests that are removed or modified. (Their associated hex dump files are removed as well). > > **DFSDeserialization142.java & DFSSerialization142.java** (D) > > - They do not have Jtreg headers and are not run. The comments indicate they require a specific JDK version of 1.4.2. Instead, a currency symbol test is added in place. > > **NumberFormat/DFSSerialization.java** (D) > > - Test 1 checks if a DFS written from a 1.4.2 JDK with stream version of 2 when read has the correct String exponent and currency symbol. -> There is an existing test which checks the exponent. A New test is added in place of currency symbol test. > - Test 2 checks that a DFS maintains the exponent separator and currency symbol when read. -> Tests are added in place of them of them. > - Test 3 is unrelated to de serialization, and checks that the exponent separator symbol setter throws NPE. -> Test 3 is already covered by **SettersShouldThrowNPETest.java**. > > **SerializationLoad.java & SerializationSave.java** (D) > > - The save test depends on JDK 1.1.4, and is the code to write a DFS and DF. (It has no header and is not run.) The load test uses the saved 1.1.4 hex dump file to ensure the DFS and DF can be read, it did not check any specific invariants. > > **NumberRegression.java** (M) > > - Test4185761 and Test4069754 check NF/DF invariants and are ported to the dedicated serialization test file. Have you verified that the serialized streams in these new tests are identical to the hexformat versions? ------------- PR Comment: https://git.openjdk.org/jdk/pull/27108#issuecomment-3258516580 From ihse at openjdk.org Fri Sep 5 15:43:32 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Fri, 5 Sep 2025 15:43:32 GMT Subject: RFR: 8366837: Clean up gensrc by spp.Spp Message-ID: Several java classes in java.base is generated from templates using SPP, the "Stream Preprocessor". Unfortunately much of this code is very old and has survived unchanged since pre-JDK 7. It does not follow modern makefile standards for abstraction, safe coding practices, etc. In short, they have been a thorn in the side for a long time, and the time has finally come to clean them up. ------------- Commit messages: - Fix syntax error - Don't use $(if ...) for KEYS. - Move weird characters in template expansion from command line to the template itself - Merge branch 'master' into cleanup-spp-gensrc - 8366837: Clean up gensrc by spp.Spp Changes: https://git.openjdk.org/jdk/pull/27078/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27078&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8366837 Stats: 1321 lines in 9 files changed: 523 ins; 562 del; 236 mod Patch: https://git.openjdk.org/jdk/pull/27078.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27078/head:pull/27078 PR: https://git.openjdk.org/jdk/pull/27078 From ihse at openjdk.org Fri Sep 5 15:43:32 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Fri, 5 Sep 2025 15:43:32 GMT Subject: RFR: 8366837: Clean up gensrc by spp.Spp In-Reply-To: References: Message-ID: <3R3SyNx6jYRhyK-xJwmoscTX2oSAV0zzQWHW2AYDf-A=.6bff4b0c-2e79-4648-a7d9-a42a559c4b48@github.com> On Wed, 3 Sep 2025 20:17:50 GMT, Magnus Ihse Bursie wrote: > Several java classes in java.base is generated from templates using SPP, the "Stream Preprocessor". Unfortunately much of this code is very old and has survived unchanged since pre-JDK 7. It does not follow modern makefile standards for abstraction, safe coding practices, etc. In short, they have been a thorn in the side for a long time, and the time has finally come to clean them up. I have verified that the generated java source code in gensrc is byte-by-byte identical with and without this patch. That is really all that is needed in terms of correctness, but to make sure I do not run into some unexpected problem I am also running a confirmation round on our internal CI. Hm, something is messing up the command lines on the GHA hosts. Funny, I did not see it when testing elsewhere. I'll look into it. For the record: the changes in the X-Coder template means that additional empty lines will be inserted in the generated source. This has no real effect on anything substantial, but it means that line numbers change, which make a complete byte-by-byte comparison fail for anything that is dependent on these classes. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27078#issuecomment-3250651080 PR Comment: https://git.openjdk.org/jdk/pull/27078#issuecomment-3250722749 PR Comment: https://git.openjdk.org/jdk/pull/27078#issuecomment-3258508787 From naoto at openjdk.org Fri Sep 5 16:16:12 2025 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 5 Sep 2025 16:16:12 GMT Subject: RFR: 8366733: Re-examine older java.text NF, DF, and DFS serialization tests In-Reply-To: References: Message-ID: On Thu, 4 Sep 2025 22:03:51 GMT, Justin Lu wrote: > This PR cleans up the existing DecimalFormatSymbols, DecimalFormat, and NumberFormat serialization tests. > > As mentioned in https://github.com/openjdk/jdk/pull/27008 these tests can be re-visited. > > These older tests are either not run (since they rely on being run by older JDK versions), rely on hex dump files, or are simply outdated. These are now removed or updated and moved under **DecimalFormat/SerializationTest.java** and **DFSSerializationTest.java**. Additionally, tests to check the stream version invariants are added for DecimalFormat. > > Below are the existing tests that are removed or modified. (Their associated hex dump files are removed as well). > > **DFSDeserialization142.java & DFSSerialization142.java** (D) > > - They do not have Jtreg headers and are not run. The comments indicate they require a specific JDK version of 1.4.2. Instead, a currency symbol test is added in place. > > **NumberFormat/DFSSerialization.java** (D) > > - Test 1 checks if a DFS written from a 1.4.2 JDK with stream version of 2 when read has the correct String exponent and currency symbol. -> There is an existing test which checks the exponent. A New test is added in place of currency symbol test. > - Test 2 checks that a DFS maintains the exponent separator and currency symbol when read. -> Tests are added in place of them of them. > - Test 3 is unrelated to de serialization, and checks that the exponent separator symbol setter throws NPE. -> Test 3 is already covered by **SettersShouldThrowNPETest.java**. > > **SerializationLoad.java & SerializationSave.java** (D) > > - The save test depends on JDK 1.1.4, and is the code to write a DFS and DF. (It has no header and is not run.) The load test uses the saved 1.1.4 hex dump file to ensure the DFS and DF can be read, it did not check any specific invariants. > > **NumberRegression.java** (M) > > - Test4185761 and Test4069754 check NF/DF invariants and are ported to the dedicated serialization test file. Although the existing tests are old and not run, I think the existing data can be reused. You can create overload for `deSer()` for these and test them. I believe they are the real serialized objects from the older releases, so I believe testing them still have value. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27108#issuecomment-3258921072 From jlu at openjdk.org Fri Sep 5 16:37:08 2025 From: jlu at openjdk.org (Justin Lu) Date: Fri, 5 Sep 2025 16:37:08 GMT Subject: RFR: 8366733: Re-examine older java.text NF, DF, and DFS serialization tests In-Reply-To: References: Message-ID: <6RyH1eZqhrpM8vWDsIQ0ZcW7Qn35RECuAOyNPhbES2I=.0450ecca-59d3-4859-b658-34bdb74a9dde@github.com> On Fri, 5 Sep 2025 14:14:48 GMT, Roger Riggs wrote: > Have you verified that the serialized streams in these new tests are identical to the hexformat versions? I looked at the respective Serialization save files and what was being tested in the load files to determine the configuration of the replacement tests. I stepped through the tests with a debugger to make sure the data read from the stream that was being tested was accurate with what was indicated in the save file. I do not expect the streams themselves to be identical (since the new ones are mocked), but rather the invariants being tested should be the same. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27108#issuecomment-3258975202 From jlu at openjdk.org Fri Sep 5 16:41:10 2025 From: jlu at openjdk.org (Justin Lu) Date: Fri, 5 Sep 2025 16:41:10 GMT Subject: RFR: 8366733: Re-examine older java.text NF, DF, and DFS serialization tests In-Reply-To: References: Message-ID: On Fri, 5 Sep 2025 16:13:50 GMT, Naoto Sato wrote: > Although the existing tests are old and not run, I think the existing data can be reused. You can create overload for `deSer()` for these and test them. I believe they are the real serialized objects from the older releases, so I believe testing them still have value. The new tests mock these streams so that we could do away with relying on the hex dump files (which required a user to navigate to the unused save file to determine how the stream was created). What is being tested should be the same for the mocked stream and the original stream itself. However, if it is desirable to test the exact streams from older releases, I can bring the data files back and test their streams directly. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27108#issuecomment-3258986668 From ihse at openjdk.org Fri Sep 5 17:18:15 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Fri, 5 Sep 2025 17:18:15 GMT Subject: RFR: 8366837: Clean up gensrc by spp.Spp In-Reply-To: References: Message-ID: <3GbZE6bnaw9k543kmYqbPXW-sTX_6-ToUsorSTpEJ-0=.b6fb443e-9a13-4478-830f-633ec21dfb47@github.com> On Wed, 3 Sep 2025 20:17:50 GMT, Magnus Ihse Bursie wrote: > Several java classes in java.base is generated from templates using SPP, the "Stream Preprocessor". Unfortunately much of this code is very old and has survived unchanged since pre-JDK 7. It does not follow modern makefile standards for abstraction, safe coding practices, etc. In short, they have been a thorn in the side for a long time, and the time has finally come to clean them up. This has passed Oracle internal CI testing for "builds-infra" tier 1-5. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27078#issuecomment-3259183136 From naoto at openjdk.org Fri Sep 5 17:42:09 2025 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 5 Sep 2025 17:42:09 GMT Subject: RFR: 8366733: Re-examine older java.text NF, DF, and DFS serialization tests In-Reply-To: References: Message-ID: On Fri, 5 Sep 2025 16:38:06 GMT, Justin Lu wrote: > However, if it is desirable to test the exact streams from older releases, I can bring the data files back and test their streams directly. Yes, I think so. Unless there is any specific reason to remove tests, it is the main purpose for these *regression* tests. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27108#issuecomment-3259242350 From rriggs at openjdk.org Fri Sep 5 19:18:09 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 5 Sep 2025 19:18:09 GMT Subject: RFR: 8366733: Re-examine older java.text NF, DF, and DFS serialization tests In-Reply-To: References: Message-ID: On Thu, 4 Sep 2025 22:03:51 GMT, Justin Lu wrote: > This PR cleans up the existing DecimalFormatSymbols, DecimalFormat, and NumberFormat serialization tests. > > As mentioned in https://github.com/openjdk/jdk/pull/27008 these tests can be re-visited. > > These older tests are either not run (since they rely on being run by older JDK versions), rely on hex dump files, or are simply outdated. These are now removed or updated and moved under **DecimalFormat/SerializationTest.java** and **DFSSerializationTest.java**. Additionally, tests to check the stream version invariants are added for DecimalFormat. > > Below are the existing tests that are removed or modified. (Their associated hex dump files are removed as well). > > **DFSDeserialization142.java & DFSSerialization142.java** (D) > > - They do not have Jtreg headers and are not run. The comments indicate they require a specific JDK version of 1.4.2. Instead, a currency symbol test is added in place. > > **NumberFormat/DFSSerialization.java** (D) > > - Test 1 checks if a DFS written from a 1.4.2 JDK with stream version of 2 when read has the correct String exponent and currency symbol. -> There is an existing test which checks the exponent. A New test is added in place of currency symbol test. > - Test 2 checks that a DFS maintains the exponent separator and currency symbol when read. -> Tests are added in place of them of them. > - Test 3 is unrelated to de serialization, and checks that the exponent separator symbol setter throws NPE. -> Test 3 is already covered by **SettersShouldThrowNPETest.java**. > > **SerializationLoad.java & SerializationSave.java** (D) > > - The save test depends on JDK 1.1.4, and is the code to write a DFS and DF. (It has no header and is not run.) The load test uses the saved 1.1.4 hex dump file to ensure the DFS and DF can be read, it did not check any specific invariants. > > **NumberRegression.java** (M) > > - Test4185761 and Test4069754 check NF/DF invariants and are ported to the dedicated serialization test file. Yes, the purpose of the hex dumps is to test exactly the stream produced by earlier versions. They should be retained. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27108#issuecomment-3259470579 From naoto at openjdk.org Fri Sep 5 20:20:15 2025 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 5 Sep 2025 20:20:15 GMT Subject: RFR: 8366517: Refine null locale processing of ctor/factory methods in `Date/DecimalFormatSymbols` [v3] In-Reply-To: References: Message-ID: On Wed, 3 Sep 2025 17:06:32 GMT, Naoto Sato wrote: >> Adding a `@throws` clause for NPE in `java.text.DateFormatSymbols(Locale)` constructor. The bug suggests it should throw a `MissingResourceException`, but I don't think we can change this long standing behavior. Instead, explicitly specify the NPE in the javadoc. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > Further requireNonNull() Thanks for the reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/27060#issuecomment-3259643744 From naoto at openjdk.org Fri Sep 5 20:23:14 2025 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 5 Sep 2025 20:23:14 GMT Subject: Integrated: 8366517: Refine null locale processing of ctor/factory methods in `Date/DecimalFormatSymbols` In-Reply-To: References: Message-ID: On Tue, 2 Sep 2025 19:29:37 GMT, Naoto Sato wrote: > Adding a `@throws` clause for NPE in `java.text.DateFormatSymbols(Locale)` constructor. The bug suggests it should throw a `MissingResourceException`, but I don't think we can change this long standing behavior. Instead, explicitly specify the NPE in the javadoc. This pull request has now been integrated. Changeset: 3824c7cd Author: Naoto Sato URL: https://git.openjdk.org/jdk/commit/3824c7cd06645b1dab5322015e8e6cf604afa754 Stats: 25 lines in 4 files changed: 20 ins; 0 del; 5 mod 8366517: Refine null locale processing of ctor/factory methods in `Date/DecimalFormatSymbols` Reviewed-by: jlu, rriggs ------------- PR: https://git.openjdk.org/jdk/pull/27060 From jlu at openjdk.org Fri Sep 5 20:32:20 2025 From: jlu at openjdk.org (Justin Lu) Date: Fri, 5 Sep 2025 20:32:20 GMT Subject: RFR: 8366733: Re-examine older java.text NF, DF, and DFS serialization tests [v2] In-Reply-To: References: Message-ID: <86E9-EBVDvyuyzNlx6U-_2MlDPUHmMEnQsjg9w9oXL8=.9ae4477a-4ae3-43aa-b16f-5d52dd001d29@github.com> > This PR cleans up the existing DecimalFormatSymbols, DecimalFormat, and NumberFormat serialization tests. > > As mentioned in https://github.com/openjdk/jdk/pull/27008 these tests can be re-visited. > > These older tests are either not run (since they rely on being run by older JDK versions), rely on hex dump files, or are simply outdated. These are now removed or updated and moved under **DecimalFormat/SerializationTest.java** and **DFSSerializationTest.java**. Additionally, tests to check the stream version invariants are added for DecimalFormat. > > Below are the existing tests that are removed or modified. (Their associated hex dump files are removed as well). > > **DFSDeserialization142.java & DFSSerialization142.java** (D) > > - They do not have Jtreg headers and are not run. The comments indicate they require a specific JDK version of 1.4.2. Instead, a currency symbol test is added in place. > > **NumberFormat/DFSSerialization.java** (D) > > - Test 1 checks if a DFS written from a 1.4.2 JDK with stream version of 2 when read has the correct String exponent and currency symbol. -> There is an existing test which checks the exponent. A New test is added in place of currency symbol test. > - Test 2 checks that a DFS maintains the exponent separator and currency symbol when read. -> Tests are added in place of them of them. > - Test 3 is unrelated to de serialization, and checks that the exponent separator symbol setter throws NPE. -> Test 3 is already covered by **SettersShouldThrowNPETest.java**. > > **SerializationLoad.java & SerializationSave.java** (D) > > - The save test depends on JDK 1.1.4, and is the code to write a DFS and DF. (It has no header and is not run.) The load test uses the saved 1.1.4 hex dump file to ensure the DFS and DF can be read, it did not check any specific invariants. > > **NumberRegression.java** (M) > > - Test4185761 and Test4069754 check NF/DF invariants and are ported to the dedicated serialization test file. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Retain hex dump and test against older versions directly ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27108/files - new: https://git.openjdk.org/jdk/pull/27108/files/95c3c0c7..59f07e9d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27108&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27108&range=00-01 Stats: 383 lines in 7 files changed: 379 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/27108.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27108/head:pull/27108 PR: https://git.openjdk.org/jdk/pull/27108 From jlu at openjdk.org Fri Sep 5 20:32:20 2025 From: jlu at openjdk.org (Justin Lu) Date: Fri, 5 Sep 2025 20:32:20 GMT Subject: RFR: 8366733: Re-examine older java.text NF, DF, and DFS serialization tests In-Reply-To: References: Message-ID: On Thu, 4 Sep 2025 22:03:51 GMT, Justin Lu wrote: > This PR cleans up the existing DecimalFormatSymbols, DecimalFormat, and NumberFormat serialization tests. > > As mentioned in https://github.com/openjdk/jdk/pull/27008 these tests can be re-visited. > > These older tests are either not run (since they rely on being run by older JDK versions), rely on hex dump files, or are simply outdated. These are now removed or updated and moved under **DecimalFormat/SerializationTest.java** and **DFSSerializationTest.java**. Additionally, tests to check the stream version invariants are added for DecimalFormat. > > Below are the existing tests that are removed or modified. (Their associated hex dump files are removed as well). > > **DFSDeserialization142.java & DFSSerialization142.java** (D) > > - They do not have Jtreg headers and are not run. The comments indicate they require a specific JDK version of 1.4.2. Instead, a currency symbol test is added in place. > > **NumberFormat/DFSSerialization.java** (D) > > - Test 1 checks if a DFS written from a 1.4.2 JDK with stream version of 2 when read has the correct String exponent and currency symbol. -> There is an existing test which checks the exponent. A New test is added in place of currency symbol test. > - Test 2 checks that a DFS maintains the exponent separator and currency symbol when read. -> Tests are added in place of them of them. > - Test 3 is unrelated to de serialization, and checks that the exponent separator symbol setter throws NPE. -> Test 3 is already covered by **SettersShouldThrowNPETest.java**. > > **SerializationLoad.java & SerializationSave.java** (D) > > - The save test depends on JDK 1.1.4, and is the code to write a DFS and DF. (It has no header and is not run.) The load test uses the saved 1.1.4 hex dump file to ensure the DFS and DF can be read, it did not check any specific invariants. > > **NumberRegression.java** (M) > > - Test4185761 and Test4069754 check NF/DF invariants and are ported to the dedicated serialization test file. Brought the hex dump files back (more appropriately under the DecimalFormat folder) and retained the original tests. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27108#issuecomment-3259669710 From naoto at openjdk.org Fri Sep 5 21:14:17 2025 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 5 Sep 2025 21:14:17 GMT Subject: RFR: 8366733: Re-examine older java.text NF, DF, and DFS serialization tests [v2] In-Reply-To: <86E9-EBVDvyuyzNlx6U-_2MlDPUHmMEnQsjg9w9oXL8=.9ae4477a-4ae3-43aa-b16f-5d52dd001d29@github.com> References: <86E9-EBVDvyuyzNlx6U-_2MlDPUHmMEnQsjg9w9oXL8=.9ae4477a-4ae3-43aa-b16f-5d52dd001d29@github.com> Message-ID: <0CiO6X7STDojhN-y2aZSknIV66GexeGV_rMIradJ-mU=.8a6b2f51-987d-47ad-be33-1077cb56cab6@github.com> On Fri, 5 Sep 2025 20:32:20 GMT, Justin Lu wrote: >> This PR cleans up the existing DecimalFormatSymbols, DecimalFormat, and NumberFormat serialization tests. >> >> As mentioned in https://github.com/openjdk/jdk/pull/27008 these tests can be re-visited. >> >> These older tests are either not run (since they rely on being run by older JDK versions), rely on hex dump files, or are simply outdated. These are now removed or updated and moved under **DecimalFormat/SerializationTest.java** and **DFSSerializationTest.java**. Additionally, tests to check the stream version invariants are added for DecimalFormat. >> >> Below are the existing tests that are removed or modified. (Their associated hex dump files are removed as well). >> >> **DFSDeserialization142.java & DFSSerialization142.java** (D) >> >> - They do not have Jtreg headers and are not run. The comments indicate they require a specific JDK version of 1.4.2. Instead, a currency symbol test is added in place. >> >> **NumberFormat/DFSSerialization.java** (D) >> >> - Test 1 checks if a DFS written from a 1.4.2 JDK with stream version of 2 when read has the correct String exponent and currency symbol. -> There is an existing test which checks the exponent. A New test is added in place of currency symbol test. >> - Test 2 checks that a DFS maintains the exponent separator and currency symbol when read. -> Tests are added in place of them of them. >> - Test 3 is unrelated to de serialization, and checks that the exponent separator symbol setter throws NPE. -> Test 3 is already covered by **SettersShouldThrowNPETest.java**. >> >> **SerializationLoad.java & SerializationSave.java** (D) >> >> - The save test depends on JDK 1.1.4, and is the code to write a DFS and DF. (It has no header and is not run.) The load test uses the saved 1.1.4 hex dump file to ensure the DFS and DF can be read, it did not check any specific invariants. >> >> **NumberRegression.java** (M) >> >> - Test4185761 and Test4069754 check NF/DF invariants and are ported to the dedicated serialization test file. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Retain hex dump and test against older versions directly LGTM. Thanks for revisiting the serialization tests. test/jdk/java/text/Format/DecimalFormat/DecimalFormat.114.txt line 2: > 1: # > 2: # Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. Nit: since the content of the file has not changed, I don't think we need to update the year ------------- PR Review: https://git.openjdk.org/jdk/pull/27108#pullrequestreview-3190796488 PR Review Comment: https://git.openjdk.org/jdk/pull/27108#discussion_r2326054684 From jlu at openjdk.org Fri Sep 5 21:39:36 2025 From: jlu at openjdk.org (Justin Lu) Date: Fri, 5 Sep 2025 21:39:36 GMT Subject: RFR: 8366733: Re-examine older java.text NF, DF, and DFS serialization tests [v3] In-Reply-To: References: Message-ID: <8sxIpUiYPlvs8yEyQFQcDARKjP_4C02j44N8mGNiMPY=.81c3c717-88d2-48ff-a59a-ee4b5f900220@github.com> > This PR cleans up the existing DecimalFormatSymbols, DecimalFormat, and NumberFormat serialization tests. > > As mentioned in https://github.com/openjdk/jdk/pull/27008 these tests can be re-visited. > > These older tests are either not run (since they rely on being run by older JDK versions), rely on hex dump files, or are simply outdated. These are now removed or updated and moved under **DecimalFormat/SerializationTest.java** and **DFSSerializationTest.java**. Additionally, tests to check the stream version invariants are added for DecimalFormat. > > Below are the existing tests that are removed or modified. (Their associated hex dump files are removed as well). > > **DFSDeserialization142.java & DFSSerialization142.java** (D) > > - They do not have Jtreg headers and are not run. The comments indicate they require a specific JDK version of 1.4.2. Instead, a currency symbol test is added in place. > > **NumberFormat/DFSSerialization.java** (D) > > - Test 1 checks if a DFS written from a 1.4.2 JDK with stream version of 2 when read has the correct String exponent and currency symbol. -> There is an existing test which checks the exponent. A New test is added in place of currency symbol test. > - Test 2 checks that a DFS maintains the exponent separator and currency symbol when read. -> Tests are added in place of them of them. > - Test 3 is unrelated to de serialization, and checks that the exponent separator symbol setter throws NPE. -> Test 3 is already covered by **SettersShouldThrowNPETest.java**. > > **SerializationLoad.java & SerializationSave.java** (D) > > - The save test depends on JDK 1.1.4, and is the code to write a DFS and DF. (It has no header and is not run.) The load test uses the saved 1.1.4 hex dump file to ensure the DFS and DF can be read, it did not check any specific invariants. > > **NumberRegression.java** (M) > > - Test4185761 and Test4069754 check NF/DF invariants and are ported to the dedicated serialization test file. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Restore copyright years for hex dump files ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27108/files - new: https://git.openjdk.org/jdk/pull/27108/files/59f07e9d..c57082c6 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27108&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27108&range=01-02 Stats: 5 lines in 5 files changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/27108.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27108/head:pull/27108 PR: https://git.openjdk.org/jdk/pull/27108 From jlu at openjdk.org Fri Sep 5 21:39:37 2025 From: jlu at openjdk.org (Justin Lu) Date: Fri, 5 Sep 2025 21:39:37 GMT Subject: RFR: 8366733: Re-examine older java.text NF, DF, and DFS serialization tests [v2] In-Reply-To: <0CiO6X7STDojhN-y2aZSknIV66GexeGV_rMIradJ-mU=.8a6b2f51-987d-47ad-be33-1077cb56cab6@github.com> References: <86E9-EBVDvyuyzNlx6U-_2MlDPUHmMEnQsjg9w9oXL8=.9ae4477a-4ae3-43aa-b16f-5d52dd001d29@github.com> <0CiO6X7STDojhN-y2aZSknIV66GexeGV_rMIradJ-mU=.8a6b2f51-987d-47ad-be33-1077cb56cab6@github.com> Message-ID: <-0NRA6CTbdNKNFKsmNAi64ySS_PtFBXyO0CPRyHbEtM=.cdeb1a6a-c268-46c7-ad50-a0afe99d64cd@github.com> On Fri, 5 Sep 2025 21:09:43 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional commit since the last revision: >> >> Retain hex dump and test against older versions directly > > test/jdk/java/text/Format/DecimalFormat/DecimalFormat.114.txt line 2: > >> 1: # >> 2: # Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. > > Nit: since the content of the file has not changed, I don't think we need to update the year Restored in https://github.com/openjdk/jdk/pull/27108/commits/c57082c684961993b64b9627f4e64c5d7cea70b6 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27108#discussion_r2326093681 From erikj at openjdk.org Fri Sep 5 22:44:11 2025 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 5 Sep 2025 22:44:11 GMT Subject: RFR: 8366837: Clean up gensrc by spp.Spp In-Reply-To: References: Message-ID: On Wed, 3 Sep 2025 20:17:50 GMT, Magnus Ihse Bursie wrote: > Several java classes in java.base is generated from templates using SPP, the "Stream Preprocessor". Unfortunately much of this code is very old and has survived unchanged since pre-JDK 7. It does not follow modern makefile standards for abstraction, safe coding practices, etc. In short, they have been a thorn in the side for a long time, and the time has finally come to clean them up. make/modules/java.base/gensrc/GensrcBuffer.gmk line 162: > 160: $$(CAT) $$($1_BIN_SNIPPET_FILES) >> $$($1_REAL_OUTPUT).tmp > 161: $$(ECHO) "}" >> $$($1_REAL_OUTPUT).tmp > 162: $$(MV) $$($1_REAL_OUTPUT).tmp $$($1_REAL_OUTPUT) Indentation looks off here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27078#discussion_r2326173444 From ihse at openjdk.org Fri Sep 5 22:50:11 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Fri, 5 Sep 2025 22:50:11 GMT Subject: RFR: 8366837: Clean up gensrc by spp.Spp In-Reply-To: References: Message-ID: On Fri, 5 Sep 2025 22:34:32 GMT, Erik Joelsson wrote: >> Several java classes in java.base is generated from templates using SPP, the "Stream Preprocessor". Unfortunately much of this code is very old and has survived unchanged since pre-JDK 7. It does not follow modern makefile standards for abstraction, safe coding practices, etc. In short, they have been a thorn in the side for a long time, and the time has finally come to clean them up. > > make/modules/java.base/gensrc/GensrcBuffer.gmk line 162: > >> 160: $$(CAT) $$($1_BIN_SNIPPET_FILES) >> $$($1_REAL_OUTPUT).tmp >> 161: $$(ECHO) "}" >> $$($1_REAL_OUTPUT).tmp >> 162: $$(MV) $$($1_REAL_OUTPUT).tmp $$($1_REAL_OUTPUT) > > Indentation looks off here. I think it is per our standard. It seems the Github diff viewer expands tabs to 4 spaces, which makes it looks incorrect. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27078#discussion_r2326185455 From naoto at openjdk.org Fri Sep 5 23:08:41 2025 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 5 Sep 2025 23:08:41 GMT Subject: RFR: 8367021: Regression in LocaleDataTest refactoring Message-ID: A small fix to a locale test regression. Auto flush was incorrectly set to default (= false) by the prior fix. ------------- Commit messages: - initial commit Changes: https://git.openjdk.org/jdk/pull/27130/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27130&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8367021 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/27130.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27130/head:pull/27130 PR: https://git.openjdk.org/jdk/pull/27130 From jlu at openjdk.org Fri Sep 5 23:19:10 2025 From: jlu at openjdk.org (Justin Lu) Date: Fri, 5 Sep 2025 23:19:10 GMT Subject: RFR: 8367021: Regression in LocaleDataTest refactoring In-Reply-To: References: Message-ID: <9LSeqq53cdjE4uQBhl6Zw7rBvpa1xqMu_zJCv9hiAsM=.ba769751-d2a9-45e3-9991-ea22e6dbae4c@github.com> On Fri, 5 Sep 2025 23:03:08 GMT, Naoto Sato wrote: > A small fix to a locale test regression. Auto flush was incorrectly set to default (= false) by the prior fix. Marked as reviewed by jlu (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27130#pullrequestreview-3191031657 From naoto at openjdk.org Fri Sep 5 23:30:10 2025 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 5 Sep 2025 23:30:10 GMT Subject: RFR: 8366733: Re-examine older java.text NF, DF, and DFS serialization tests [v3] In-Reply-To: <8sxIpUiYPlvs8yEyQFQcDARKjP_4C02j44N8mGNiMPY=.81c3c717-88d2-48ff-a59a-ee4b5f900220@github.com> References: <8sxIpUiYPlvs8yEyQFQcDARKjP_4C02j44N8mGNiMPY=.81c3c717-88d2-48ff-a59a-ee4b5f900220@github.com> Message-ID: On Fri, 5 Sep 2025 21:39:36 GMT, Justin Lu wrote: >> This PR cleans up the existing DecimalFormatSymbols, DecimalFormat, and NumberFormat serialization tests. >> >> As mentioned in https://github.com/openjdk/jdk/pull/27008 these tests can be re-visited. >> >> These older tests are either not run (since they rely on being run by older JDK versions), rely on hex dump files, or are simply outdated. These are now removed or updated and moved under **DecimalFormat/SerializationTest.java** and **DFSSerializationTest.java**. Additionally, tests to check the stream version invariants are added for DecimalFormat. >> >> Below are the existing tests that are removed or modified. (Their associated hex dump files are removed as well). >> >> **DFSDeserialization142.java & DFSSerialization142.java** (D) >> >> - They do not have Jtreg headers and are not run. The comments indicate they require a specific JDK version of 1.4.2. Instead, a currency symbol test is added in place. >> >> **NumberFormat/DFSSerialization.java** (D) >> >> - Test 1 checks if a DFS written from a 1.4.2 JDK with stream version of 2 when read has the correct String exponent and currency symbol. -> There is an existing test which checks the exponent. A New test is added in place of currency symbol test. >> - Test 2 checks that a DFS maintains the exponent separator and currency symbol when read. -> Tests are added in place of them of them. >> - Test 3 is unrelated to de serialization, and checks that the exponent separator symbol setter throws NPE. -> Test 3 is already covered by **SettersShouldThrowNPETest.java**. >> >> **SerializationLoad.java & SerializationSave.java** (D) >> >> - The save test depends on JDK 1.1.4, and is the code to write a DFS and DF. (It has no header and is not run.) The load test uses the saved 1.1.4 hex dump file to ensure the DFS and DF can be read, it did not check any specific invariants. >> >> **NumberRegression.java** (M) >> >> - Test4185761 and Test4069754 check NF/DF invariants and are ported to the dedicated serialization test file. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Restore copyright years for hex dump files Marked as reviewed by naoto (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27108#pullrequestreview-3191048971 From joehw at openjdk.org Fri Sep 5 23:58:10 2025 From: joehw at openjdk.org (Joe Wang) Date: Fri, 5 Sep 2025 23:58:10 GMT Subject: RFR: 8367021: Regression in LocaleDataTest refactoring In-Reply-To: References: Message-ID: <1-561kkcAj3rPXJC8GxxcL8CXD6UoPNLORVjN5Tu4jI=.b0c94f0b-df8a-4741-b0f3-bd6889df25aa@github.com> On Fri, 5 Sep 2025 23:03:08 GMT, Naoto Sato wrote: > A small fix to a locale test regression. Auto flush was incorrectly set to default (= false) by the prior fix. Marked as reviewed by joehw (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27130#pullrequestreview-3191136843 From ihse at openjdk.org Sat Sep 6 09:05:10 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Sat, 6 Sep 2025 09:05:10 GMT Subject: RFR: 8366837: Clean up gensrc by spp.Spp In-Reply-To: References: Message-ID: On Fri, 5 Sep 2025 22:47:58 GMT, Magnus Ihse Bursie wrote: >> make/modules/java.base/gensrc/GensrcBuffer.gmk line 162: >> >>> 160: $$(CAT) $$($1_BIN_SNIPPET_FILES) >> $$($1_REAL_OUTPUT).tmp >>> 161: $$(ECHO) "}" >> $$($1_REAL_OUTPUT).tmp >>> 162: $$(MV) $$($1_REAL_OUTPUT).tmp $$($1_REAL_OUTPUT) >> >> Indentation looks off here. > > I think it is per our standard. It seems the Github diff viewer expands tabs to 4 spaces, which makes it looks incorrect. Turns out you can actually change the tab size setting on GitHub. They set 4 as default but you can change it to 8 at https://github.com/settings/appearance. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27078#discussion_r2326684556 From erikj at openjdk.org Mon Sep 8 13:20:19 2025 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 8 Sep 2025 13:20:19 GMT Subject: RFR: 8366837: Clean up gensrc by spp.Spp In-Reply-To: References: Message-ID: On Wed, 3 Sep 2025 20:17:50 GMT, Magnus Ihse Bursie wrote: > Several java classes in java.base is generated from templates using SPP, the "Stream Preprocessor". Unfortunately much of this code is very old and has survived unchanged since pre-JDK 7. It does not follow modern makefile standards for abstraction, safe coding practices, etc. In short, they have been a thorn in the side for a long time, and the time has finally come to clean them up. Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27078#pullrequestreview-3196501441 From erikj at openjdk.org Mon Sep 8 13:20:21 2025 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 8 Sep 2025 13:20:21 GMT Subject: RFR: 8366837: Clean up gensrc by spp.Spp In-Reply-To: References: Message-ID: On Sat, 6 Sep 2025 09:02:59 GMT, Magnus Ihse Bursie wrote: >> I think it is per our standard. It seems the Github diff viewer expands tabs to 4 spaces, which makes it looks incorrect. > > Turns out you can actually change the tab size setting on GitHub. They set 4 as default but you can change it to 8 at https://github.com/settings/appearance. You are right, thanks for that link! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27078#discussion_r2330222469 From naoto at openjdk.org Mon Sep 8 16:26:16 2025 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 8 Sep 2025 16:26:16 GMT Subject: RFR: 8367021: Regression in LocaleDataTest refactoring In-Reply-To: References: Message-ID: On Fri, 5 Sep 2025 23:03:08 GMT, Naoto Sato wrote: > A small fix to a locale test regression. Auto flush was incorrectly set to default (= false) by the prior fix. Thanks for the reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/27130#issuecomment-3267052349 From naoto at openjdk.org Mon Sep 8 16:26:17 2025 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 8 Sep 2025 16:26:17 GMT Subject: Integrated: 8367021: Regression in LocaleDataTest refactoring In-Reply-To: References: Message-ID: On Fri, 5 Sep 2025 23:03:08 GMT, Naoto Sato wrote: > A small fix to a locale test regression. Auto flush was incorrectly set to default (= false) by the prior fix. This pull request has now been integrated. Changeset: 48831c65 Author: Naoto Sato URL: https://git.openjdk.org/jdk/commit/48831c65b5535fef706b64a4eb23ba28b1567ead Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod 8367021: Regression in LocaleDataTest refactoring Reviewed-by: jlu, joehw ------------- PR: https://git.openjdk.org/jdk/pull/27130 From ihse at openjdk.org Mon Sep 8 16:51:23 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Mon, 8 Sep 2025 16:51:23 GMT Subject: Integrated: 8366837: Clean up gensrc by spp.Spp In-Reply-To: References: Message-ID: On Wed, 3 Sep 2025 20:17:50 GMT, Magnus Ihse Bursie wrote: > Several java classes in java.base is generated from templates using SPP, the "Stream Preprocessor". Unfortunately much of this code is very old and has survived unchanged since pre-JDK 7. It does not follow modern makefile standards for abstraction, safe coding practices, etc. In short, they have been a thorn in the side for a long time, and the time has finally come to clean them up. This pull request has now been integrated. Changeset: 55af9d83 Author: Magnus Ihse Bursie URL: https://git.openjdk.org/jdk/commit/55af9d83800930966776224bc4c7ff4ab1af9817 Stats: 1321 lines in 9 files changed: 523 ins; 562 del; 236 mod 8366837: Clean up gensrc by spp.Spp Reviewed-by: erikj ------------- PR: https://git.openjdk.org/jdk/pull/27078 From duke at openjdk.org Mon Sep 8 18:00:20 2025 From: duke at openjdk.org (xxDark) Date: Mon, 8 Sep 2025 18:00:20 GMT Subject: RFR: 8366837: Clean up gensrc by spp.Spp In-Reply-To: References: Message-ID: On Wed, 3 Sep 2025 20:17:50 GMT, Magnus Ihse Bursie wrote: > Several java classes in java.base is generated from templates using SPP, the "Stream Preprocessor". Unfortunately much of this code is very old and has survived unchanged since pre-JDK 7. It does not follow modern makefile standards for abstraction, safe coding practices, etc. In short, they have been a thorn in the side for a long time, and the time has finally come to clean them up. Hello, this seemingly broke the build on Windows x64. VarHandleGuards class does not get generated. ^ f:\openjdk\src\java.base\share\classes\java\lang\invoke\MethodHandleNatives.java:558: error: cannot find symbol VarHandleGuards.class, getVarHandleGuardMethodName(guardType), ^ symbol: class VarHandleGuards location: class MethodHandleNatives f:\openjdk\src\java.base\share\classes\java\lang\invoke\MethodHandleNatives.java:562: error: cannot find symbol VarHandleGuards.class, LM_TRUSTED); ^ symbol: class VarHandleGuards location: class MethodHandleNatives f:\openjdk\src\java.base\share\classes\java\lang\invoke\VarHandle.java:2249: error: cannot find symbol UNSAFE.ensureClassInitialized(VarHandleGuards.class) Reverting this commit fixed the issue. The setup to configure the build was as follows: set JAVA_HOME=D:\jdks\temurin-24.0.32 d:\MSV2019\VC\Auxiliary\Build\vcvars64.bat d:\cygwin64\Cygwin.bat cd /cygdrive/f/openjdk bash configure make java.base $ make clean java.base Building targets 'clean java.base' in configuration 'windows-x86_64-server-release' Cleaning hotspot build artifacts ... done Cleaning jdk build artifacts ... done Cleaning bootcycle-build build artifacts ... done Cleaning test-results build artifacts ... done Cleaning test-support build artifacts ... done Cleaning test build artifacts ... done Cleaning buildtools build artifacts ... done Cleaning support build artifacts ... done Cleaning support/images build artifacts ... done Cleaning images build artifacts ... done Cleaning make-support build artifacts ... done Cleaning test-make build artifacts ... done Cleaning bundles build artifacts ... done Cleaning buildjdk build artifacts ... done Cleaned all build artifacts. Compiling up to 1 files for BUILD_TOOLS_HOTSPOT Compiling up to 9 files for BUILD_TOOLS_LANGTOOLS Generating classes for compiler.properties launcher.properties Compiling 17 properties into resource bundles for jdk.javadoc Generating FlagsEnum Compiling 19 properties into resource bundles for jdk.compiler Compiling up to 136 files for BUILD_java.compiler.interim Compiling up to 360 files for BUILD_jdk.compiler.interim Compiling up to 145 files for BUILD_jdk.internal.md.interim Compiling up to 213 files for BUILD_jdk.javadoc.interim Compiling up to 17 files for BUILD_JAVAC_SERVER Compiling up to 190 files for BUILD_TOOLS_JDK Compiling up to 2 files for COMPILE_DEPEND Compiling up to 2 files for BUILD_BREAKITERATOR_BASE Compiling up to 2 files for BUILD_BREAKITERATOR_LD SocketOptionRegistry.java.template d:\msvwin10kit\include\10.0.19041.0\um\winbase.h(9531): warning C5105: macro expansion producing 'defined' has undefined behavior Compiling 11 properties into resource bundles for java.base Compiling 3 properties into resource bundles for java.base Compiling 22 properties into resource bundles for java.base Compiling 11 properties into resource bundles for java.base Compiling up to 3366 files for java.base Creating hotspot/variant-server/tools/adlc/adlc.exe from 13 file(s) Compiling up to 2 files for BUILD_JVMTI_TOOLS Creating support/modules_libs/java.base/server/jvm.dll from 1223 file(s) f:\jdk\src\java.base\share\classes\java\lang\invoke\MethodHandleNatives.java:558: error: cannot find symbol VarHandleGuards.class, getVarHandleGuardMethodName(guardType), ^ symbol: class VarHandleGuards location: class MethodHandleNatives f:\jdk\src\java.base\share\classes\java\lang\invoke\MethodHandleNatives.java:562: error: cannot find symbol VarHandleGuards.class, LM_TRUSTED); ^ symbol: class VarHandleGuards location: class MethodHandleNatives f:\jdk\src\java.base\share\classes\java\lang\invoke\VarHandle.java:2249: error: cannot find symbol UNSAFE.ensureClassInitialized(VarHandleGuards.class); ^ symbol: class VarHandleGuards location: class VarHandle 3 errors make[3]: *** [CompileJavaModules.gmk:102: /cygdrive/f/jdk/build/windows-x86_64-server-release/jdk/modules/java.base/_the.java.base_batch] Error 1 make[2]: *** [make/Main.gmk:182: java.base-java] Error 2 make[2]: *** Waiting for unfinished jobs.... ------------- PR Comment: https://git.openjdk.org/jdk/pull/27078#issuecomment-3267328044 From liach at openjdk.org Mon Sep 8 18:09:18 2025 From: liach at openjdk.org (Chen Liang) Date: Mon, 8 Sep 2025 18:09:18 GMT Subject: RFR: 8366837: Clean up gensrc by spp.Spp In-Reply-To: References: Message-ID: On Wed, 3 Sep 2025 20:17:50 GMT, Magnus Ihse Bursie wrote: > Several java classes in java.base is generated from templates using SPP, the "Stream Preprocessor". Unfortunately much of this code is very old and has survived unchanged since pre-JDK 7. It does not follow modern makefile standards for abstraction, safe coding practices, etc. In short, they have been a thorn in the side for a long time, and the time has finally come to clean them up. This patch removed the `VARHANDLES_GENSRC_DIR` variable used by VarHandleGuards generation. I think it can be addressed by a hot fix. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27078#issuecomment-3267361378 From alanb at openjdk.org Mon Sep 8 18:27:19 2025 From: alanb at openjdk.org (Alan Bateman) Date: Mon, 8 Sep 2025 18:27:19 GMT Subject: RFR: 8366837: Clean up gensrc by spp.Spp In-Reply-To: References: Message-ID: On Mon, 8 Sep 2025 18:06:54 GMT, Chen Liang wrote: > This patch removed the `VARHANDLES_GENSRC_DIR` variable used by VarHandleGuards generation. I think it can be addressed by a hot fix. I think the change needs to backed out and the differences with line numbers checked to see what impact it will have on stack traces and mapping it back to the sources in the template files. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27078#issuecomment-3267427085 From philip.race at oracle.com Mon Sep 8 18:52:43 2025 From: philip.race at oracle.com (Philip Race) Date: Mon, 8 Sep 2025 11:52:43 -0700 Subject: RFR: 8366837: Clean up gensrc by spp.Spp In-Reply-To: References: Message-ID: Looks like it broke all the builds. So a P1 backout is needed. -phil. On 9/8/25 11:27 AM, Alan Bateman wrote: > On Mon, 8 Sep 2025 18:06:54 GMT, Chen Liang wrote: > >> This patch removed the `VARHANDLES_GENSRC_DIR` variable used by VarHandleGuards generation. I think it can be addressed by a hot fix. > I think the change needs to backed out and the differences with line numbers checked to see what impact it will have on stack traces and mapping it back to the sources in the template files. > > ------------- > > PR Comment: https://git.openjdk.org/jdk/pull/27078#issuecomment-3267427085 From philip.race at oracle.com Mon Sep 8 19:10:47 2025 From: philip.race at oracle.com (Philip Race) Date: Mon, 8 Sep 2025 12:10:47 -0700 Subject: RFR: 8366837: Clean up gensrc by spp.Spp In-Reply-To: References: Message-ID: <311b7575-95d9-45e1-8146-bf9dd77dc2da@oracle.com> I submitted a bug report : https://bugs.openjdk.org/browse/JDK-8367130 -phil. On 9/8/25 11:52 AM, Philip Race wrote: > Looks like it broke all the builds. So a P1 backout is needed. > > -phil. > > On 9/8/25 11:27 AM, Alan Bateman wrote: >> On Mon, 8 Sep 2025 18:06:54 GMT, Chen Liang wrote: >> >>> This patch removed the `VARHANDLES_GENSRC_DIR` variable used by >>> VarHandleGuards generation. I think it can be addressed by a hot fix. >> I think the change needs to backed out and the differences with line >> numbers checked to see what impact it will have on stack traces and >> mapping it back to the sources in the template files. >> >> ------------- >> >> PR Comment: >> https://git.openjdk.org/jdk/pull/27078#issuecomment-3267427085 > From duke at openjdk.org Tue Sep 9 10:39:27 2025 From: duke at openjdk.org (Tatsunori Uchino) Date: Tue, 9 Sep 2025 10:39:27 GMT Subject: RFR: 8364007: Add no-argument codePointCount method to CharSequence and String [v3] In-Reply-To: References: Message-ID: On Sat, 26 Jul 2025 10:10:40 GMT, Tatsunori Uchino wrote: >> Adds `codePointCount()` overloads to `String`, `Character`, `(Abstract)StringBuilder`, and `StringBuffer` to make it possible to conveniently retrieve the length of a string as code points without extra boundary checks. >> >> >> if (superTremendouslyLongExpressionYieldingAString().codePointCount() > limit) { >> throw new Exception("exceeding length"); >> } >> >> >> Is a CSR required to this change? > > Tatsunori Uchino has updated the pull request incrementally with four additional commits since the last revision: > > - Update `@bug` in correct file > - Add default implementation on codePointCount in CharSequence > - Update `@bug` entries in test class doc comments > - Discard changes on code whose form is not `str.codePointCount(0, str.length())` What should _I_ do now? ------------- PR Comment: https://git.openjdk.org/jdk/pull/26461#issuecomment-3270063910 From liach at openjdk.org Tue Sep 9 15:08:06 2025 From: liach at openjdk.org (Chen Liang) Date: Tue, 9 Sep 2025 15:08:06 GMT Subject: RFR: 8364007: Add no-argument codePointCount method to CharSequence and String [v3] In-Reply-To: References: Message-ID: On Sat, 26 Jul 2025 10:10:40 GMT, Tatsunori Uchino wrote: >> Adds `codePointCount()` overloads to `String`, `Character`, `(Abstract)StringBuilder`, and `StringBuffer` to make it possible to conveniently retrieve the length of a string as code points without extra boundary checks. >> >> >> if (superTremendouslyLongExpressionYieldingAString().codePointCount() > limit) { >> throw new Exception("exceeding length"); >> } >> >> >> Is a CSR required to this change? > > Tatsunori Uchino has updated the pull request incrementally with four additional commits since the last revision: > > - Update `@bug` in correct file > - Add default implementation on codePointCount in CharSequence > - Update `@bug` entries in test class doc comments > - Discard changes on code whose form is not `str.codePointCount(0, str.length())` I think this is a good proposal. We can move forward and leave some discussions: 1. Is it necessary to have both `Character.codePointCount(CharSequence)` and `CharSequence.codePointCount`? 2. Do we need `codePointCount(int start, int end)` in CharSequence too? For `CharSequence.codePointCount`, as Alan Bateman said, we need to check for compatibility, which I can help after settle down with the API shape. In addition, `CharBuffer` needs to document its `CharSequence` methods as "Relative ...." operations. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26461#issuecomment-3271140920 From jlu at openjdk.org Tue Sep 9 22:07:29 2025 From: jlu at openjdk.org (Justin Lu) Date: Tue, 9 Sep 2025 22:07:29 GMT Subject: Integrated: 8366733: Re-examine older java.text NF, DF, and DFS serialization tests In-Reply-To: References: Message-ID: <_TRTJnSWw4DkW6HveTcuQfX75R5GzZH1c6JQgJVTyrI=.06d4ac91-1ad8-4b15-b6b0-8b8513103bac@github.com> On Thu, 4 Sep 2025 22:03:51 GMT, Justin Lu wrote: > This PR cleans up the existing DecimalFormatSymbols, DecimalFormat, and NumberFormat serialization tests. > > As mentioned in https://github.com/openjdk/jdk/pull/27008 these tests can be re-visited. > > These older tests are either not run (since they rely on being run by older JDK versions), rely on hex dump files, or are simply outdated. These are now removed or updated and moved under **DecimalFormat/SerializationTest.java** and **DFSSerializationTest.java**. Additionally, tests to check the stream version invariants are added for DecimalFormat. > > Below are the existing tests that are removed or modified. (Their associated hex dump files are removed as well). > > **DFSDeserialization142.java & DFSSerialization142.java** (D) > > - They do not have Jtreg headers and are not run. The comments indicate they require a specific JDK version of 1.4.2. Instead, a currency symbol test is added in place. > > **NumberFormat/DFSSerialization.java** (D) > > - Test 1 checks if a DFS written from a 1.4.2 JDK with stream version of 2 when read has the correct String exponent and currency symbol. -> There is an existing test which checks the exponent. A New test is added in place of currency symbol test. > - Test 2 checks that a DFS maintains the exponent separator and currency symbol when read. -> Tests are added in place of them of them. > - Test 3 is unrelated to de serialization, and checks that the exponent separator symbol setter throws NPE. -> Test 3 is already covered by **SettersShouldThrowNPETest.java**. > > **SerializationLoad.java & SerializationSave.java** (D) > > - The save test depends on JDK 1.1.4, and is the code to write a DFS and DF. (It has no header and is not run.) The load test uses the saved 1.1.4 hex dump file to ensure the DFS and DF can be read, it did not check any specific invariants. > > **NumberRegression.java** (M) > > - Test4185761 and Test4069754 check NF/DF invariants and are ported to the dedicated serialization test file. This pull request has now been integrated. Changeset: 24a73493 Author: Justin Lu URL: https://git.openjdk.org/jdk/commit/24a734938e555882857cf0b06ea693ec6f18085f Stats: 940 lines in 13 files changed: 350 ins; 544 del; 46 mod 8366733: Re-examine older java.text NF, DF, and DFS serialization tests Reviewed-by: naoto ------------- PR: https://git.openjdk.org/jdk/pull/27108 From duke at openjdk.org Wed Sep 10 14:03:51 2025 From: duke at openjdk.org (Johannes Graham) Date: Wed, 10 Sep 2025 14:03:51 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList In-Reply-To: References: <0sMXM6BEv8KDpmDQs0BU4w9CWkcXAXX0mNY07fyMax4=.371452de-f5ee-4725-be95-b9b38981a6f5@github.com> Message-ID: On Fri, 5 Sep 2025 14:56:25 GMT, Raffaello Giulietti wrote: > Would you like me to reconsider their removals in my [draft PR](https://github.com/openjdk/jdk/pull/26990)? Yes, please. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27118#issuecomment-3258817438 From duke at openjdk.org Wed Sep 10 14:03:49 2025 From: duke at openjdk.org (Johannes Graham) Date: Wed, 10 Sep 2025 14:03:49 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList Message-ID: When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. ------------- Commit messages: - unneeded comment - extract fitsIntoLong method, cleanup test - Merge branch 'openjdk:master' into digitlist-double4 - remove unused import - add fast path in BigInteger.toString for values that fit into a long - add benchmark for BigDecimal formatting - avoid parsing Changes: https://git.openjdk.org/jdk/pull/27118/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27118&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8367324 Stats: 140 lines in 5 files changed: 51 ins; 72 del; 17 mod Patch: https://git.openjdk.org/jdk/pull/27118.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27118/head:pull/27118 PR: https://git.openjdk.org/jdk/pull/27118 From duke at openjdk.org Wed Sep 10 14:03:50 2025 From: duke at openjdk.org (Johannes Graham) Date: Wed, 10 Sep 2025 14:03:50 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList In-Reply-To: References: Message-ID: <0sMXM6BEv8KDpmDQs0BU4w9CWkcXAXX0mNY07fyMax4=.371452de-f5ee-4725-be95-b9b38981a6f5@github.com> On Fri, 5 Sep 2025 14:18:19 GMT, Johannes Graham wrote: > When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. > > This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. @rgiulietti This requires the use of the `getDigits` and `getDecimalExponent` methods in `FloatingDecimal`, which are proposed to be removed in https://github.com/openjdk/jdk/pull/26990 Benchmark results Aarch64 M4 Benchmark Mode Cnt Score Error Units -DefFormatterBench.testDefNumberFormatter thrpt 15 15612.853 ? 448.025 ops/ms -DefFormatterBench.testLargeBigDecDefNumberFormatter thrpt 15 4075.254 ? 58.170 ops/ms -DefFormatterBench.testSmallBigDecDefNumberFormatter thrpt 15 12467.137 ? 194.961 ops/ms +DefFormatterBench.testDefNumberFormatter thrpt 15 19196.464 ? 475.871 ops/ms +26% +DefFormatterBench.testLargeBigDecDefNumberFormatter thrpt 15 4981.756 ? 82.088 ops/ms +22% +DefFormatterBench.testSmallBigDecDefNumberFormatter thrpt 15 15936.774 ? 108.450 ops/ms +28% Finished running test 'micro:DefFormatterBench' This includes adding a fast-path in BigInteger.toString to help extract significant digits from a BigDecimal without a slowdown. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27118#issuecomment-3258587899 PR Comment: https://git.openjdk.org/jdk/pull/27118#issuecomment-3267017431 From rgiulietti at openjdk.org Wed Sep 10 14:03:50 2025 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Wed, 10 Sep 2025 14:03:50 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList In-Reply-To: <0sMXM6BEv8KDpmDQs0BU4w9CWkcXAXX0mNY07fyMax4=.371452de-f5ee-4725-be95-b9b38981a6f5@github.com> References: <0sMXM6BEv8KDpmDQs0BU4w9CWkcXAXX0mNY07fyMax4=.371452de-f5ee-4725-be95-b9b38981a6f5@github.com> Message-ID: On Fri, 5 Sep 2025 14:37:01 GMT, Johannes Graham wrote: >> When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. >> >> This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. > > @rgiulietti This requires the use of the `getDigits` and `getDecimalExponent` methods in `FloatingDecimal`, which are proposed to be removed in https://github.com/openjdk/jdk/pull/26990 @j3graham Yes, they are proposed to be removed since they are currently useless. Would you like me to reconsider their removals in my [draft PR](https://github.com/openjdk/jdk/pull/26990)? > Benchmark results Aarch64 M4 > > > Benchmark Mode Cnt Score Error Units > -DefFormatterBench.testDefNumberFormatter thrpt 15 15612.853 ? 448.025 ops/ms > -DefFormatterBench.testLargeBigDecDefNumberFormatter thrpt 15 4075.254 ? 58.170 ops/ms > -DefFormatterBench.testSmallBigDecDefNumberFormatter thrpt 15 12467.137 ? 194.961 ops/ms > +DefFormatterBench.testDefNumberFormatter thrpt 15 19196.464 ? 475.871 ops/ms +26% > +DefFormatterBench.testLargeBigDecDefNumberFormatter thrpt 15 4981.756 ? 82.088 ops/ms +22% > +DefFormatterBench.testSmallBigDecDefNumberFormatter thrpt 15 15936.774 ? 108.450 ops/ms +28% > Finished running test 'micro:DefFormatterBench' > > > This includes adding a fast-path in BigInteger.toString to help extract significant digits from a BigDecimal without a slowdown. @j3graham [JDK-8367324](https://bugs.openjdk.org/browse/JDK-8367324) ------------- PR Comment: https://git.openjdk.org/jdk/pull/27118#issuecomment-3258648900 PR Comment: https://git.openjdk.org/jdk/pull/27118#issuecomment-3274449176 From rgiulietti at openjdk.org Wed Sep 10 14:03:52 2025 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Wed, 10 Sep 2025 14:03:52 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList In-Reply-To: References: Message-ID: <5Ku3CBKFjTsVdN6wUbJE7DnD-Bbr-zxLUWDyi0rS_io=.ffc6e6fc-abcc-47ef-8d77-2689fd894d3e@github.com> On Fri, 5 Sep 2025 14:18:19 GMT, Johannes Graham wrote: > When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. > > This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. Please go ahead with your PR, regardless of mine. I'll reintroduce the removed code with the next commit, sometimes next week. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27118#issuecomment-3259150834 From jlu at openjdk.org Wed Sep 10 22:20:07 2025 From: jlu at openjdk.org (Justin Lu) Date: Wed, 10 Sep 2025 22:20:07 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList In-Reply-To: References: Message-ID: On Fri, 5 Sep 2025 14:18:19 GMT, Johannes Graham wrote: > When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. > > This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. On a first pass, the changes in `DigitList` look good to me: we utilize the `BigDecimal` to retrieve the exponent + unscaled value so that we don't need to re-parse the String representation to determine `decimalAt` and inflate `digits`. Thanks for this improvement which also simplifies and cleans up the code as well. I left some minor comments. src/java.base/share/classes/java/math/BigInteger.java line 4184: > 4182: > 4183: if (fitsIntoLong()) { > 4184: return Long.toString(longValue(), radix); We may want to consider separating this `BigInteger` fast path from this PR/change, since it is independent of the speedup in the `DigitList` changes. Others may not have a problem with it though, so maybe we can wait and see what they say. test/jdk/java/text/Format/DecimalFormat/CloneTest.java line 1: > 1: /* I know the JBS issue was not yet created when the PR was up, but now the Jtreg header needs 8367324 added to bug section. test/micro/org/openjdk/bench/java/text/DefFormatterBench.java line 1: > 1: /* Nit: Copyright year bump. test/micro/org/openjdk/bench/java/text/DefFormatterBench.java line 88: > 86: > 87: // This will create "small" BigDecimals where unscaled value fits in a long. > 88: BigDecimal bd = BigDecimal.valueOf(value); Can we separate the creation of the BD from the benchmark here and create these values in setup as well. test/micro/org/openjdk/bench/java/text/DefFormatterBench.java line 100: > 98: // of the toString value if the BigDecimal instance was reused. > 99: > 100: BigDecimal bd = new BigDecimal(value.unscaledValue(), value.scale()); If we use `@Setup(Level.Iteration)` on setup, I believe we can ensure a fresh `bdValues` for each benchmark iteration measurement. Then we can remove the BD recreation to not be included within the benchmark results which should give us more accurate results. ------------- PR Review: https://git.openjdk.org/jdk/pull/27118#pullrequestreview-3207801811 PR Review Comment: https://git.openjdk.org/jdk/pull/27118#discussion_r2337937683 PR Review Comment: https://git.openjdk.org/jdk/pull/27118#discussion_r2337894410 PR Review Comment: https://git.openjdk.org/jdk/pull/27118#discussion_r2337894989 PR Review Comment: https://git.openjdk.org/jdk/pull/27118#discussion_r2337905594 PR Review Comment: https://git.openjdk.org/jdk/pull/27118#discussion_r2337914280 From jlu at openjdk.org Wed Sep 10 22:37:23 2025 From: jlu at openjdk.org (Justin Lu) Date: Wed, 10 Sep 2025 22:37:23 GMT Subject: RFR: 8367271: Add parsing tests to DateFormat JMH benchmark Message-ID: <4SujcQv2h0DTIrI3hg1S3EQw7FOOHJJtwuOXdHhNsso=.caeef81d-581a-4efe-a0c2-ee4750656934@github.com> This PR expands the DateFormat benchmark with parsing cases (in addition to the existing formatting ones) such that performance regressions are easier to identify for parsing. Also adding in a time instance and respective measurement tests. The patterns used correspond to FULL Locale.ENGLISH patterns (w/ the NBSP replaced for time pattern for clarity sake). Further context in comment on JBS issue. ------------- Commit messages: - Isolate test data from formats - init Changes: https://git.openjdk.org/jdk/pull/27204/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27204&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8367271 Stats: 39 lines in 1 file changed: 34 ins; 2 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/27204.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27204/head:pull/27204 PR: https://git.openjdk.org/jdk/pull/27204 From naoto at openjdk.org Wed Sep 10 23:23:27 2025 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 10 Sep 2025 23:23:27 GMT Subject: RFR: 8367271: Add parsing tests to DateFormat JMH benchmark In-Reply-To: <4SujcQv2h0DTIrI3hg1S3EQw7FOOHJJtwuOXdHhNsso=.caeef81d-581a-4efe-a0c2-ee4750656934@github.com> References: <4SujcQv2h0DTIrI3hg1S3EQw7FOOHJJtwuOXdHhNsso=.caeef81d-581a-4efe-a0c2-ee4750656934@github.com> Message-ID: On Wed, 10 Sep 2025 22:20:22 GMT, Justin Lu wrote: > This PR expands the DateFormat benchmark with parsing cases (in addition to the existing formatting ones) such that performance regressions are easier to identify for parsing. Also adding in a time instance and respective measurement tests. The patterns used correspond to FULL Locale.ENGLISH patterns (w/ the NBSP replaced for time pattern for clarity sake). > > Further context in comment on JBS issue. Looks good. I'd suggest renaming the test case file, since this is now exclusively testing `SimpleDateFormat`, thus the test case name can be more specific. test/micro/org/openjdk/bench/java/text/DateFormatterBench.java line 61: > 59: > 60: private final String datePattern = "EEEE, MMMM d, y"; > 61: private final String timePattern = "h:mm:ss a zzzz"; Nit: These can be static fields (then the field names need to be all capital letters) ------------- PR Review: https://git.openjdk.org/jdk/pull/27204#pullrequestreview-3208139452 PR Review Comment: https://git.openjdk.org/jdk/pull/27204#discussion_r2338137214 From jlu at openjdk.org Wed Sep 10 23:37:15 2025 From: jlu at openjdk.org (Justin Lu) Date: Wed, 10 Sep 2025 23:37:15 GMT Subject: RFR: 8367271: Add parsing tests to DateFormat JMH benchmark [v2] In-Reply-To: <4SujcQv2h0DTIrI3hg1S3EQw7FOOHJJtwuOXdHhNsso=.caeef81d-581a-4efe-a0c2-ee4750656934@github.com> References: <4SujcQv2h0DTIrI3hg1S3EQw7FOOHJJtwuOXdHhNsso=.caeef81d-581a-4efe-a0c2-ee4750656934@github.com> Message-ID: > This PR expands the DateFormat benchmark with parsing cases (in addition to the existing formatting ones) such that performance regressions are easier to identify for parsing. Also adding in a time instance and respective measurement tests. The patterns used correspond to FULL Locale.ENGLISH patterns (w/ the NBSP replaced for time pattern for clarity sake). > > Further context in comment on JBS issue. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Implement Naoto's suggestions ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27204/files - new: https://git.openjdk.org/jdk/pull/27204/files/2bdfbbc3..54e1036f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27204&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27204&range=00-01 Stats: 222 lines in 2 files changed: 111 ins; 111 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/27204.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27204/head:pull/27204 PR: https://git.openjdk.org/jdk/pull/27204 From duke at openjdk.org Wed Sep 10 23:47:47 2025 From: duke at openjdk.org (Johannes Graham) Date: Wed, 10 Sep 2025 23:47:47 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v2] In-Reply-To: References: Message-ID: <_ZwF0CJ0mY-x-ie19mhkUiTnLlBlDBG6-zCzKaLfbyU=.e8f9d819-d67b-4b31-b19c-3369c69da5ef@github.com> > When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. > > This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. Johannes Graham has updated the pull request incrementally with two additional commits since the last revision: - use Level.Invocation - review fixes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27118/files - new: https://git.openjdk.org/jdk/pull/27118/files/1475d3aa..6865fe6a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27118&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27118&range=00-01 Stats: 24 lines in 2 files changed: 5 ins; 10 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/27118.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27118/head:pull/27118 PR: https://git.openjdk.org/jdk/pull/27118 From duke at openjdk.org Wed Sep 10 23:47:48 2025 From: duke at openjdk.org (Johannes Graham) Date: Wed, 10 Sep 2025 23:47:48 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v2] In-Reply-To: References: Message-ID: <4o0n8l-Z-L0aNi6L6UIhrOzNEUscfSjMPryqjvRydfk=.8fb366e0-4081-4d4d-a0a9-fc1e70e86617@github.com> On Wed, 10 Sep 2025 21:06:53 GMT, Justin Lu wrote: >> Johannes Graham has updated the pull request incrementally with two additional commits since the last revision: >> >> - use Level.Invocation >> - review fixes > > test/micro/org/openjdk/bench/java/text/DefFormatterBench.java line 100: > >> 98: // of the toString value if the BigDecimal instance was reused. >> 99: >> 100: BigDecimal bd = new BigDecimal(value.unscaledValue(), value.scale()); > > If we use `@Setup(Level.Iteration)` on setup, I believe we can ensure a fresh `bdValues` for each benchmark iteration measurement. Then we can remove the BD recreation to not be included within the benchmark results which should give us more accurate results. Looks like `Level.Invocation` is the one I want. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27118#discussion_r2338174523 From duke at openjdk.org Wed Sep 10 23:57:21 2025 From: duke at openjdk.org (Johannes Graham) Date: Wed, 10 Sep 2025 23:57:21 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v2] In-Reply-To: References: Message-ID: <9fwe7YcFQM19gM4JMrH92REwpKxbdVjChQGZdkgjPk8=.3fc0b5d0-7248-4fc8-8a47-7ad692073076@github.com> On Wed, 10 Sep 2025 21:19:32 GMT, Justin Lu wrote: >> Johannes Graham has updated the pull request incrementally with two additional commits since the last revision: >> >> - use Level.Invocation >> - review fixes > > src/java.base/share/classes/java/math/BigInteger.java line 4184: > >> 4182: >> 4183: if (fitsIntoLong()) { >> 4184: return Long.toString(longValue(), radix); > > We may want to consider separating this `BigInteger` fast path from this PR/change, since it is independent of the speedup in the `DigitList` changes. Others may not have a problem with it though, so maybe we can wait and see what they say. Without the fast-path, there was a performance drop with the "small" BigDecimals (from memory about 10%). That's what drove me to tinker with `BigInteger.toString`. But if this one can stand on its own, despite the perf drop, I'm happy to separate out the BigInteger part. I'll generate some new perf numbers after the Level.Invocation fix. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27118#discussion_r2338186267 From duke at openjdk.org Thu Sep 11 14:42:07 2025 From: duke at openjdk.org (Johannes Graham) Date: Thu, 11 Sep 2025 14:42:07 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v2] In-Reply-To: <_ZwF0CJ0mY-x-ie19mhkUiTnLlBlDBG6-zCzKaLfbyU=.e8f9d819-d67b-4b31-b19c-3369c69da5ef@github.com> References: <_ZwF0CJ0mY-x-ie19mhkUiTnLlBlDBG6-zCzKaLfbyU=.e8f9d819-d67b-4b31-b19c-3369c69da5ef@github.com> Message-ID: On Wed, 10 Sep 2025 23:47:47 GMT, Johannes Graham wrote: >> When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. >> >> This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. > > Johannes Graham has updated the pull request incrementally with two additional commits since the last revision: > > - use Level.Invocation > - review fixes Updated Benchmark numbers using `@Setup(Level.Invocation)` Baseline Benchmark Mode Cnt Score Error Units DefFormatterBench.testDefNumberFormatter thrpt 15 14493.498 ? 240.094 ops/ms DefFormatterBench.testLargeBigDecDefNumberFormatter thrpt 15 3680.037 ? 90.755 ops/ms DefFormatterBench.testSmallBigDecDefNumberFormatter thrpt 15 18270.715 ? 666.360 ops/ms This PR without BigInteger fast-path Benchmark Mode Cnt Score Error Units DefFormatterBench.testDefNumberFormatter thrpt 15 18463.554 ? 540.881 ops/ms +27% DefFormatterBench.testLargeBigDecDefNumberFormatter thrpt 15 4416.749 ? 81.965 ops/ms +20% DefFormatterBench.testSmallBigDecDefNumberFormatter thrpt 15 14829.697 ? 235.140 ops/ms -18% This PR with fast-path Benchmark Mode Cnt Score Error Units DefFormatterBench.testDefNumberFormatter thrpt 15 18926.301 ? 346.970 ops/ms +30% DefFormatterBench.testLargeBigDecDefNumberFormatter thrpt 15 4511.169 ? 65.314 ops/ms +23% DefFormatterBench.testSmallBigDecDefNumberFormatter thrpt 15 25409.301 ? 630.107 ops/ms +39% ------------- PR Comment: https://git.openjdk.org/jdk/pull/27118#issuecomment-3281137706 From naoto at openjdk.org Thu Sep 11 16:08:24 2025 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 11 Sep 2025 16:08:24 GMT Subject: RFR: 8367271: Add parsing tests to DateFormat JMH benchmark [v2] In-Reply-To: References: <4SujcQv2h0DTIrI3hg1S3EQw7FOOHJJtwuOXdHhNsso=.caeef81d-581a-4efe-a0c2-ee4750656934@github.com> Message-ID: <1rnwSq01QF5bHugUvtX7_4Jh9Xl7Gb1CvcB8YbryaXA=.0d162e99-a2b4-4e7d-8b7d-c38b6de785a6@github.com> On Wed, 10 Sep 2025 23:37:15 GMT, Justin Lu wrote: >> This PR expands the DateFormat benchmark with parsing cases (in addition to the existing formatting ones) such that performance regressions are easier to identify for parsing. Also adding in a time instance and respective measurement tests. The patterns used correspond to FULL Locale.ENGLISH patterns (w/ the NBSP replaced for time pattern for clarity sake). >> >> Further context in comment on JBS issue. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Implement Naoto's suggestions Marked as reviewed by naoto (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27204#pullrequestreview-3212567735 From jlu at openjdk.org Thu Sep 11 21:34:26 2025 From: jlu at openjdk.org (Justin Lu) Date: Thu, 11 Sep 2025 21:34:26 GMT Subject: RFR: 8367237: Thread-Safety Usage Warning for java.text.Collator Classes [v2] In-Reply-To: References: <57DZjU9LPd8-B8c6m-Bgl_yypDzdfZU7J7DkJ-oSWc4=.59865341-ee4c-4af0-9d0a-a76953920101@github.com> Message-ID: On Thu, 11 Sep 2025 20:14:56 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional commit since the last revision: >> >> Doc updates reflecting Naoto's comments > > src/java.base/share/classes/java/text/Collator.java line 117: > >> 115: * >> 116: * @implNote Concurrent usage of {@code Collator} instances returned by the factory >> 117: * methods under the standard provider may lead to significant thread contention. > > "under the standard provider" may not be clear enough. How about "instances returned from the JDK's built-in implementation, `RuleBasedCollator`" or similar? OK, let me know what you think about the new wording. I want to emphasize that the factory methods (under the default provider) return such instances. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27233#discussion_r2342382050 From jlu at openjdk.org Thu Sep 11 21:34:24 2025 From: jlu at openjdk.org (Justin Lu) Date: Thu, 11 Sep 2025 21:34:24 GMT Subject: RFR: 8367237: Thread-Safety Usage Warning for java.text.Collator Classes [v2] In-Reply-To: <57DZjU9LPd8-B8c6m-Bgl_yypDzdfZU7J7DkJ-oSWc4=.59865341-ee4c-4af0-9d0a-a76953920101@github.com> References: <57DZjU9LPd8-B8c6m-Bgl_yypDzdfZU7J7DkJ-oSWc4=.59865341-ee4c-4af0-9d0a-a76953920101@github.com> Message-ID: > Please review this PR which is a documentation change to make apparent the recommended approach for using Collator & RuleBasedCollator in a multi threaded environment via an implNote. The original issue and CSR have additional context. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Doc updates reflecting Naoto's comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27233/files - new: https://git.openjdk.org/jdk/pull/27233/files/d15faad4..5fab9652 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27233&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27233&range=00-01 Stats: 8 lines in 2 files changed: 1 ins; 0 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/27233.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27233/head:pull/27233 PR: https://git.openjdk.org/jdk/pull/27233 From iris at openjdk.org Thu Sep 11 22:29:12 2025 From: iris at openjdk.org (Iris Clark) Date: Thu, 11 Sep 2025 22:29:12 GMT Subject: RFR: 8367237: Thread-Safety Usage Warning for java.text.Collator Classes [v2] In-Reply-To: References: <57DZjU9LPd8-B8c6m-Bgl_yypDzdfZU7J7DkJ-oSWc4=.59865341-ee4c-4af0-9d0a-a76953920101@github.com> Message-ID: <4WfvopCFGs8eBtBfMLEoqbPM-KsF7YHaqrIIlLlRIUo=.66ca0d19-9feb-4e93-8f67-f11669c17018@github.com> On Thu, 11 Sep 2025 21:34:24 GMT, Justin Lu wrote: >> Please review this PR which is a documentation change to make apparent the recommended approach for using Collator & RuleBasedCollator in a multi threaded environment via an implNote. The original issue and CSR have additional context. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Doc updates reflecting Naoto's comments This looks good. My only recommendation would be to change "JDK reference implementation" to "JDK Reference Implementation" (capitalize) following the prevalent convention in java.base. ------------- Marked as reviewed by iris (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27233#pullrequestreview-3213810594 From jlu at openjdk.org Thu Sep 11 22:36:28 2025 From: jlu at openjdk.org (Justin Lu) Date: Thu, 11 Sep 2025 22:36:28 GMT Subject: RFR: 8367237: Thread-Safety Usage Warning for java.text.Collator Classes [v3] In-Reply-To: <57DZjU9LPd8-B8c6m-Bgl_yypDzdfZU7J7DkJ-oSWc4=.59865341-ee4c-4af0-9d0a-a76953920101@github.com> References: <57DZjU9LPd8-B8c6m-Bgl_yypDzdfZU7J7DkJ-oSWc4=.59865341-ee4c-4af0-9d0a-a76953920101@github.com> Message-ID: > Please review this PR which is a documentation change to make apparent the recommended approach for using Collator & RuleBasedCollator in a multi threaded environment via an implNote. The original issue and CSR have additional context. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Reflect Iris's comments: capitalize JDK RI ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27233/files - new: https://git.openjdk.org/jdk/pull/27233/files/5fab9652..d8c361f6 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27233&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27233&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/27233.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27233/head:pull/27233 PR: https://git.openjdk.org/jdk/pull/27233 From naoto at openjdk.org Thu Sep 11 23:03:12 2025 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 11 Sep 2025 23:03:12 GMT Subject: RFR: 8367237: Thread-Safety Usage Warning for java.text.Collator Classes [v3] In-Reply-To: References: <57DZjU9LPd8-B8c6m-Bgl_yypDzdfZU7J7DkJ-oSWc4=.59865341-ee4c-4af0-9d0a-a76953920101@github.com> Message-ID: <7FGV1vE8Io0vmHqBlrKFIii1eT25Qh8jaeF7-boUz9Y=.a89593f5-58ec-45b6-b23a-de9262c709f0@github.com> On Thu, 11 Sep 2025 22:36:28 GMT, Justin Lu wrote: >> Please review this PR which is a documentation change to make apparent the recommended approach for using Collator & RuleBasedCollator in a multi threaded environment via an implNote. The original issue and CSR have additional context. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Reflect Iris's comments: capitalize JDK RI Both this PR and the CSR LGTM ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27233#pullrequestreview-3213915560 From iris at openjdk.org Thu Sep 11 23:09:14 2025 From: iris at openjdk.org (Iris Clark) Date: Thu, 11 Sep 2025 23:09:14 GMT Subject: RFR: 8367237: Thread-Safety Usage Warning for java.text.Collator Classes [v3] In-Reply-To: References: <57DZjU9LPd8-B8c6m-Bgl_yypDzdfZU7J7DkJ-oSWc4=.59865341-ee4c-4af0-9d0a-a76953920101@github.com> Message-ID: On Thu, 11 Sep 2025 22:36:28 GMT, Justin Lu wrote: >> Please review this PR which is a documentation change to make apparent the recommended approach for using Collator & RuleBasedCollator in a multi threaded environment via an implNote. The original issue and CSR have additional context. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Reflect Iris's comments: capitalize JDK RI Marked as reviewed by iris (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27233#pullrequestreview-3213953607 From jlu at openjdk.org Fri Sep 12 16:34:40 2025 From: jlu at openjdk.org (Justin Lu) Date: Fri, 12 Sep 2025 16:34:40 GMT Subject: Integrated: 8367271: Add parsing tests to DateFormat JMH benchmark In-Reply-To: <4SujcQv2h0DTIrI3hg1S3EQw7FOOHJJtwuOXdHhNsso=.caeef81d-581a-4efe-a0c2-ee4750656934@github.com> References: <4SujcQv2h0DTIrI3hg1S3EQw7FOOHJJtwuOXdHhNsso=.caeef81d-581a-4efe-a0c2-ee4750656934@github.com> Message-ID: On Wed, 10 Sep 2025 22:20:22 GMT, Justin Lu wrote: > This PR expands the DateFormat benchmark with parsing cases (in addition to the existing formatting ones) such that performance regressions are easier to identify for parsing. Also adding in a time instance and respective measurement tests. The patterns used correspond to FULL Locale.ENGLISH patterns (w/ the NBSP replaced for time pattern for clarity sake). > > Further context in comment on JBS issue. This pull request has now been integrated. Changeset: aeffce7c Author: Justin Lu URL: https://git.openjdk.org/jdk/commit/aeffce7c22cbefe9c493865ee38d025032629901 Stats: 190 lines in 2 files changed: 111 ins; 79 del; 0 mod 8367271: Add parsing tests to DateFormat JMH benchmark Reviewed-by: naoto ------------- PR: https://git.openjdk.org/jdk/pull/27204 From jlu at openjdk.org Fri Sep 12 21:13:16 2025 From: jlu at openjdk.org (Justin Lu) Date: Fri, 12 Sep 2025 21:13:16 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v2] In-Reply-To: <9fwe7YcFQM19gM4JMrH92REwpKxbdVjChQGZdkgjPk8=.3fc0b5d0-7248-4fc8-8a47-7ad692073076@github.com> References: <9fwe7YcFQM19gM4JMrH92REwpKxbdVjChQGZdkgjPk8=.3fc0b5d0-7248-4fc8-8a47-7ad692073076@github.com> Message-ID: On Wed, 10 Sep 2025 23:54:31 GMT, Johannes Graham wrote: >> src/java.base/share/classes/java/math/BigInteger.java line 4184: >> >>> 4182: >>> 4183: if (fitsIntoLong()) { >>> 4184: return Long.toString(longValue(), radix); >> >> We may want to consider separating this `BigInteger` fast path from this PR/change, since it is independent of the speedup in the `DigitList` changes. Others may not have a problem with it though, so maybe we can wait and see what they say. > > Without the fast-path, there was a performance drop with the "small" BigDecimals (from memory about 10%). That's what drove me to tinker with `BigInteger.toString`. But if this one can stand on its own, despite the perf drop, I'm happy to separate out the BigInteger part. I'll generate some new perf numbers after the Level.Invocation fix. OK understood. I think we would only want to go through with this PR if we could avoid that perf regression in the _DefFormatterBench.testSmallBigDecDefNumberFormatter_ case. So either including this BI fast path as part of this change, or (if there are scope concerns), making a separate change for it first and making this PR dependent on it seems reasonable to me. It would be good to get @rgiulietti's opinion on this. I think it would also be good to include the _java.math.BigIntegers_ results since this change directly impacts those results as well. (Which look to have sizeable improvements for _BigIntegers.testSmallToString_ and _BigIntegers.testLargeToString_.) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27118#discussion_r2345424936 From jlu at openjdk.org Fri Sep 12 21:13:19 2025 From: jlu at openjdk.org (Justin Lu) Date: Fri, 12 Sep 2025 21:13:19 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v2] In-Reply-To: <_ZwF0CJ0mY-x-ie19mhkUiTnLlBlDBG6-zCzKaLfbyU=.e8f9d819-d67b-4b31-b19c-3369c69da5ef@github.com> References: <_ZwF0CJ0mY-x-ie19mhkUiTnLlBlDBG6-zCzKaLfbyU=.e8f9d819-d67b-4b31-b19c-3369c69da5ef@github.com> Message-ID: On Wed, 10 Sep 2025 23:47:47 GMT, Johannes Graham wrote: >> When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. >> >> This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. > > Johannes Graham has updated the pull request incrementally with two additional commits since the last revision: > > - use Level.Invocation > - review fixes test/micro/org/openjdk/bench/java/text/DefFormatterBench.java line 86: > 84: > 85: @Benchmark > 86: @OperationsPerInvocation(13) Now that we are reusing 13 multiple times, we can replace such occurrences with a constant. `VALUES_SIZE`? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27118#discussion_r2345116810 From duke at openjdk.org Fri Sep 12 22:44:54 2025 From: duke at openjdk.org (Johannes Graham) Date: Fri, 12 Sep 2025 22:44:54 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v3] In-Reply-To: References: Message-ID: <88vSo4iHwx47hKJ2whkClMWAP5xunklbIH2StcsGTlM=.83f9e6aa-ecaf-4455-86c2-7b6c8f370517@github.com> > When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. > > This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: VALUES_SIZE ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27118/files - new: https://git.openjdk.org/jdk/pull/27118/files/6865fe6a..47eb0a89 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27118&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27118&range=01-02 Stats: 4 lines in 1 file changed: 1 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/27118.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27118/head:pull/27118 PR: https://git.openjdk.org/jdk/pull/27118 From duke at openjdk.org Fri Sep 12 23:01:17 2025 From: duke at openjdk.org (Johannes Graham) Date: Fri, 12 Sep 2025 23:01:17 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v3] In-Reply-To: <88vSo4iHwx47hKJ2whkClMWAP5xunklbIH2StcsGTlM=.83f9e6aa-ecaf-4455-86c2-7b6c8f370517@github.com> References: <88vSo4iHwx47hKJ2whkClMWAP5xunklbIH2StcsGTlM=.83f9e6aa-ecaf-4455-86c2-7b6c8f370517@github.com> Message-ID: On Fri, 12 Sep 2025 22:44:54 GMT, Johannes Graham wrote: >> When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. >> >> This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. > > Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: > > VALUES_SIZE BigIntegers benchmark Baseline Benchmark Mode Cnt Score Error Units BigIntegers.testHugeToString avgt 15 96.249 ? 3.766 ns/op BigIntegers.testLargeToString avgt 15 19.919 ? 0.532 ns/op BigIntegers.testSmallToString avgt 15 28.000 ? 1.132 ns/op This PR (fast-path in BigInteger.toString) BigIntegers.testHugeToString avgt 15 95.965 ? 1.563 ns/op BigIntegers.testLargeToString avgt 15 7.701 ? 0.083 ns/op BigIntegers.testSmallToString avgt 15 7.027 ? 0.380 ns/op ------------- PR Comment: https://git.openjdk.org/jdk/pull/27118#issuecomment-3287050561 From swen at openjdk.org Sun Sep 14 04:59:18 2025 From: swen at openjdk.org (Shaojin Wen) Date: Sun, 14 Sep 2025 04:59:18 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v3] In-Reply-To: <88vSo4iHwx47hKJ2whkClMWAP5xunklbIH2StcsGTlM=.83f9e6aa-ecaf-4455-86c2-7b6c8f370517@github.com> References: <88vSo4iHwx47hKJ2whkClMWAP5xunklbIH2StcsGTlM=.83f9e6aa-ecaf-4455-86c2-7b6c8f370517@github.com> Message-ID: On Fri, 12 Sep 2025 22:44:54 GMT, Johannes Graham wrote: >> When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. >> >> This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. > > Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: > > VALUES_SIZE src/java.base/share/classes/java/text/DigitList.java line 732: > 730: > 731: // The digit part of -9223372036854775808L > 732: private static final byte[] LONG_MIN_REP = "9223372036854775808".getBytes(StandardCharsets.ISO_8859_1); add `@Stable` here ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27118#discussion_r2347120493 From jlu at openjdk.org Mon Sep 15 21:10:16 2025 From: jlu at openjdk.org (Justin Lu) Date: Mon, 15 Sep 2025 21:10:16 GMT Subject: RFR: 8367237: Thread-Safety Usage Warning for java.text.Collator Classes [v3] In-Reply-To: References: <57DZjU9LPd8-B8c6m-Bgl_yypDzdfZU7J7DkJ-oSWc4=.59865341-ee4c-4af0-9d0a-a76953920101@github.com> Message-ID: On Thu, 11 Sep 2025 22:36:28 GMT, Justin Lu wrote: >> Please review this PR which is a documentation change to make apparent the recommended approach for using Collator & RuleBasedCollator in a multi threaded environment via an implNote. The original issue and CSR have additional context. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Reflect Iris's comments: capitalize JDK RI Thank you for the reviews. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27233#issuecomment-3293958996 From jlu at openjdk.org Mon Sep 15 21:14:21 2025 From: jlu at openjdk.org (Justin Lu) Date: Mon, 15 Sep 2025 21:14:21 GMT Subject: Integrated: 8367237: Thread-Safety Usage Warning for java.text.Collator Classes In-Reply-To: <57DZjU9LPd8-B8c6m-Bgl_yypDzdfZU7J7DkJ-oSWc4=.59865341-ee4c-4af0-9d0a-a76953920101@github.com> References: <57DZjU9LPd8-B8c6m-Bgl_yypDzdfZU7J7DkJ-oSWc4=.59865341-ee4c-4af0-9d0a-a76953920101@github.com> Message-ID: On Thu, 11 Sep 2025 18:58:46 GMT, Justin Lu wrote: > Please review this PR which is a documentation change to make apparent the recommended approach for using Collator & RuleBasedCollator in a multi threaded environment via an implNote. The original issue and CSR have additional context. This pull request has now been integrated. Changeset: 64155dfa Author: Justin Lu URL: https://git.openjdk.org/jdk/commit/64155dfac068cf01bcab6adb401b360499f33a5f Stats: 17 lines in 2 files changed: 10 ins; 4 del; 3 mod 8367237: Thread-Safety Usage Warning for java.text.Collator Classes Reviewed-by: iris, naoto ------------- PR: https://git.openjdk.org/jdk/pull/27233 From jlu at openjdk.org Mon Sep 15 21:25:00 2025 From: jlu at openjdk.org (Justin Lu) Date: Mon, 15 Sep 2025 21:25:00 GMT Subject: RFR: 8367703: Unneeded cast in java.text.DigitList.append Message-ID: <15UI-L234zW8DE6t_5jkhDrViTIGGlsb5dqT5lzkoys=.c2d06cd5-3d11-4c10-bcde-a490b4b218a7@github.com> During parse routines, DecimalFormat uses DigitList to append digits from the parsed text. Note that `digit` is always the int value 0 through 9 (and subsequently the code point 48 through 57) when passed to `append`. Currently, `append` accepts a char which forces an int -> char -> byte conversion to be stored in `digits`. This can be simplified to int -> byte if the parameter type for the method is updated. The two call sites can safely make this swap. Tiers 1-3 and java.text JCK tests continue to pass with this change. ------------- Commit messages: - init Changes: https://git.openjdk.org/jdk/pull/27300/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27300&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8367703 Stats: 4 lines in 2 files changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/27300.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27300/head:pull/27300 PR: https://git.openjdk.org/jdk/pull/27300 From rriggs at openjdk.org Mon Sep 15 21:47:11 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 15 Sep 2025 21:47:11 GMT Subject: RFR: 8367703: Unneeded cast in java.text.DigitList.append In-Reply-To: <15UI-L234zW8DE6t_5jkhDrViTIGGlsb5dqT5lzkoys=.c2d06cd5-3d11-4c10-bcde-a490b4b218a7@github.com> References: <15UI-L234zW8DE6t_5jkhDrViTIGGlsb5dqT5lzkoys=.c2d06cd5-3d11-4c10-bcde-a490b4b218a7@github.com> Message-ID: On Mon, 15 Sep 2025 21:18:12 GMT, Justin Lu wrote: > During parse routines, DecimalFormat uses DigitList to append digits from the parsed text. > > Note that `digit` is always the int value 0 through 9 (and subsequently the code point 48 through 57) when passed to `append`. > > Currently, `append` accepts a char which forces an int -> char -> byte conversion to be stored in `digits`. This can be simplified to int -> byte if the parameter type for the method is updated. The two call sites can safely make this swap. > > Tiers 1-3 and java.text JCK tests continue to pass with this change. Is there any observable/measureable performance difference? The byte type is a bit of a hack, while char is semantically more precise. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27300#issuecomment-3294063823 From prappo at openjdk.org Mon Sep 15 22:02:44 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Mon, 15 Sep 2025 22:02:44 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** Message-ID: Please review this documentation-only change, which I believe does **NOT** require CSR. The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: * used a comma separator for some big integer values, to improve readability; * fixed a few typos and grammar. While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) Are there any cases here where that distinction matters? * In many cases, the following phrase is used throughout documentation: > positive or negative While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". --------- ### Progress - [ ] Change must be properly reviewed (1 review required, with at least 1 [Reviewer](https://openjdk.org/bylaws#reviewer)) - [x] Change must not contain extraneous whitespace - [x] Commit message must refer to an issue ### Reviewing
Using git Checkout this PR locally: \ `$ git fetch https://git.openjdk.org/jdk.git pull/27296/head:pull/27296` \ `$ git checkout pull/27296` Update a local copy of the PR: \ `$ git checkout pull/27296` \ `$ git pull https://git.openjdk.org/jdk.git pull/27296/head`
Using Skara CLI tools Checkout this PR locally: \ `$ git pr checkout 27296` View PR using the GUI difftool: \ `$ git pr show -t 27296`
Using diff file Download this PR as a diff file: \ https://git.openjdk.org/jdk/pull/27296.diff
------------- Commit messages: - Use comma as a decimal separator - Fix Duration.abs - Initial commit Changes: https://git.openjdk.org/jdk/pull/27296/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27296&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8367704 Stats: 26 lines in 6 files changed: 0 ins; 0 del; 26 mod Patch: https://git.openjdk.org/jdk/pull/27296.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27296/head:pull/27296 PR: https://git.openjdk.org/jdk/pull/27296 From prappo at openjdk.org Mon Sep 15 22:31:28 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Mon, 15 Sep 2025 22:31:28 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v2] In-Reply-To: References: Message-ID: > Please review this documentation-only change, which I believe does **NOT** require CSR. > > The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: > > * used a comma separator for some big integer values, to improve readability; > * fixed a few typos and grammar. > > While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. > > * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? > > Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) > > Are there any cases here where that distinction matters? > > * In many cases, the following phrase is used throughout documentation: > > > positive or negative > > While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? > > * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". > --------- > ### Progress > - [ ] Change must be properly reviewed (1 review required, with at least 1 [Reviewer](https://openjdk.org/bylaws#reviewer)) > - [x] Change must not contain extraneous whitespace > - [x] Commit message must refer to an issue > > > > ### Reviewing >
Using git > > Checkout this PR locally: \ > `$ git fetch https://git.openjdk.org/jdk.git pull/27296/head:pull/27296` \ > `$ git checkout pull/27296` > > Update a local copy of the PR: \ > `$ git checkout pull/27296` \ > `$ git pull https://git.openjdk.org/jdk.git pull/27296/head` > >
>
Using Skara CLI tools > > Checkout this PR locally: \ > `$ git pr checkout 27296` > > View PR using the GUI difftool: \ > `$ git pr show -t 27296` > >
>
Using diff file > > Download this PR as a diff file: \ > https://git.openjdk.org/jdk/pull/27296.diff > >
Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: Extra typos and decimal separator ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27296/files - new: https://git.openjdk.org/jdk/pull/27296/files/540e48e1..4d8aadf8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27296&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27296&range=00-01 Stats: 9 lines in 4 files changed: 0 ins; 0 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/27296.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27296/head:pull/27296 PR: https://git.openjdk.org/jdk/pull/27296 From jlu at openjdk.org Mon Sep 15 22:39:12 2025 From: jlu at openjdk.org (Justin Lu) Date: Mon, 15 Sep 2025 22:39:12 GMT Subject: RFR: 8367703: Unneeded cast in java.text.DigitList.append In-Reply-To: References: <15UI-L234zW8DE6t_5jkhDrViTIGGlsb5dqT5lzkoys=.c2d06cd5-3d11-4c10-bcde-a490b4b218a7@github.com> Message-ID: On Mon, 15 Sep 2025 21:44:35 GMT, Roger Riggs wrote: > Is there any observable/measureable performance difference? The byte type is a bit of a hack, while char is semantically more precise. There is negligible performance impact. I filed this change not for performance, but rather simplifying the code path for readability because in the domain of DigitList, `digits` is a byte array and always composed of code points 48 to 57. With this context, passing it directly as a byte avoided an extra level of conversion and should be reasonable to the reader. In general, I understand the result of `(digit + '0')` as a char is semantically more precise; I can withdraw this PR if you think it hurts readability (since the goal is the opposite of that). ------------- PR Comment: https://git.openjdk.org/jdk/pull/27300#issuecomment-3294205443 From prappo at openjdk.org Tue Sep 16 16:10:44 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Tue, 16 Sep 2025 16:10:44 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v3] In-Reply-To: References: Message-ID: <8II7NdKUskPi_iiXwRaHLWXJoRnLNBh7E-rbG-vddj0=.531edce5-2d51-4db6-9072-496a36ef3241@github.com> > Please review this documentation-only change, which I believe does **NOT** require CSR. > > The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: > > * used a comma separator for some big integer values, to improve readability; > * fixed a few typos and grammar. > > While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. > > * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? > > Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) > > Are there any cases here where that distinction matters? > > * In many cases, the following phrase is used throughout documentation: > > > positive or negative > > While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? > > * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: A few more typos ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27296/files - new: https://git.openjdk.org/jdk/pull/27296/files/4d8aadf8..e58c5a4c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27296&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27296&range=01-02 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/27296.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27296/head:pull/27296 PR: https://git.openjdk.org/jdk/pull/27296 From naoto at openjdk.org Tue Sep 16 16:21:17 2025 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 16 Sep 2025 16:21:17 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v3] In-Reply-To: <8II7NdKUskPi_iiXwRaHLWXJoRnLNBh7E-rbG-vddj0=.531edce5-2d51-4db6-9072-496a36ef3241@github.com> References: <8II7NdKUskPi_iiXwRaHLWXJoRnLNBh7E-rbG-vddj0=.531edce5-2d51-4db6-9072-496a36ef3241@github.com> Message-ID: On Tue, 16 Sep 2025 16:10:44 GMT, Pavel Rappo wrote: >> Please review this documentation-only change, which I believe does **NOT** require CSR. >> >> The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: >> >> * used a comma separator for some big integer values, to improve readability; >> * fixed a few typos and grammar. >> >> While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. >> >> * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? >> >> Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) >> >> Are there any cases here where that distinction matters? >> >> * In many cases, the following phrase is used throughout documentation: >> >> > positive or negative >> >> While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? >> >> * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". > > Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: > > A few more typos LGTM. Some files need copyright bumps. As to "positive or negative", isn't zero signed in IEEE 754? ------------- PR Review: https://git.openjdk.org/jdk/pull/27296#pullrequestreview-3230759025 From prappo at openjdk.org Tue Sep 16 16:29:21 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Tue, 16 Sep 2025 16:29:21 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v3] In-Reply-To: <8II7NdKUskPi_iiXwRaHLWXJoRnLNBh7E-rbG-vddj0=.531edce5-2d51-4db6-9072-496a36ef3241@github.com> References: <8II7NdKUskPi_iiXwRaHLWXJoRnLNBh7E-rbG-vddj0=.531edce5-2d51-4db6-9072-496a36ef3241@github.com> Message-ID: On Tue, 16 Sep 2025 16:10:44 GMT, Pavel Rappo wrote: >> Please review this documentation-only change, which I believe does **NOT** require CSR. >> >> The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: >> >> * used a comma separator for some big integer values, to improve readability; >> * fixed a few typos and grammar. >> >> While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. >> >> * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? >> >> Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) >> >> Are there any cases here where that distinction matters? >> >> * In many cases, the following phrase is used throughout documentation: >> >> > positive or negative >> >> While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? >> >> * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". > > Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: > > A few more typos Thanks. > As to "positive or negative", isn't zero signed in IEEE 754? I might be missing something, but what does IEEE 754 have to do with this? ------------- PR Comment: https://git.openjdk.org/jdk/pull/27296#issuecomment-3299509569 From prappo at openjdk.org Tue Sep 16 16:39:03 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Tue, 16 Sep 2025 16:39:03 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v4] In-Reply-To: References: Message-ID: > Please review this documentation-only change, which I believe does **NOT** require CSR. > > The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: > > * used a comma separator for some big integer values, to improve readability; > * fixed a few typos and grammar. > > While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. > > * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? > > Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) > > Are there any cases here where that distinction matters? > > * In many cases, the following phrase is used throughout documentation: > > > positive or negative > > While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? > > * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: Update copyright years Note: any commit hashes below might be outdated due to subsequent history rewriting (e.g. git rebase). + update src/java.base/share/classes/java/time/package-info.java due to e58c5a4c023 + update src/java.base/share/classes/java/time/temporal/ChronoField.java due to 4d8aadf8754 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27296/files - new: https://git.openjdk.org/jdk/pull/27296/files/e58c5a4c..d8510639 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27296&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27296&range=02-03 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/27296.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27296/head:pull/27296 PR: https://git.openjdk.org/jdk/pull/27296 From prappo at openjdk.org Tue Sep 16 16:46:11 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Tue, 16 Sep 2025 16:46:11 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v5] In-Reply-To: References: Message-ID: > Please review this documentation-only change, which I believe does **NOT** require CSR. > > The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: > > * used a comma separator for some big integer values, to improve readability; > * fixed a few typos and grammar. > > While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. > > * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? > > Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) > > Are there any cases here where that distinction matters? > > * In many cases, the following phrase is used throughout documentation: > > > positive or negative > > While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? > > * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: Update src/java.base/share/classes/java/time/temporal/ChronoField.java Co-authored-by: Justin Lu ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27296/files - new: https://git.openjdk.org/jdk/pull/27296/files/d8510639..a9bd5cef Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27296&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27296&range=03-04 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/27296.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27296/head:pull/27296 PR: https://git.openjdk.org/jdk/pull/27296 From jlu at openjdk.org Tue Sep 16 16:46:15 2025 From: jlu at openjdk.org (Justin Lu) Date: Tue, 16 Sep 2025 16:46:15 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v3] In-Reply-To: <8II7NdKUskPi_iiXwRaHLWXJoRnLNBh7E-rbG-vddj0=.531edce5-2d51-4db6-9072-496a36ef3241@github.com> References: <8II7NdKUskPi_iiXwRaHLWXJoRnLNBh7E-rbG-vddj0=.531edce5-2d51-4db6-9072-496a36ef3241@github.com> Message-ID: On Tue, 16 Sep 2025 16:10:44 GMT, Pavel Rappo wrote: >> Please review this documentation-only change, which I believe does **NOT** require CSR. >> >> The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: >> >> * used a comma separator for some big integer values, to improve readability; >> * fixed a few typos and grammar. >> >> While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. >> >> * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? >> >> Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) >> >> Are there any cases here where that distinction matters? >> >> * In many cases, the following phrase is used throughout documentation: >> >> > positive or negative >> >> While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? >> >> * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". > > Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: > > A few more typos src/java.base/share/classes/java/time/temporal/ChronoField.java line 602: > 600: * This is usually a fixed number of hours and minutes. > 601: * It is equivalent to the {@link ZoneOffset#getTotalSeconds() total amount} of the offset in seconds. > 602: * For example, during the winter Paris has an offset of {@code +01:00}, which is 3,600 seconds. Suggestion: * For example, during the winter, Paris has an offset of {@code +01:00}, which is 3,600 seconds. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27296#discussion_r2353070935 From naoto at openjdk.org Tue Sep 16 16:55:48 2025 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 16 Sep 2025 16:55:48 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v5] In-Reply-To: References: Message-ID: <3f1qjVna29A5zZQvXQd-Gm9EWI02LRbA4cWY5YACnPo=.e935917e-86fc-438d-8560-8a1fb13e602f@github.com> On Tue, 16 Sep 2025 16:46:11 GMT, Pavel Rappo wrote: >> Please review this documentation-only change, which I believe does **NOT** require CSR. >> >> The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: >> >> * used a comma separator for some big integer values, to improve readability; >> * fixed a few typos and grammar. >> >> While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. >> >> * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? >> >> Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) >> >> Are there any cases here where that distinction matters? >> >> * In many cases, the following phrase is used throughout documentation: >> >> > positive or negative >> >> While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? >> >> * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". > > Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: > > Update src/java.base/share/classes/java/time/temporal/ChronoField.java > > Co-authored-by: Justin Lu Looks good. > I might be missing something, but what does IEEE 754 have to do with this? I was simply mentioning there are cases where zeros are signed. Agree that adding zero here is clearer. ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27296#pullrequestreview-3230898454 From prappo at openjdk.org Tue Sep 16 17:10:18 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Tue, 16 Sep 2025 17:10:18 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v6] In-Reply-To: References: Message-ID: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> > Please review this documentation-only change, which I believe does **NOT** require CSR. > > The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: > > * used a comma separator for some big integer values, to improve readability; > * fixed a few typos and grammar. > > While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. > > * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? > > Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) > > Are there any cases here where that distinction matters? > > * In many cases, the following phrase is used throughout documentation: > > > positive or negative > > While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? > > * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: An empty commit to kick GHA ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27296/files - new: https://git.openjdk.org/jdk/pull/27296/files/a9bd5cef..9ce42070 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27296&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27296&range=04-05 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/27296.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27296/head:pull/27296 PR: https://git.openjdk.org/jdk/pull/27296 From rriggs at openjdk.org Tue Sep 16 18:46:55 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 16 Sep 2025 18:46:55 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v6] In-Reply-To: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> References: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> Message-ID: <_Ua4Z82zmV3eVBGyQvrasBorN3Q84sPMQTTf5Oyne_I=.6c4d6a31-80de-4af1-8a15-ac7f921c3639@github.com> On Tue, 16 Sep 2025 17:10:18 GMT, Pavel Rappo wrote: >> Please review this documentation-only change, which I believe does **NOT** require CSR. >> >> The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: >> >> * used a comma separator for some big integer values, to improve readability; >> * fixed a few typos and grammar. >> >> While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. >> >> * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? >> >> Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) >> >> Are there any cases here where that distinction matters? >> >> * In many cases, the following phrase is used throughout documentation: >> >> > positive or negative >> >> While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? >> >> * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". > > Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: > > An empty commit to kick GHA looks good. A CSR is needed due to the changes to the text that imply a change in semantics, for example, changing 'month" to "day". Even if they are viewed as being incorrect, it needs a thorough review. ------------- Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27296#pullrequestreview-3231247517 PR Comment: https://git.openjdk.org/jdk/pull/27296#issuecomment-3299926612 From prappo at openjdk.org Tue Sep 16 19:58:02 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Tue, 16 Sep 2025 19:58:02 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v6] In-Reply-To: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> References: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> Message-ID: <5PSCdIEeoW04LZMgIN3XWQCR0yzsCrAK4G-zttxL0Y8=.659c5863-e2e6-4984-871a-ffffd6858fdb@github.com> On Tue, 16 Sep 2025 17:10:18 GMT, Pavel Rappo wrote: >> Please review this documentation-only change, which I believe does **NOT** require CSR. >> >> The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: >> >> * used a comma separator for some big integer values, to improve readability; >> * fixed a few typos and grammar. >> >> While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. >> >> * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? >> >> Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) >> >> Are there any cases here where that distinction matters? >> >> * In many cases, the following phrase is used throughout documentation: >> >> > positive or negative >> >> While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? >> >> * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". > > Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: > > An empty commit to kick GHA > /csr A CSR is needed due to the changes to the text that imply a change in semantics, for example, changing 'month" to "day". Even if they are viewed as being incorrect, it needs a thorough review. Thanks for your review, Roger. I'm genuinely confused as to why you think CSR is required here. That month/day is clearly a typo. If it was not, clients would have noticed it long ago. I could imagine that CSR is required for my change to "positive, negative *or zero* length" duration. If so, let me exclude it from this PR, and instead introduce a new PR where we deal with this and other cases of missed zeros systematically. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27296#issuecomment-3300154850 From rriggs at openjdk.org Tue Sep 16 20:14:05 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 16 Sep 2025 20:14:05 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v6] In-Reply-To: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> References: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> Message-ID: On Tue, 16 Sep 2025 17:10:18 GMT, Pavel Rappo wrote: >> Please review this documentation-only change, which I believe does **NOT** require CSR. >> >> The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: >> >> * used a comma separator for some big integer values, to improve readability; >> * fixed a few typos and grammar. >> >> While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. >> >> * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? >> >> Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) >> >> Are there any cases here where that distinction matters? >> >> * In many cases, the following phrase is used throughout documentation: >> >> > positive or negative >> >> While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? >> >> * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". > > Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: > > An empty commit to kick GHA Creating a CSR allows the compatible folks take a look for changes and come to their own conclusions. Splitting out changes is fine, but it might be just as efficient to use the PR as is. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27296#issuecomment-3300201951 From prappo at openjdk.org Tue Sep 16 20:47:34 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Tue, 16 Sep 2025 20:47:34 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v6] In-Reply-To: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> References: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> Message-ID: On Tue, 16 Sep 2025 17:10:18 GMT, Pavel Rappo wrote: >> Please review this documentation-only change, which I believe does **NOT** require CSR. >> >> The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: >> >> * used a comma separator for some big integer values, to improve readability; >> * fixed a few typos and grammar. >> >> While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. >> >> * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? >> >> Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) >> >> Are there any cases here where that distinction matters? >> >> * In many cases, the following phrase is used throughout documentation: >> >> > positive or negative >> >> While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? >> >> * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". > > Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: > > An empty commit to kick GHA Thanks for your review, Naoto. > Looks good. > > > I might be missing something, but what does IEEE 754 have to do with this? > > I was simply mentioning there are cases where zeros are signed. Agree that adding zero here is clearer. In regard to directionality, Duration has these three methods: * isPositive, * isNegative, * isZero The spec of the former two makes it very clear, that if `d.isPositive() || d.isNegative()` then `!d.isZero()`. So, if duration of zero length is an acceptable method argument, then we need to add "zero" to "positive or negative" explicitly. The other cases of "positive or negative" that I mentioned relate to _components_ of Duration. These components are primitive int and long. And unless you define a positive int or long value such that its sign bit is 0, then this, for example, should not feel right /** * @serial The number of nanoseconds in the duration, expressed as a fraction of the * number of seconds. This is always positive, and never exceeds 999,999,999. */ private final int nanos; Because I know for a fact that `nanos` can be 0. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27296#issuecomment-3300298919 From rriggs at openjdk.org Tue Sep 16 21:09:52 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 16 Sep 2025 21:09:52 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v6] In-Reply-To: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> References: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> Message-ID: On Tue, 16 Sep 2025 17:10:18 GMT, Pavel Rappo wrote: >> Please review this documentation-only change, which I believe does **NOT** require CSR. >> >> The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: >> >> * used a comma separator for some big integer values, to improve readability; >> * fixed a few typos and grammar. >> >> While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. >> >> * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? >> >> Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) >> >> Are there any cases here where that distinction matters? >> >> * In many cases, the following phrase is used throughout documentation: >> >> > positive or negative >> >> While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? >> >> * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". > > Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: > > An empty commit to kick GHA src/java.base/share/classes/java/time/Duration.java line 480: > 478: *

> 479: * The result of this method can be a negative duration if the end is before the start. > 480: * To guarantee a positive or zero duration call {@link #abs()} on the result. A bit of a quibble here. Checking the spec of the `isPositive()` method, it does not include zero. If the you intend the "positive" to be the same as the result of the `isPositive` method then I think its best to omit the "zero". The `abs` method would not change anything to be a zero. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27296#discussion_r2353654990 From prappo at openjdk.org Tue Sep 16 21:58:27 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Tue, 16 Sep 2025 21:58:27 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v6] In-Reply-To: References: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> Message-ID: On Tue, 16 Sep 2025 21:06:58 GMT, Roger Riggs wrote: >> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: >> >> An empty commit to kick GHA > > src/java.base/share/classes/java/time/Duration.java line 480: > >> 478: *

>> 479: * The result of this method can be a negative duration if the end is before the start. >> 480: * To guarantee a positive or zero duration call {@link #abs()} on the result. > > A bit of a quibble here. Checking the spec of the `isPositive()` method, it does not include zero. > If the you intend the "positive" to be the same as the result of the `isPositive` method then I think its best to omit the "zero". The `abs` method would not change anything to be a zero. I don't understand. Let's consider an example: jshell> import java.time.* jshell> var i = Instant.now(); i ==> 2025-09-16T21:44:06.464393Z jshell> Duration.between(i, i).abs().isPositive() $3 ==> false So, `abs()` does not translate any duration into positive duration. There exists duration `d` such that `!d.abs().isPositive()`. Any duration for which `d.equals(Duration.ZERO)` is like that. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27296#discussion_r2353743450 From darcy at openjdk.org Tue Sep 16 23:17:10 2025 From: darcy at openjdk.org (Joe Darcy) Date: Tue, 16 Sep 2025 23:17:10 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v6] In-Reply-To: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> References: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> Message-ID: <_GyFprI68yEvF4sr22xSW-JMBxdH3Ed74lwo8cH3kAA=.17a57e7d-a700-4d1a-9877-0f942345c0aa@github.com> On Tue, 16 Sep 2025 17:10:18 GMT, Pavel Rappo wrote: >> Please review this documentation-only change, which I believe does **NOT** require CSR. >> >> The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: >> >> * used a comma separator for some big integer values, to improve readability; >> * fixed a few typos and grammar. >> >> While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. >> >> * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? >> >> Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) >> >> Are there any cases here where that distinction matters? >> >> * In many cases, the following phrase is used throughout documentation: >> >> > positive or negative >> >> While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? >> >> * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". > > Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: > > An empty commit to kick GHA Okay -- while some of the changes here are clearly bugs, that doesn't obviate the need for a quick CSR review. Regarding _integer_ values, 0 is conventionally neither positive nor negative; it stands alone, hence Math.signum(int): "Returns the signum function of the specified int value. (The return value is -1 if the specified value is negative; 0 if the specified value is zero; and 1 if the specified value is positive.)" Therefore, "non-negative" integers include zero while "positive" integers do not. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27296#issuecomment-3300632544 From prappo at openjdk.org Wed Sep 17 10:31:45 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Wed, 17 Sep 2025 10:31:45 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v6] In-Reply-To: <_GyFprI68yEvF4sr22xSW-JMBxdH3Ed74lwo8cH3kAA=.17a57e7d-a700-4d1a-9877-0f942345c0aa@github.com> References: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> <_GyFprI68yEvF4sr22xSW-JMBxdH3Ed74lwo8cH3kAA=.17a57e7d-a700-4d1a-9877-0f942345c0aa@github.com> Message-ID: On Tue, 16 Sep 2025 23:14:13 GMT, Joe Darcy wrote: > Okay -- while some of the changes here are clearly bugs, that doesn't obviate the need for a quick CSR review. I see. > Regarding _integer_ values, 0 is conventionally neither positive nor negative; it stands alone, hence Math.signum(int): > > "Returns the signum function of the specified int value. (The return value is -1 if the specified value is negative; 0 if the specified value is zero; and 1 if the specified value is positive.)" > While JLS as well as `Long` and `Integer` primitive wrapper classes do not seem to define what positive and negative integers are, other core classes hint on these terms strongly. One example is `Math.signum`, which you provided. Another example is `Comparator.compare(T, T)`: > Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. So yes, in Java, an integer i is called: * positive, if i > 0 * negative, if i < 0 * zero, if i = 0 ------------- PR Comment: https://git.openjdk.org/jdk/pull/27296#issuecomment-3302355429 From prappo at openjdk.org Wed Sep 17 11:50:54 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Wed, 17 Sep 2025 11:50:54 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v6] In-Reply-To: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> References: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> Message-ID: On Tue, 16 Sep 2025 17:10:18 GMT, Pavel Rappo wrote: >> Please review this documentation-only change, which I believe does **NOT** require CSR. >> >> The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: >> >> * used a comma separator for some big integer values, to improve readability; >> * fixed a few typos and grammar. >> >> While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. >> >> * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? >> >> Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) >> >> Are there any cases here where that distinction matters? >> >> * In many cases, the following phrase is used throughout documentation: >> >> > positive or negative >> >> While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? >> >> * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". > > Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: > > An empty commit to kick GHA @jodastephen, could you comment on any of the questions in the PR summary? Also, I don't use Period often, but I find this method perplexing. How is it supposed to be used? /** * Checks if any of the three units of this period are negative. *

* This checks whether the years, months or days units are less than zero. * * @return true if any unit of this period is negative */ public boolean isNegative() ------------- PR Comment: https://git.openjdk.org/jdk/pull/27296#issuecomment-3302620443 From rriggs at openjdk.org Wed Sep 17 13:45:48 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 17 Sep 2025 13:45:48 GMT Subject: RFR: 8367031: Revert "8334742: Change java.time month/day field types to 'byte'" Message-ID: This reverts commit 4ced4e73fc0a517df826860839681004bb67e624. Restore the previous field types to maintain compatibility with previous releases of the serialized form of classes of java.time. The classes reverted are LocalDate, MonthDay, YearMonth, and HijrahDate. ------------- Commit messages: - Revert "8334742: Change java.time month/day field types to 'byte'" Changes: https://git.openjdk.org/jdk/pull/27346/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27346&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8367031 Stats: 17 lines in 4 files changed: 0 ins; 0 del; 17 mod Patch: https://git.openjdk.org/jdk/pull/27346.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27346/head:pull/27346 PR: https://git.openjdk.org/jdk/pull/27346 From alanb at openjdk.org Wed Sep 17 13:54:38 2025 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 17 Sep 2025 13:54:38 GMT Subject: RFR: 8367031: Regression in serialization of LocalDate class objects In-Reply-To: References: Message-ID: On Wed, 17 Sep 2025 13:39:18 GMT, Roger Riggs wrote: > This reverts commit 4ced4e73fc0a517df826860839681004bb67e624. > > Restore the previous field types to maintain compatibility with previous releases of the serialized form > of classes of java.time. > The classes reverted are LocalDate, MonthDay, YearMonth, and HijrahDate. Looks okay, and good for 25u too. ------------- Marked as reviewed by alanb (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27346#pullrequestreview-3234583232 From rriggs at openjdk.org Wed Sep 17 13:54:40 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 17 Sep 2025 13:54:40 GMT Subject: RFR: 8367031: Regression in serialization of LocalDate class objects In-Reply-To: References: Message-ID: <8QbtnS3GFDphvVq2UOi3flZvNMz0ddm11wEvM3ItqkM=.affee8d9-46ac-47a7-bdcd-2715258e3536@github.com> On Wed, 17 Sep 2025 13:39:18 GMT, Roger Riggs wrote: > This reverts commit 4ced4e73fc0a517df826860839681004bb67e624. > > Restore the previous field types to maintain compatibility with previous releases of the serialized form > of classes of java.time. > The classes reverted are LocalDate, MonthDay, YearMonth, and HijrahDate. fyi, this will be backported to JDK 25 in a future update. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27346#issuecomment-3303106389 From liach at openjdk.org Wed Sep 17 14:00:46 2025 From: liach at openjdk.org (Chen Liang) Date: Wed, 17 Sep 2025 14:00:46 GMT Subject: RFR: 8367031: Regression in serialization of LocalDate class objects In-Reply-To: References: Message-ID: <1jixFPEY5_GPPCiZ7BqFpgen2mgfxDtxviIp0yEzAJ8=.73574e25-7a08-4d75-b70b-d63fb51b8a0c@github.com> On Wed, 17 Sep 2025 13:39:18 GMT, Roger Riggs wrote: > This reverts commit 4ced4e73fc0a517df826860839681004bb67e624. > > Restore the previous field types to maintain compatibility with previous releases of the serialized form > of classes of java.time. > The classes reverted are LocalDate, MonthDay, YearMonth, and HijrahDate. Marked as reviewed by liach (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27346#pullrequestreview-3234610609 From shade at openjdk.org Wed Sep 17 14:00:48 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 17 Sep 2025 14:00:48 GMT Subject: RFR: 8367031: Regression in serialization of LocalDate class objects In-Reply-To: References: Message-ID: On Wed, 17 Sep 2025 13:39:18 GMT, Roger Riggs wrote: > This reverts commit 4ced4e73fc0a517df826860839681004bb67e624. > > Restore the previous field types to maintain compatibility with previous releases of the serialized form > of classes of java.time. > The classes reverted are LocalDate, MonthDay, YearMonth, and HijrahDate. Is this a straight backout of https://github.com/openjdk/jdk/commit/4ced4e73fc0a517df826860839681004bb67e624? Shouldn't this be `[BACKOUT] ...` issue then? ------------- PR Comment: https://git.openjdk.org/jdk/pull/27346#issuecomment-3303133711 From rriggs at openjdk.org Wed Sep 17 14:00:49 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 17 Sep 2025 14:00:49 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v6] In-Reply-To: References: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> Message-ID: On Tue, 16 Sep 2025 21:55:36 GMT, Pavel Rappo wrote: >> src/java.base/share/classes/java/time/Duration.java line 480: >> >>> 478: *

>>> 479: * The result of this method can be a negative duration if the end is before the start. >>> 480: * To guarantee a positive or zero duration call {@link #abs()} on the result. >> >> A bit of a quibble here. Checking the spec of the `isPositive()` method, it does not include zero. >> If the you intend the "positive" to be the same as the result of the `isPositive` method then I think its best to omit the "zero". The `abs` method would not change anything to be a zero. > > I don't understand. Let's consider an example: > > jshell> import java.time.* > > jshell> var i = Instant.now(); > i ==> 2025-09-16T21:44:06.464393Z > > jshell> Duration.between(i, i).abs().isPositive() > $3 ==> false > > So, `abs()` does not translate any duration into positive duration. There exists duration `d` such that `!d.abs().isPositive()`. Any duration for which `d.equals(Duration.ZERO)` is like that. Joe's suggestion of "non-negative" (instead of positive) is probably the best replacement. Mentioning using `abs()` with a zero argument didn't parse well. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27296#discussion_r2355624787 From alanb at openjdk.org Wed Sep 17 14:11:57 2025 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 17 Sep 2025 14:11:57 GMT Subject: RFR: 8367031: Regression in serialization of LocalDate class objects In-Reply-To: References: Message-ID: <1YNjpvxLs-mU4zSsMA3JvHIkn8GwxKzX258HxnUznsY=.7bbb9995-04c5-4442-9412-3a9b35c66c19@github.com> On Wed, 17 Sep 2025 13:39:18 GMT, Roger Riggs wrote: > This reverts commit 4ced4e73fc0a517df826860839681004bb67e624. > > Restore the previous field types to maintain compatibility with previous releases of the serialized form > of classes of java.time. > The classes reverted are LocalDate, MonthDay, YearMonth, and HijrahDate. Are you planning to add tests to catch this sort of issue, even if only for the classes in java.time for now, or are you thinking about a follow-up issue? ------------- PR Comment: https://git.openjdk.org/jdk/pull/27346#issuecomment-3303186007 From dmlloyd at openjdk.org Wed Sep 17 14:11:58 2025 From: dmlloyd at openjdk.org (David Lloyd) Date: Wed, 17 Sep 2025 14:11:58 GMT Subject: RFR: 8367031: Regression in serialization of LocalDate class objects In-Reply-To: References: Message-ID: <1bW5XQSCD4DRwvJQjEwoIN714PbydfyWwN8beACdqk0=.5ab255ab-56d6-427d-b0b1-88321e3976ee@github.com> On Wed, 17 Sep 2025 13:39:18 GMT, Roger Riggs wrote: > This reverts commit 4ced4e73fc0a517df826860839681004bb67e624. > > Restore the previous field types to maintain compatibility with previous releases of the serialized form > of classes of java.time. > The classes reverted are LocalDate, MonthDay, YearMonth, and HijrahDate. Would it not have been sufficient to add a `serialPersistentFields` which defines the fields as their "old" types? ------------- PR Comment: https://git.openjdk.org/jdk/pull/27346#issuecomment-3303186083 From prappo at openjdk.org Wed Sep 17 14:40:06 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Wed, 17 Sep 2025 14:40:06 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v6] In-Reply-To: References: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> Message-ID: <7WMh5xltSUpVuHS4EGIFpy_3arOI1BygQIU7LmKH6fk=.5ac991bb-4e2f-4ef0-aa4e-29eb1be0e9fa@github.com> On Wed, 17 Sep 2025 13:58:03 GMT, Roger Riggs wrote: >> I don't understand. Let's consider an example: >> >> jshell> import java.time.* >> >> jshell> var i = Instant.now(); >> i ==> 2025-09-16T21:44:06.464393Z >> >> jshell> Duration.between(i, i).abs().isPositive() >> $3 ==> false >> >> So, `abs()` does not translate any duration into positive duration. There exists duration `d` such that `!d.abs().isPositive()`. Any duration for which `d.equals(Duration.ZERO)` is like that. > > Joe's suggestion of "non-negative" (instead of positive) is probably the best replacement. > > Mentioning using `abs()` with a zero argument didn't parse well. Okay, but don't we need some verbiage -- however little -- on what "non-negative" means for Duration, or we consider it self-evident? (Genuine question.) Can we also tie this change with "positive or negative" for primitive components? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27296#discussion_r2355757830 From rriggs at openjdk.org Wed Sep 17 14:41:14 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 17 Sep 2025 14:41:14 GMT Subject: RFR: 8367031: Regression in serialization of LocalDate class objects In-Reply-To: <1YNjpvxLs-mU4zSsMA3JvHIkn8GwxKzX258HxnUznsY=.7bbb9995-04c5-4442-9412-3a9b35c66c19@github.com> References: <1YNjpvxLs-mU4zSsMA3JvHIkn8GwxKzX258HxnUznsY=.7bbb9995-04c5-4442-9412-3a9b35c66c19@github.com> Message-ID: On Wed, 17 Sep 2025 14:08:51 GMT, Alan Bateman wrote: > Are you planning to add tests to catch this sort of issue, even if only for the classes in java.time for now, or are you thinking about a follow-up issue? I'm working on a new test to serialize classes to an archive and compare the archived serialized classes against the current runtime. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27346#issuecomment-3303317384 From rriggs at openjdk.org Wed Sep 17 14:41:16 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 17 Sep 2025 14:41:16 GMT Subject: RFR: 8367031: Regression in serialization of LocalDate class objects In-Reply-To: <1bW5XQSCD4DRwvJQjEwoIN714PbydfyWwN8beACdqk0=.5ab255ab-56d6-427d-b0b1-88321e3976ee@github.com> References: <1bW5XQSCD4DRwvJQjEwoIN714PbydfyWwN8beACdqk0=.5ab255ab-56d6-427d-b0b1-88321e3976ee@github.com> Message-ID: On Wed, 17 Sep 2025 14:08:52 GMT, David Lloyd wrote: > Would it not have been sufficient to add a `serialPersistentFields` which defines the fields as their "old" types? Using serialPersistenFields is an option; but to correct the regression, it was cleaner to just revert/backout the change. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27346#issuecomment-3303327231 From rriggs at openjdk.org Wed Sep 17 14:43:30 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 17 Sep 2025 14:43:30 GMT Subject: RFR: 8367031: [backout] Regression in serialization of LocalDate class objects In-Reply-To: References: Message-ID: On Wed, 17 Sep 2025 13:39:18 GMT, Roger Riggs wrote: > This reverts commit 4ced4e73fc0a517df826860839681004bb67e624. > > Restore the previous field types to maintain compatibility with previous releases of the serialized form > of classes of java.time. > The classes reverted are LocalDate, MonthDay, YearMonth, and HijrahDate. > Is this a straight backout of [4ced4e7](https://github.com/openjdk/jdk/commit/4ced4e73fc0a517df826860839681004bb67e624)? Shouldn't this be `[BACKOUT] ...` issue then? Yes, it is a straight backout; I can add the [backout] prefix to the regression title. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27346#issuecomment-3303338257 From prappo at openjdk.org Wed Sep 17 15:10:49 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Wed, 17 Sep 2025 15:10:49 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v7] In-Reply-To: References: Message-ID: > Please review this documentation-only change, which I believe does **NOT** require CSR. > > The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: > > * used a comma separator for some big integer values, to improve readability; > * fixed a few typos and grammar. > > While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. > > * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? > > Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) > > Are there any cases here where that distinction matters? > > * In many cases, the following phrase is used throughout documentation: > > > positive or negative > > While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? > > * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: Remove CSR-triggering changes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27296/files - new: https://git.openjdk.org/jdk/pull/27296/files/9ce42070..7c4cc716 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27296&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27296&range=05-06 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/27296.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27296/head:pull/27296 PR: https://git.openjdk.org/jdk/pull/27296 From shade at openjdk.org Wed Sep 17 16:21:49 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 17 Sep 2025 16:21:49 GMT Subject: RFR: 8367031: [backout] Regression in serialization of LocalDate class objects In-Reply-To: References: Message-ID: On Wed, 17 Sep 2025 14:41:11 GMT, Roger Riggs wrote: > > Is this a straight backout of [4ced4e7](https://github.com/openjdk/jdk/commit/4ced4e73fc0a517df826860839681004bb67e624)? Shouldn't this be `[BACKOUT] ...` issue then? > > Yes, it is a straight backout; I can add the [backout] prefix to the regression title. Cool. Sorry for being overly retentive here, but as per [Guide](https://openjdk.org/guide/#backing-out-a-change), you need to name it: `[BACKOUT] Change java.time month/day field types to 'byte'` ;) ------------- PR Comment: https://git.openjdk.org/jdk/pull/27346#issuecomment-3303720097 From naoto at openjdk.org Wed Sep 17 16:26:36 2025 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 17 Sep 2025 16:26:36 GMT Subject: RFR: 8367031: [backout] Regression in serialization of LocalDate class objects In-Reply-To: References: Message-ID: <8v7M7hsGV69vJUhx_FRwK7sK63iWM4ABJY2fdoSfRko=.44b74e61-6ea7-44aa-b958-313675d74f19@github.com> On Wed, 17 Sep 2025 13:39:18 GMT, Roger Riggs wrote: > This reverts commit 4ced4e73fc0a517df826860839681004bb67e624. > > Restore the previous field types to maintain compatibility with previous releases of the serialized form > of classes of java.time. > The classes reverted are LocalDate, MonthDay, YearMonth, and HijrahDate. Marked as reviewed by naoto (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27346#pullrequestreview-3235275913 From rriggs at openjdk.org Wed Sep 17 16:30:37 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 17 Sep 2025 16:30:37 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v7] In-Reply-To: References: Message-ID: On Wed, 17 Sep 2025 15:10:49 GMT, Pavel Rappo wrote: >> Please review this documentation-only change, which I believe does **NOT** require CSR. >> >> The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: >> >> * used a comma separator for some big integer values, to improve readability; >> * fixed a few typos and grammar. >> >> While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. >> >> * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? >> >> Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) >> >> Are there any cases here where that distinction matters? >> >> * In many cases, the following phrase is used throughout documentation: >> >> > positive or negative >> >> While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? >> >> * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". > > Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: > > Remove CSR-triggering changes Keeping the change to typos removes the necessity of the the CSR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27296#issuecomment-3303752478 From iris at openjdk.org Wed Sep 17 16:40:01 2025 From: iris at openjdk.org (Iris Clark) Date: Wed, 17 Sep 2025 16:40:01 GMT Subject: RFR: 8367031: [backout] Regression in serialization of LocalDate class objects In-Reply-To: References: Message-ID: <2EgDDsqc6rMkFtLQbhNGAsNSFFsTI6D7NOm0F-KWFtY=.7eaf0b2b-15ec-4c74-b26a-4cf766d7d928@github.com> On Wed, 17 Sep 2025 13:39:18 GMT, Roger Riggs wrote: > This reverts commit 4ced4e73fc0a517df826860839681004bb67e624. > > Restore the previous field types to maintain compatibility with previous releases of the serialized form > of classes of java.time. > The classes reverted are LocalDate, MonthDay, YearMonth, and HijrahDate. Marked as reviewed by iris (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27346#pullrequestreview-3235320383 From rriggs at openjdk.org Wed Sep 17 16:46:39 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 17 Sep 2025 16:46:39 GMT Subject: RFR: 8367031: [backout] Regression in serialization of LocalDate class objects In-Reply-To: References: Message-ID: On Wed, 17 Sep 2025 16:19:31 GMT, Aleksey Shipilev wrote: >>> Is this a straight backout of [4ced4e7](https://github.com/openjdk/jdk/commit/4ced4e73fc0a517df826860839681004bb67e624)? Shouldn't this be `[BACKOUT] ...` issue then? >> >> Yes, it is a straight backout; I can add the [backout] prefix to the regression title. > >> > Is this a straight backout of [4ced4e7](https://github.com/openjdk/jdk/commit/4ced4e73fc0a517df826860839681004bb67e624)? Shouldn't this be `[BACKOUT] ...` issue then? >> >> Yes, it is a straight backout; I can add the [backout] prefix to the regression title. > > Cool. Sorry for being overly retentive here, but as per [Guide](https://openjdk.org/guide/#backing-out-a-change), you need to name it: `[BACKOUT] Change java.time month/day field types to 'byte'` ;) @shipilev I can create a new issue with exactly the prescribed text. But changing the purpose of the issue that was filed to be a simple back-out seems like its loosing information. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27346#issuecomment-3303802334 From shade at openjdk.org Wed Sep 17 16:58:57 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 17 Sep 2025 16:58:57 GMT Subject: RFR: 8367031: [backout] Regression in serialization of LocalDate class objects In-Reply-To: References: Message-ID: On Wed, 17 Sep 2025 16:19:31 GMT, Aleksey Shipilev wrote: >>> Is this a straight backout of [4ced4e7](https://github.com/openjdk/jdk/commit/4ced4e73fc0a517df826860839681004bb67e624)? Shouldn't this be `[BACKOUT] ...` issue then? >> >> Yes, it is a straight backout; I can add the [backout] prefix to the regression title. > >> > Is this a straight backout of [4ced4e7](https://github.com/openjdk/jdk/commit/4ced4e73fc0a517df826860839681004bb67e624)? Shouldn't this be `[BACKOUT] ...` issue then? >> >> Yes, it is a straight backout; I can add the [backout] prefix to the regression title. > > Cool. Sorry for being overly retentive here, but as per [Guide](https://openjdk.org/guide/#backing-out-a-change), you need to name it: `[BACKOUT] Change java.time month/day field types to 'byte'` ;) > @shipilev I can create a new issue with exactly the prescribed text. But changing the purpose of the issue that was filed to be a simple back-out seems like its loosing information. No need to create new issues. Guide mentions "Alternative 2": you just convert this "investigation" issue into "backout" issue, and move it to be a subtask of the original issue. There is no loss of information, just a few metadata changes? ------------- PR Comment: https://git.openjdk.org/jdk/pull/27346#issuecomment-3303828868 From liach at openjdk.org Wed Sep 17 16:58:58 2025 From: liach at openjdk.org (Chen Liang) Date: Wed, 17 Sep 2025 16:58:58 GMT Subject: RFR: 8367031: [backout] Regression in serialization of LocalDate class objects In-Reply-To: References: Message-ID: On Wed, 17 Sep 2025 16:52:09 GMT, Aleksey Shipilev wrote: >>> > Is this a straight backout of [4ced4e7](https://github.com/openjdk/jdk/commit/4ced4e73fc0a517df826860839681004bb67e624)? Shouldn't this be `[BACKOUT] ...` issue then? >>> >>> Yes, it is a straight backout; I can add the [backout] prefix to the regression title. >> >> Cool. Sorry for being overly retentive here, but as per [Guide](https://openjdk.org/guide/#backing-out-a-change), you need to name it: `[BACKOUT] Change java.time month/day field types to 'byte'` ;) > >> @shipilev I can create a new issue with exactly the prescribed text. But changing the purpose of the issue that was filed to be a simple back-out seems like its loosing information. > > No need to create new issues. Guide mentions "Alternative 2": you just convert this "investigation" issue into "backout" issue, and move it to be a subtask of the original issue. There is no loss of information, just a few metadata changes? @shipilev FYI this issue already has a release note subtask, so the issue itself cannot be converted to a subtask. We might need to move the release note too. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27346#issuecomment-3303840514 From shade at openjdk.org Wed Sep 17 17:03:00 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 17 Sep 2025 17:03:00 GMT Subject: RFR: 8367031: [backout] Regression in serialization of LocalDate class objects In-Reply-To: References: Message-ID: On Wed, 17 Sep 2025 13:39:18 GMT, Roger Riggs wrote: > This reverts commit 4ced4e73fc0a517df826860839681004bb67e624. > > Restore the previous field types to maintain compatibility with previous releases of the serialized form > of classes of java.time. > The classes reverted are LocalDate, MonthDay, YearMonth, and HijrahDate. Aw, release note is present. Well, that's one of those corner cases. Back to square one then: drop the `[backout]` from synopsis, but mention in the comments in the original issue that it was effectively completely backed out by this one. I remember we did a few issues like that. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27346#issuecomment-3303854212 From rriggs at openjdk.org Wed Sep 17 18:11:20 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 17 Sep 2025 18:11:20 GMT Subject: RFR: 8367031: [backout] Change java.time month/day field types to 'byte' In-Reply-To: References: Message-ID: <4vCKX2sztBjsgGbv9DywsgovPHlc_xVkyXVDbwIAejU=.5807e04e-dfaa-4288-9a6d-b6c17fa7f411@github.com> On Wed, 17 Sep 2025 13:39:18 GMT, Roger Riggs wrote: > This reverts commit 4ced4e73fc0a517df826860839681004bb67e624. > > Restore the previous field types to maintain compatibility with previous releases of the serialized form > of classes of java.time. > The classes reverted are LocalDate, MonthDay, YearMonth, and HijrahDate. Updated the title of 8367031, it is moved to a subtask of the original 8334742. The release note is now a subtask of 8334742, which still seems like the relevant parent. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27346#issuecomment-3304062859 From rriggs at openjdk.org Wed Sep 17 19:52:32 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 17 Sep 2025 19:52:32 GMT Subject: Integrated: 8367031: [backout] Change java.time month/day field types to 'byte' In-Reply-To: References: Message-ID: <7qUOwtFxS4ZKprUxk7wbX_4BLeqUjVLwmMgzvlUJp1U=.26f5d6b0-c626-4894-8cc2-9f550a7ddb3c@github.com> On Wed, 17 Sep 2025 13:39:18 GMT, Roger Riggs wrote: > This reverts commit 4ced4e73fc0a517df826860839681004bb67e624. > > Restore the previous field types to maintain compatibility with previous releases of the serialized form > of classes of java.time. > The classes reverted are LocalDate, MonthDay, YearMonth, and HijrahDate. This pull request has now been integrated. Changeset: 0756ecb2 Author: Roger Riggs URL: https://git.openjdk.org/jdk/commit/0756ecb214b8ab76cb69f354063d153b72f978c2 Stats: 17 lines in 4 files changed: 0 ins; 0 del; 17 mod 8367031: [backout] Change java.time month/day field types to 'byte' Reviewed-by: alanb, liach, naoto, iris ------------- PR: https://git.openjdk.org/jdk/pull/27346 From jlu at openjdk.org Wed Sep 17 22:45:02 2025 From: jlu at openjdk.org (Justin Lu) Date: Wed, 17 Sep 2025 22:45:02 GMT Subject: RFR: 8367901: Calendar.roll(hour, 24) returns wrong result Message-ID: Please review this PR which addresses an edge case for `GregorianCalendar.roll(int, int)` when the rolled amount would cause the hour to remain the same as before the call. After this change, the expected hour is returned. That is, rolling a full cycle for HOUR (12 hours) and HOUR_OF_DAY (24 hours) should keep the hour the same as before the call. For example, a calendar with HOUR_OF_DAY == 15, cal.roll(Calendar.HOUR_OF_DAY, 23); cal.get(Calendar.HOUR_OF_DAY); // returns 14 cal.roll(Calendar.HOUR_OF_DAY, 24); // Incorrectly returns 16. A full cycle is expected to return the starting hour (15) cal.get(Calendar.HOUR_OF_DAY); cal.roll(Calendar.HOUR_OF_DAY, 25); cal.get(Calendar.HOUR_OF_DAY); // returns 16 ------------- Commit messages: - init Changes: https://git.openjdk.org/jdk/pull/27355/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27355&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8367901 Stats: 92 lines in 2 files changed: 89 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/27355.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27355/head:pull/27355 PR: https://git.openjdk.org/jdk/pull/27355 From naoto at openjdk.org Thu Sep 18 15:44:54 2025 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 18 Sep 2025 15:44:54 GMT Subject: RFR: 8367901: Calendar.roll(hour, 24) returns wrong result In-Reply-To: References: Message-ID: On Wed, 17 Sep 2025 22:37:52 GMT, Justin Lu wrote: > Please review this PR which addresses an edge case for `GregorianCalendar.roll(int, int)` when the rolled amount would cause the hour to remain the same as before the call. After this change, the expected hour is returned. That is, rolling a full cycle for HOUR (12 hours) and HOUR_OF_DAY (24 hours) should keep the hour the same as before the call. > > For example, a calendar with HOUR_OF_DAY == 15, > > > cal.roll(Calendar.HOUR_OF_DAY, 23); > cal.get(Calendar.HOUR_OF_DAY); // returns 14 > > > cal.roll(Calendar.HOUR_OF_DAY, 24); > // Incorrectly returns 16. A full cycle is expected to return the starting hour (15) > cal.get(Calendar.HOUR_OF_DAY); > > > cal.roll(Calendar.HOUR_OF_DAY, 25); > cal.get(Calendar.HOUR_OF_DAY); // returns 16 Looks good. Left some minor suggestions to the test test/jdk/java/util/Calendar/RollHoursTest.java line 56: > 54: @FieldSource("hours") > 55: void HourOfDayTest(int hour) { > 56: var cal = new GregorianCalendar(2005, 8, 12, PM_HOUR, 30, 45); IIUC, the regression was caused by the fix to [JDK-8152077](https://bugs.openjdk.org/browse/JDK-8152077), where it jiggles an hour on the transition day. So although I don't think it would fail, but it might be helpful to test on one of those days test/jdk/java/util/Calendar/RollHoursTest.java line 59: > 57: // E.g. For hour +50 -> (50 + 15) % 24 = 17 > 58: // For hour -50 -> (24 + (15 - 50) % 24) % 24 > 59: // -> (24 + - 11) % 24 = 13 Not sure "+ -" was intentional, but just wanted to comment. Also this calculation could be a static method, as it is repeated below. ------------- PR Review: https://git.openjdk.org/jdk/pull/27355#pullrequestreview-3240559003 PR Review Comment: https://git.openjdk.org/jdk/pull/27355#discussion_r2359954295 PR Review Comment: https://git.openjdk.org/jdk/pull/27355#discussion_r2359957874 From naoto at openjdk.org Thu Sep 18 20:26:49 2025 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 18 Sep 2025 20:26:49 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v7] In-Reply-To: References: Message-ID: On Wed, 17 Sep 2025 15:10:49 GMT, Pavel Rappo wrote: >> Please review this documentation-only change, which I believe does **NOT** require CSR. >> >> The change touches java.time.** classes that I happen to have been using a lot recently. While the diff is pretty self-describing, here's the summary of what I did: >> >> * used a comma separator for some big integer values, to improve readability; >> * fixed a few typos and grammar. >> >> While I'm open to discuss the change, I also have some questions. Note: I'm not attempting to address those questions in this PR. >> >> * What's the significance of the second argument in Duration.between(Temporal, Temporal) being exclusive? For example, would the result of the following call be different if the second argument was inclusive? >> >> Duration.between(Instant.ofEpochSecond(1), Instant.ofEpochSecond(2)) >> >> Are there any cases here where that distinction matters? >> >> * In many cases, the following phrase is used throughout documentation: >> >> > positive or negative >> >> While the intent is clearly to stress the directed nature of values, shouldn't we -- for completeness -- also mention zero where applicable? >> >> * What's the significance of title-case for Java Time-Scale? FWIW, the documentation also uses "Java time-scale". > > Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: > > Remove CSR-triggering changes Marked as reviewed by naoto (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27296#pullrequestreview-3241974417 From jlu at openjdk.org Thu Sep 18 20:41:58 2025 From: jlu at openjdk.org (Justin Lu) Date: Thu, 18 Sep 2025 20:41:58 GMT Subject: RFR: 8367901: Calendar.roll(hour, 24) returns wrong result [v2] In-Reply-To: References: Message-ID: > Please review this PR which addresses an edge case for `GregorianCalendar.roll(int, int)` when the rolled amount would cause the hour to remain the same as before the call. After this change, the expected hour is returned. That is, rolling a full cycle for HOUR (12 hours) and HOUR_OF_DAY (24 hours) should keep the hour the same as before the call. > > For example, a calendar with HOUR_OF_DAY == 15, > > > cal.roll(Calendar.HOUR_OF_DAY, 23); > cal.get(Calendar.HOUR_OF_DAY); // returns 14 > > > cal.roll(Calendar.HOUR_OF_DAY, 24); > // Incorrectly returns 16. A full cycle is expected to return the starting hour (15) > cal.get(Calendar.HOUR_OF_DAY); > > > cal.roll(Calendar.HOUR_OF_DAY, 25); > cal.get(Calendar.HOUR_OF_DAY); // returns 16 Justin Lu has updated the pull request incrementally with two additional commits since the last revision: - + - to - in comment - DST test cases + compute expected value as method + improve err msg ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27355/files - new: https://git.openjdk.org/jdk/pull/27355/files/f214e1db..9316ca62 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27355&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27355&range=00-01 Stats: 81 lines in 1 file changed: 52 ins; 0 del; 29 mod Patch: https://git.openjdk.org/jdk/pull/27355.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27355/head:pull/27355 PR: https://git.openjdk.org/jdk/pull/27355 From jlu at openjdk.org Thu Sep 18 20:42:00 2025 From: jlu at openjdk.org (Justin Lu) Date: Thu, 18 Sep 2025 20:42:00 GMT Subject: RFR: 8367901: Calendar.roll(hour, 24) returns wrong result [v2] In-Reply-To: References: Message-ID: On Thu, 18 Sep 2025 15:39:25 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with two additional commits since the last revision: >> >> - + - to - in comment >> - DST test cases + compute expected value as method + improve err msg > > test/jdk/java/util/Calendar/RollHoursTest.java line 56: > >> 54: @FieldSource("hours") >> 55: void HourOfDayTest(int hour) { >> 56: var cal = new GregorianCalendar(2005, 8, 12, PM_HOUR, 30, 45); > > IIUC, the regression was caused by the fix to [JDK-8152077](https://bugs.openjdk.org/browse/JDK-8152077), where it jiggles an hour on the transition day. So although I don't think it would fail, but it might be helpful to test on one of those days Good point. Added both _standard -> daylight savings_ and _daylight savings -> standard_ test cases to be thorough, although the former one is the interesting test case. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27355#discussion_r2361133554 From prappo at openjdk.org Thu Sep 18 20:55:33 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Thu, 18 Sep 2025 20:55:33 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v6] In-Reply-To: <_GyFprI68yEvF4sr22xSW-JMBxdH3Ed74lwo8cH3kAA=.17a57e7d-a700-4d1a-9877-0f942345c0aa@github.com> References: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> <_GyFprI68yEvF4sr22xSW-JMBxdH3Ed74lwo8cH3kAA=.17a57e7d-a700-4d1a-9877-0f942345c0aa@github.com> Message-ID: On Tue, 16 Sep 2025 23:14:13 GMT, Joe Darcy wrote: >> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: >> >> An empty commit to kick GHA > > Okay -- while some of the changes here are clearly bugs, that doesn't obviate the need for a quick CSR review. > > Regarding _integer_ values, 0 is conventionally neither positive nor negative; it stands alone, hence Math.signum(int): > > "Returns the signum function of the specified int value. (The return value is -1 if the specified value is negative; 0 if the specified value is zero; and 1 if the specified value is positive.)" > > Therefore, "non-negative" integers include zero while "positive" integers do not. @jddarcy, are you okay with me pushing this without CSR? To my mind, it now contains typo fixes and editorial improvements only. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27296#issuecomment-3309694016 From jlu at openjdk.org Thu Sep 18 21:35:51 2025 From: jlu at openjdk.org (Justin Lu) Date: Thu, 18 Sep 2025 21:35:51 GMT Subject: RFR: 8367703: Unneeded cast in java.text.DigitList.append In-Reply-To: <15UI-L234zW8DE6t_5jkhDrViTIGGlsb5dqT5lzkoys=.c2d06cd5-3d11-4c10-bcde-a490b4b218a7@github.com> References: <15UI-L234zW8DE6t_5jkhDrViTIGGlsb5dqT5lzkoys=.c2d06cd5-3d11-4c10-bcde-a490b4b218a7@github.com> Message-ID: On Mon, 15 Sep 2025 21:18:12 GMT, Justin Lu wrote: > During parse routines, DecimalFormat uses DigitList to append digits from the parsed text. > > Note that `digit` is always the int value 0 through 9 (and subsequently the code point 48 through 57) when passed to `append`. > > Currently, `append` accepts a char which forces an int -> char -> byte conversion to be stored in `digits`. This can be simplified to int -> byte if the parameter type for the method is updated. The two call sites can safely make this swap. > > Tiers 1-3 and java.text JCK tests continue to pass with this change. For reference, existing case of casting the result of adding a `char` and `int` to `byte` directly in DigitList when storing in `digits`. https://github.com/openjdk/jdk/pull/27300/files#diff-9950f1f11fffb5ed95549f1067ca7359957b5e8ef89c153d5b1d394edf5df28eL642 ------------- PR Comment: https://git.openjdk.org/jdk/pull/27300#issuecomment-3309790833 From rriggs at openjdk.org Thu Sep 18 21:36:31 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 18 Sep 2025 21:36:31 GMT Subject: [jdk25] RFR: 8367031: [backout] Change java.time month/day field types to 'byte' Message-ID: Propagate [backout] Change java.time month/day field types to 'byte' to jdk 25. Previously reviewed as: https://github.com/openjdk/jdk/pull/27346 ------------- Commit messages: - Backport 0756ecb214b8ab76cb69f354063d153b72f978c2 Changes: https://git.openjdk.org/jdk/pull/27375/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27375&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8367031 Stats: 17 lines in 4 files changed: 0 ins; 0 del; 17 mod Patch: https://git.openjdk.org/jdk/pull/27375.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27375/head:pull/27375 PR: https://git.openjdk.org/jdk/pull/27375 From rriggs at openjdk.org Thu Sep 18 21:41:07 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 18 Sep 2025 21:41:07 GMT Subject: [jdk25] RFR: 8367031: [backout] Change java.time month/day field types to 'byte' In-Reply-To: References: Message-ID: On Thu, 18 Sep 2025 21:25:13 GMT, Roger Riggs wrote: > Propagate [backout] Change java.time month/day field types to 'byte' to jdk 25. > Previously reviewed as: https://github.com/openjdk/jdk/pull/27346 Wrong backport target. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27375#issuecomment-3309801233 From rriggs at openjdk.org Thu Sep 18 21:41:08 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 18 Sep 2025 21:41:08 GMT Subject: [jdk25] Withdrawn: 8367031: [backout] Change java.time month/day field types to 'byte' In-Reply-To: References: Message-ID: On Thu, 18 Sep 2025 21:25:13 GMT, Roger Riggs wrote: > Propagate [backout] Change java.time month/day field types to 'byte' to jdk 25. > Previously reviewed as: https://github.com/openjdk/jdk/pull/27346 This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/27375 From rriggs at openjdk.org Thu Sep 18 22:01:12 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 18 Sep 2025 22:01:12 GMT Subject: RFR: 8367703: Unneeded cast in java.text.DigitList.append In-Reply-To: <15UI-L234zW8DE6t_5jkhDrViTIGGlsb5dqT5lzkoys=.c2d06cd5-3d11-4c10-bcde-a490b4b218a7@github.com> References: <15UI-L234zW8DE6t_5jkhDrViTIGGlsb5dqT5lzkoys=.c2d06cd5-3d11-4c10-bcde-a490b4b218a7@github.com> Message-ID: <7BEF1Gzu4O4GkpsDNj2NEVKp494N5YGj83BsNhfH1Oo=.97af2575-dc73-4083-ae45-e8dba63dd422@github.com> On Mon, 15 Sep 2025 21:18:12 GMT, Justin Lu wrote: > During parse routines, DecimalFormat uses DigitList to append digits from the parsed text. > > Note that `digit` is always the int value 0 through 9 (and subsequently the code point 48 through 57) when passed to `append`. > > Currently, `append` accepts a char which forces an int -> char -> byte conversion to be stored in `digits`. This can be simplified to int -> byte if the parameter type for the method is updated. The two call sites can safely make this swap. > > Tiers 1-3 and java.text JCK tests continue to pass with this change. Looks ok. Mostly this is a small change that it is not worthy of a PR. It is just churn in the codebase. ------------- Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27300#pullrequestreview-3242216681 From jlu at openjdk.org Thu Sep 18 22:20:29 2025 From: jlu at openjdk.org (Justin Lu) Date: Thu, 18 Sep 2025 22:20:29 GMT Subject: RFR: 8367703: Unneeded cast in java.text.DigitList.append In-Reply-To: <15UI-L234zW8DE6t_5jkhDrViTIGGlsb5dqT5lzkoys=.c2d06cd5-3d11-4c10-bcde-a490b4b218a7@github.com> References: <15UI-L234zW8DE6t_5jkhDrViTIGGlsb5dqT5lzkoys=.c2d06cd5-3d11-4c10-bcde-a490b4b218a7@github.com> Message-ID: On Mon, 15 Sep 2025 21:18:12 GMT, Justin Lu wrote: > During parse routines, DecimalFormat uses DigitList to append digits from the parsed text. > > Note that `digit` is always the int value 0 through 9 (and subsequently the code point 48 through 57) when passed to `append`. > > Currently, `append` accepts a char which forces an int -> char -> byte conversion to be stored in `digits`. This can be simplified to int -> byte if the parameter type for the method is updated. The two call sites can safely make this swap. > > Tiers 1-3 and java.text JCK tests continue to pass with this change. OK, to avoid churn I'll close this PR and include these changes in a future PR in the area. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27300#issuecomment-3309879504 From jlu at openjdk.org Thu Sep 18 22:20:30 2025 From: jlu at openjdk.org (Justin Lu) Date: Thu, 18 Sep 2025 22:20:30 GMT Subject: Withdrawn: 8367703: Unneeded cast in java.text.DigitList.append In-Reply-To: <15UI-L234zW8DE6t_5jkhDrViTIGGlsb5dqT5lzkoys=.c2d06cd5-3d11-4c10-bcde-a490b4b218a7@github.com> References: <15UI-L234zW8DE6t_5jkhDrViTIGGlsb5dqT5lzkoys=.c2d06cd5-3d11-4c10-bcde-a490b4b218a7@github.com> Message-ID: On Mon, 15 Sep 2025 21:18:12 GMT, Justin Lu wrote: > During parse routines, DecimalFormat uses DigitList to append digits from the parsed text. > > Note that `digit` is always the int value 0 through 9 (and subsequently the code point 48 through 57) when passed to `append`. > > Currently, `append` accepts a char which forces an int -> char -> byte conversion to be stored in `digits`. This can be simplified to int -> byte if the parameter type for the method is updated. The two call sites can safely make this swap. > > Tiers 1-3 and java.text JCK tests continue to pass with this change. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/27300 From naoto at openjdk.org Thu Sep 18 22:22:14 2025 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 18 Sep 2025 22:22:14 GMT Subject: RFR: 8367901: Calendar.roll(hour, 24) returns wrong result [v2] In-Reply-To: References: Message-ID: <2UnqBqpjn67XIMoF2UMzHlCKiwx5_Lu81HpVVbe7MOs=.28259db7-2360-4db2-8c18-c9ba2cc817e9@github.com> On Thu, 18 Sep 2025 20:41:58 GMT, Justin Lu wrote: >> Please review this PR which addresses an edge case for `GregorianCalendar.roll(int, int)` when the rolled amount would cause the hour to remain the same as before the call. After this change, the expected hour is returned. That is, rolling a full cycle for HOUR (12 hours) and HOUR_OF_DAY (24 hours) should keep the hour the same as before the call. >> >> For example, a calendar with HOUR_OF_DAY == 15, >> >> >> cal.roll(Calendar.HOUR_OF_DAY, 23); >> cal.get(Calendar.HOUR_OF_DAY); // returns 14 >> >> >> cal.roll(Calendar.HOUR_OF_DAY, 24); >> // Incorrectly returns 16. A full cycle is expected to return the starting hour (15) >> cal.get(Calendar.HOUR_OF_DAY); >> >> >> cal.roll(Calendar.HOUR_OF_DAY, 25); >> cal.get(Calendar.HOUR_OF_DAY); // returns 16 > > Justin Lu has updated the pull request incrementally with two additional commits since the last revision: > > - + - to - in comment > - DST test cases + compute expected value as method + improve err msg LGTM test/jdk/java/util/Calendar/RollHoursTest.java line 73: > 71: calendars.get(0).set(2005, 8, 20, 12, 10, 25); > 72: > 73: // Transition to daylight savings time (CST/CDT) --- Nit: I think it is usually called "daylight saving time" ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27355#pullrequestreview-3242247888 PR Review Comment: https://git.openjdk.org/jdk/pull/27355#discussion_r2361302216 From jlu at openjdk.org Thu Sep 18 22:31:17 2025 From: jlu at openjdk.org (Justin Lu) Date: Thu, 18 Sep 2025 22:31:17 GMT Subject: RFR: 8367901: Calendar.roll(hour, 24) returns wrong result [v3] In-Reply-To: References: Message-ID: > Please review this PR which addresses an edge case for `GregorianCalendar.roll(int, int)` when the rolled amount would cause the hour to remain the same as before the call. After this change, the expected hour is returned. That is, rolling a full cycle for HOUR (12 hours) and HOUR_OF_DAY (24 hours) should keep the hour the same as before the call. > > For example, a calendar with HOUR_OF_DAY == 15, > > > cal.roll(Calendar.HOUR_OF_DAY, 23); > cal.get(Calendar.HOUR_OF_DAY); // returns 14 > > > cal.roll(Calendar.HOUR_OF_DAY, 24); > // Incorrectly returns 16. A full cycle is expected to return the starting hour (15) > cal.get(Calendar.HOUR_OF_DAY); > > > cal.roll(Calendar.HOUR_OF_DAY, 25); > cal.get(Calendar.HOUR_OF_DAY); // returns 16 Justin Lu has updated the pull request incrementally with one additional commit since the last revision: savings -> saving ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27355/files - new: https://git.openjdk.org/jdk/pull/27355/files/9316ca62..b4a34084 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27355&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27355&range=01-02 Stats: 5 lines in 1 file changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/27355.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27355/head:pull/27355 PR: https://git.openjdk.org/jdk/pull/27355 From naoto at openjdk.org Thu Sep 18 22:37:20 2025 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 18 Sep 2025 22:37:20 GMT Subject: RFR: 8367901: Calendar.roll(hour, 24) returns wrong result [v3] In-Reply-To: References: Message-ID: On Thu, 18 Sep 2025 22:31:17 GMT, Justin Lu wrote: >> Please review this PR which addresses an edge case for `GregorianCalendar.roll(int, int)` when the rolled amount would cause the hour to remain the same as before the call. After this change, the expected hour is returned. That is, rolling a full cycle for HOUR (12 hours) and HOUR_OF_DAY (24 hours) should keep the hour the same as before the call. >> >> For example, a calendar with HOUR_OF_DAY == 15, >> >> >> cal.roll(Calendar.HOUR_OF_DAY, 23); >> cal.get(Calendar.HOUR_OF_DAY); // returns 14 >> >> >> cal.roll(Calendar.HOUR_OF_DAY, 24); >> // Incorrectly returns 16. A full cycle is expected to return the starting hour (15) >> cal.get(Calendar.HOUR_OF_DAY); >> >> >> cal.roll(Calendar.HOUR_OF_DAY, 25); >> cal.get(Calendar.HOUR_OF_DAY); // returns 16 > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > savings -> saving Marked as reviewed by naoto (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27355#pullrequestreview-3242270886 From iris at openjdk.org Thu Sep 18 23:40:52 2025 From: iris at openjdk.org (Iris Clark) Date: Thu, 18 Sep 2025 23:40:52 GMT Subject: RFR: 8367901: Calendar.roll(hour, 24) returns wrong result [v3] In-Reply-To: References: Message-ID: On Thu, 18 Sep 2025 22:31:17 GMT, Justin Lu wrote: >> Please review this PR which addresses an edge case for `GregorianCalendar.roll(int, int)` when the rolled amount would cause the hour to remain the same as before the call. After this change, the expected hour is returned. That is, rolling a full cycle for HOUR (12 hours) and HOUR_OF_DAY (24 hours) should keep the hour the same as before the call. >> >> For example, a calendar with HOUR_OF_DAY == 15, >> >> >> cal.roll(Calendar.HOUR_OF_DAY, 23); >> cal.get(Calendar.HOUR_OF_DAY); // returns 14 >> >> >> cal.roll(Calendar.HOUR_OF_DAY, 24); >> // Incorrectly returns 16. A full cycle is expected to return the starting hour (15) >> cal.get(Calendar.HOUR_OF_DAY); >> >> >> cal.roll(Calendar.HOUR_OF_DAY, 25); >> cal.get(Calendar.HOUR_OF_DAY); // returns 16 > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > savings -> saving Marked as reviewed by iris (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27355#pullrequestreview-3242350227 From joehw at openjdk.org Fri Sep 19 16:33:42 2025 From: joehw at openjdk.org (Joe Wang) Date: Fri, 19 Sep 2025 16:33:42 GMT Subject: RFR: 8355522: Remove the `java.locale.useOldISOCodes` system property [v4] In-Reply-To: References: <6Ca8zNdgZWlcivQkpZjjp3rBFWIdyYzQEyKLeXDloVc=.4a5f20b8-49cf-4cea-962f-5b8e99f7b0af@github.com> Message-ID: <4wQG31YN6slC1CFuJ1BF1XSv2L3Z74bDFRNyY17CTaw=.fc79be95-990c-4719-a71a-463248ed52cb@github.com> On Wed, 23 Jul 2025 17:39:12 GMT, Naoto Sato wrote: >> This PR removes the system property deprecated in JDK 25. If the property is specified at runtime, a warning will be emitted at startup to inform the user that the value is ignored. A corresponding CSR has been drafted as well > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > Further wording refinement Marked as reviewed by joehw (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26419#pullrequestreview-3245786867 From swen at openjdk.org Sat Sep 20 00:39:38 2025 From: swen at openjdk.org (Shaojin Wen) Date: Sat, 20 Sep 2025 00:39:38 GMT Subject: RFR: 8368172: Make java.time.format.DateTimePrintContext immutable Message-ID: <5xcmzM6BhoL-zhBZc_TrRSDCKBrOMqq8bRcmihc1zpU=.732bd228-f9ff-43f0-9771-56645dab6cd2@github.com> I propose to make j.t.f.DateTimePrintContext immutable. Currently, DateTimePrintContext has only one mutable field, optional. This can be replaced by adding an optional parameter to the DateTimeFormatter.formatTo method. Immutable DateTimePrintContext can be optimized by escape analysis, such as immutable object optimization. ------------- Commit messages: - fix javadoc & copyright - Apply suggestion from @liach - add javadoc - add javadoc - stable DateTimePrintContext Changes: https://git.openjdk.org/jdk/pull/26913/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26913&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8368172 Stats: 84 lines in 3 files changed: 5 ins; 32 del; 47 mod Patch: https://git.openjdk.org/jdk/pull/26913.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26913/head:pull/26913 PR: https://git.openjdk.org/jdk/pull/26913 From liach at openjdk.org Sat Sep 20 00:39:41 2025 From: liach at openjdk.org (Chen Liang) Date: Sat, 20 Sep 2025 00:39:41 GMT Subject: RFR: 8368172: Make java.time.format.DateTimePrintContext immutable In-Reply-To: <5xcmzM6BhoL-zhBZc_TrRSDCKBrOMqq8bRcmihc1zpU=.732bd228-f9ff-43f0-9771-56645dab6cd2@github.com> References: <5xcmzM6BhoL-zhBZc_TrRSDCKBrOMqq8bRcmihc1zpU=.732bd228-f9ff-43f0-9771-56645dab6cd2@github.com> Message-ID: <_yKn8hyHqHI99iT0mRIPNFFdeGW9ba7zjdWunSLiato=.ca04fb6d-07d4-40a0-b543-1bff2444be8a@github.com> On Sat, 23 Aug 2025 11:27:55 GMT, Shaojin Wen wrote: > I propose to make j.t.f.DateTimePrintContext immutable. > > Currently, DateTimePrintContext has only one mutable field, optional. This can be replaced by adding an optional parameter to the DateTimeFormatter.formatTo method. > > Immutable DateTimePrintContext can be optimized by escape analysis, such as immutable object optimization. src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java line 2481: > 2479: * @throws DateTimeException if the date-time cannot be printed successfully > 2480: */ > 2481: boolean format(DateTimePrintContext context, StringBuilder buf, boolean optional); Please document this new parameter. src/java.base/share/classes/java/time/format/DateTimePrintContext.java line 1: > 1: /* You should update the implSpec tag because this is now thread safe. src/java.base/share/classes/java/time/format/DateTimePrintContext.java line 113: > 111: * @param formatter the formatter controlling the format, not null > 112: */ > 113: public DateTimePrintContext(TemporalAccessor temporal, DateTimeFormatter formatter) { Suggestion: DateTimePrintContext(TemporalAccessor temporal, DateTimeFormatter formatter) { Redundant. src/java.base/share/classes/java/time/format/DateTimePrintContext.java line 353: > 351: * @throws DateTimeException if the type is not available and the section is not optional > 352: */ > 353: R getValue(TemporalQuery query, boolean optional) { Please document the new parameter. Same for getValue(TemporalField, boolean). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26913#discussion_r2347790245 PR Review Comment: https://git.openjdk.org/jdk/pull/26913#discussion_r2361837731 PR Review Comment: https://git.openjdk.org/jdk/pull/26913#discussion_r2361838040 PR Review Comment: https://git.openjdk.org/jdk/pull/26913#discussion_r2347789766 From scolebourne at openjdk.org Sat Sep 20 08:09:15 2025 From: scolebourne at openjdk.org (Stephen Colebourne) Date: Sat, 20 Sep 2025 08:09:15 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v6] In-Reply-To: References: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> <_GyFprI68yEvF4sr22xSW-JMBxdH3Ed74lwo8cH3kAA=.17a57e7d-a700-4d1a-9877-0f942345c0aa@github.com> Message-ID: <2EMgaL-mIX0tyaou2kqxkN58qtFaIUhSmGlHL2bTaDI=.9b6bf3c7-e538-44c8-a1ae-97611bb637fd@github.com> On Thu, 18 Sep 2025 20:52:43 GMT, Pavel Rappo wrote: >> Okay -- while some of the changes here are clearly bugs, that doesn't obviate the need for a quick CSR review. >> >> Regarding _integer_ values, 0 is conventionally neither positive nor negative; it stands alone, hence Math.signum(int): >> >> "Returns the signum function of the specified int value. (The return value is -1 if the specified value is negative; 0 if the specified value is zero; and 1 if the specified value is positive.)" >> >> Therefore, "non-negative" integers include zero while "positive" integers do not. > > @jddarcy, are you okay with me pushing this without CSR? To my mind, it now contains typo fixes and editorial improvements only. @pavelrappo `Period.isNegative()` would be used in validation, to ensure that the period you are receiving only has components that are >= 0. One can certainly argue about the method name, but c'est la vie... ------------- PR Comment: https://git.openjdk.org/jdk/pull/27296#issuecomment-3314755059 From scolebourne at openjdk.org Sat Sep 20 11:08:19 2025 From: scolebourne at openjdk.org (Stephen Colebourne) Date: Sat, 20 Sep 2025 11:08:19 GMT Subject: RFR: 8368172: Make java.time.format.DateTimePrintContext immutable In-Reply-To: <5xcmzM6BhoL-zhBZc_TrRSDCKBrOMqq8bRcmihc1zpU=.732bd228-f9ff-43f0-9771-56645dab6cd2@github.com> References: <5xcmzM6BhoL-zhBZc_TrRSDCKBrOMqq8bRcmihc1zpU=.732bd228-f9ff-43f0-9771-56645dab6cd2@github.com> Message-ID: On Sat, 23 Aug 2025 11:27:55 GMT, Shaojin Wen wrote: > I propose to make j.t.f.DateTimePrintContext immutable. > > Currently, DateTimePrintContext has only one mutable field, optional. This can be replaced by adding an optional parameter to the DateTimeFormatter.formatTo method. > > Immutable DateTimePrintContext can be optimized by escape analysis, such as immutable object optimization. AFAICT this seems like a good change, thanks src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java line 2537: > 2535: optional |= this.optional; > 2536: for (DateTimePrinterParser pp : printerParsers) { > 2537: if (pp.format(context, buf, optional) == false) { Suggestion: boolean effectiveOptional = optional | this.optional; for (DateTimePrinterParser pp : printerParsers) { if (pp.format(context, buf, effectiveOptional) == false) { ------------- PR Review: https://git.openjdk.org/jdk/pull/26913#pullrequestreview-3248990792 PR Review Comment: https://git.openjdk.org/jdk/pull/26913#discussion_r2365585860 From prappo at openjdk.org Sat Sep 20 13:09:19 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Sat, 20 Sep 2025 13:09:19 GMT Subject: RFR: 8367704: Fix minor documentation issues in java.time.** [v6] In-Reply-To: <2EMgaL-mIX0tyaou2kqxkN58qtFaIUhSmGlHL2bTaDI=.9b6bf3c7-e538-44c8-a1ae-97611bb637fd@github.com> References: <10K0Zn0Pe7aIE41BpKu1yeXhygiOYaNQGoXSh0EhfkA=.df25b6cc-cfef-453d-a2a1-069634a5f65c@github.com> <_GyFprI68yEvF4sr22xSW-JMBxdH3Ed74lwo8cH3kAA=.17a57e7d-a700-4d1a-9877-0f942345c0aa@github.com> <2EMgaL-mIX0tyaou2kqxkN58qtFaIUhSmGlHL2bTaDI=.9b6bf3c7-e538-44c8-a1ae-97611bb637fd@github.com> Message-ID: On Sat, 20 Sep 2025 08:06:22 GMT, Stephen Colebourne wrote: > `Period.isNegative()` would be used in validation, to ensure that the period you are receiving only has components that are >= 0. One can certainly argue about the method name, but c'est la vie... I understand that it could be used for some sort of validation. But what is the usual action when `period.isNegative() == true`? If the period is non-negative, then the semantic is clear. However, if it is negative, then it's hard to understand what that means. For example, `Period.of(/* years */ 0, /* months */ 1, /* days */ -32)` is net-negative, but `Period.of(/* years */ 0, /* months */ 1, /* days */ -1)` is net-positive. It also probably depends on the chronology in use. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27296#issuecomment-3314959449 From rriggs at openjdk.org Sat Sep 20 14:07:23 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Sat, 20 Sep 2025 14:07:23 GMT Subject: RFR: 8368172: Make java.time.format.DateTimePrintContext immutable In-Reply-To: <5xcmzM6BhoL-zhBZc_TrRSDCKBrOMqq8bRcmihc1zpU=.732bd228-f9ff-43f0-9771-56645dab6cd2@github.com> References: <5xcmzM6BhoL-zhBZc_TrRSDCKBrOMqq8bRcmihc1zpU=.732bd228-f9ff-43f0-9771-56645dab6cd2@github.com> Message-ID: On Sat, 23 Aug 2025 11:27:55 GMT, Shaojin Wen wrote: > I propose to make j.t.f.DateTimePrintContext immutable. > > Currently, DateTimePrintContext has only one mutable field, optional. This can be replaced by adding an optional parameter to the DateTimeFormatter.formatTo method. > > Immutable DateTimePrintContext can be optimized by escape analysis, such as immutable object optimization. What is the performance data that makes justifies this change? Its not enough to just want to make things constant. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26913#issuecomment-3314990889 From swen at openjdk.org Sat Sep 20 14:32:03 2025 From: swen at openjdk.org (Shaojin Wen) Date: Sat, 20 Sep 2025 14:32:03 GMT Subject: RFR: 8368172: Make java.time.format.DateTimePrintContext immutable [v2] In-Reply-To: <5xcmzM6BhoL-zhBZc_TrRSDCKBrOMqq8bRcmihc1zpU=.732bd228-f9ff-43f0-9771-56645dab6cd2@github.com> References: <5xcmzM6BhoL-zhBZc_TrRSDCKBrOMqq8bRcmihc1zpU=.732bd228-f9ff-43f0-9771-56645dab6cd2@github.com> Message-ID: > I propose to make j.t.f.DateTimePrintContext immutable. > > Currently, DateTimePrintContext has only one mutable field, optional. This can be replaced by adding an optional parameter to the DateTimeFormatter.formatTo method. > > Immutable DateTimePrintContext can be optimized by escape analysis, such as immutable object optimization. Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: Update src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java Co-authored-by: Stephen Colebourne ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26913/files - new: https://git.openjdk.org/jdk/pull/26913/files/d3c43c57..6f07a475 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26913&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26913&range=00-01 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/26913.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26913/head:pull/26913 PR: https://git.openjdk.org/jdk/pull/26913 From swen at openjdk.org Sat Sep 20 14:39:20 2025 From: swen at openjdk.org (Shaojin Wen) Date: Sat, 20 Sep 2025 14:39:20 GMT Subject: RFR: 8368172: Make java.time.format.DateTimePrintContext immutable [v3] In-Reply-To: <5xcmzM6BhoL-zhBZc_TrRSDCKBrOMqq8bRcmihc1zpU=.732bd228-f9ff-43f0-9771-56645dab6cd2@github.com> References: <5xcmzM6BhoL-zhBZc_TrRSDCKBrOMqq8bRcmihc1zpU=.732bd228-f9ff-43f0-9771-56645dab6cd2@github.com> Message-ID: > I propose to make j.t.f.DateTimePrintContext immutable. > > Currently, DateTimePrintContext has only one mutable field, optional. This can be replaced by adding an optional parameter to the DateTimeFormatter.formatTo method. > > Immutable DateTimePrintContext can be optimized by escape analysis, such as immutable object optimization. Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: Improve code style in DateTimeFormatterBuilder.format method Co-authored-by: Qwen-Coder ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26913/files - new: https://git.openjdk.org/jdk/pull/26913/files/6f07a475..cac20038 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26913&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26913&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/26913.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26913/head:pull/26913 PR: https://git.openjdk.org/jdk/pull/26913 From swen at openjdk.org Sat Sep 20 16:54:19 2025 From: swen at openjdk.org (Shaojin Wen) Date: Sat, 20 Sep 2025 16:54:19 GMT Subject: RFR: 8368172: Make java.time.format.DateTimePrintContext immutable In-Reply-To: References: <5xcmzM6BhoL-zhBZc_TrRSDCKBrOMqq8bRcmihc1zpU=.732bd228-f9ff-43f0-9771-56645dab6cd2@github.com> Message-ID: On Sat, 20 Sep 2025 14:04:30 GMT, Roger Riggs wrote: > What is the performance data that makes justifies this change? Its not enough to just want to make things constant. The current branch is just a refactoring; there's no performance improvement on MacBook M1 Pro. Further changes are needed to enable the "EliminateAllocations" optimization to work, achieving the goal of eliminating the allocation of DateTimePrintContext and StringBuilder objects in the `j.t.f.DateTimeFormatter#format` method, thus resulting in significant performance improvements. My plan is to optimize the performance of `j.t.f.DateTimeFormatter#format`. I've put the proposed changes in Draft Pull Request #26807, but it's a major change, and would be difficult to review all at once. Therefore, I've broken this process down into multiple PRs, including the current PR #26913, another PR #26911, and the already merged PR #26633. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26913#issuecomment-3315100843 From jlu at openjdk.org Mon Sep 22 17:01:53 2025 From: jlu at openjdk.org (Justin Lu) Date: Mon, 22 Sep 2025 17:01:53 GMT Subject: RFR: 8367901: Calendar.roll(hour, 24) returns wrong result [v3] In-Reply-To: References: Message-ID: On Thu, 18 Sep 2025 22:31:17 GMT, Justin Lu wrote: >> Please review this PR which addresses an edge case for `GregorianCalendar.roll(int, int)` when the rolled amount would cause the hour to remain the same as before the call. After this change, the expected hour is returned. That is, rolling a full cycle for HOUR (12 hours) and HOUR_OF_DAY (24 hours) should keep the hour the same as before the call. >> >> For example, a calendar with HOUR_OF_DAY == 15, >> >> >> cal.roll(Calendar.HOUR_OF_DAY, 23); >> cal.get(Calendar.HOUR_OF_DAY); // returns 14 >> >> >> cal.roll(Calendar.HOUR_OF_DAY, 24); >> // Incorrectly returns 16. A full cycle is expected to return the starting hour (15) >> cal.get(Calendar.HOUR_OF_DAY); >> >> >> cal.roll(Calendar.HOUR_OF_DAY, 25); >> cal.get(Calendar.HOUR_OF_DAY); // returns 16 > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > savings -> saving Thanks for the reviews. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27355#issuecomment-3320184192 From jlu at openjdk.org Mon Sep 22 17:01:54 2025 From: jlu at openjdk.org (Justin Lu) Date: Mon, 22 Sep 2025 17:01:54 GMT Subject: Integrated: 8367901: Calendar.roll(hour, 24) returns wrong result In-Reply-To: References: Message-ID: On Wed, 17 Sep 2025 22:37:52 GMT, Justin Lu wrote: > Please review this PR which addresses an edge case for `GregorianCalendar.roll(int, int)` when the rolled amount would cause the hour to remain the same as before the call. After this change, the expected hour is returned. That is, rolling a full cycle for HOUR (12 hours) and HOUR_OF_DAY (24 hours) should keep the hour the same as before the call. > > For example, a calendar with HOUR_OF_DAY == 15, > > > cal.roll(Calendar.HOUR_OF_DAY, 23); > cal.get(Calendar.HOUR_OF_DAY); // returns 14 > > > cal.roll(Calendar.HOUR_OF_DAY, 24); > // Incorrectly returns 16. A full cycle is expected to return the starting hour (15) > cal.get(Calendar.HOUR_OF_DAY); > > > cal.roll(Calendar.HOUR_OF_DAY, 25); > cal.get(Calendar.HOUR_OF_DAY); // returns 16 This pull request has now been integrated. Changeset: ced3f13f Author: Justin Lu URL: https://git.openjdk.org/jdk/commit/ced3f13f4e036513444d1fea3958be11741c2b8e Stats: 144 lines in 2 files changed: 141 ins; 0 del; 3 mod 8367901: Calendar.roll(hour, 24) returns wrong result Reviewed-by: naoto, iris ------------- PR: https://git.openjdk.org/jdk/pull/27355 From jlu at openjdk.org Mon Sep 22 17:41:58 2025 From: jlu at openjdk.org (Justin Lu) Date: Mon, 22 Sep 2025 17:41:58 GMT Subject: RFR: 8368308: ISO 4217 Amendment 180 Update Message-ID: Please review this PR which incorporates ISO 4217 update 180 into the Currency data. Bulgaria (GMT+2) now transitions to Euro, effective on the 1st of January 2026. Changes also include removal of now defunct cut overs. ------------- Commit messages: - Removing the older entries - Use std time not dst - init Changes: https://git.openjdk.org/jdk/pull/27433/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27433&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8368308 Stats: 12 lines in 3 files changed: 0 ins; 0 del; 12 mod Patch: https://git.openjdk.org/jdk/pull/27433.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27433/head:pull/27433 PR: https://git.openjdk.org/jdk/pull/27433 From naoto at openjdk.org Mon Sep 22 18:20:19 2025 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 22 Sep 2025 18:20:19 GMT Subject: RFR: 8368308: ISO 4217 Amendment 180 Update In-Reply-To: References: Message-ID: On Mon, 22 Sep 2025 17:34:17 GMT, Justin Lu wrote: > Please review this PR which incorporates ISO 4217 update 180 into the Currency data. Bulgaria (GMT+2) now transitions to Euro, effective on the 1st of January 2026. Changes also include removal of now defunct cut overs. LGTM ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27433#pullrequestreview-3254440592 From iris at openjdk.org Mon Sep 22 18:20:20 2025 From: iris at openjdk.org (Iris Clark) Date: Mon, 22 Sep 2025 18:20:20 GMT Subject: RFR: 8368308: ISO 4217 Amendment 180 Update In-Reply-To: References: Message-ID: On Mon, 22 Sep 2025 17:34:17 GMT, Justin Lu wrote: > Please review this PR which incorporates ISO 4217 update 180 into the Currency data. Bulgaria (GMT+2) now transitions to Euro, effective on the 1st of January 2026. Changes also include removal of now defunct cut overs. Changes appear to reflect the most recent amendment. Thanks! ------------- Marked as reviewed by iris (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27433#pullrequestreview-3254446971 From jlu at openjdk.org Mon Sep 22 23:03:32 2025 From: jlu at openjdk.org (Justin Lu) Date: Mon, 22 Sep 2025 23:03:32 GMT Subject: RFR: 8368335: Refactor the rest of Locale TestNG based tests to JUnit Message-ID: Please review this PR which finishes the conversions of _TestNG_ to _JUnit_ within the Locale tests. (Primarily under bcp47u with a few other stragglers.) Tiers 1-3 pass and the same number of tests completed in the test results remain the same. test/jdk/java/util/Locale/LocaleMatchingTest.java test/jdk/java/util/Locale/RequiredAvailableLocalesTest.java test/jdk/java/util/Locale/TestOf.java test/jdk/java/util/Locale/bcp47u/CalendarTests.java test/jdk/java/util/Locale/bcp47u/CurrencyFormatTests.java test/jdk/java/util/Locale/bcp47u/CurrencyTests.java test/jdk/java/util/Locale/bcp47u/DisplayNameTests.java test/jdk/java/util/Locale/bcp47u/FormatTests.java test/jdk/java/util/Locale/bcp47u/SymbolsTests.java test/jdk/java/util/Locale/bcp47u/SystemPropertyTests.java ------------- Commit messages: - Straggler expected/actual param swap in FormatTests.java - init Changes: https://git.openjdk.org/jdk/pull/27441/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27441&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8368335 Stats: 308 lines in 10 files changed: 65 ins; 49 del; 194 mod Patch: https://git.openjdk.org/jdk/pull/27441.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27441/head:pull/27441 PR: https://git.openjdk.org/jdk/pull/27441 From liach at openjdk.org Tue Sep 23 16:35:42 2025 From: liach at openjdk.org (Chen Liang) Date: Tue, 23 Sep 2025 16:35:42 GMT Subject: RFR: 8368335: Refactor the rest of Locale TestNG based tests to JUnit In-Reply-To: References: Message-ID: <8TmO-Jkz5u5kgWapNZGbmaCxEpK60EjTfJ2bCsYsA2U=.54adda6d-2537-4af2-88b2-b8a90cc033c5@github.com> On Mon, 22 Sep 2025 22:56:55 GMT, Justin Lu wrote: > Please review this PR which finishes the conversions of _TestNG_ to _JUnit_ within the Locale tests. (Primarily under bcp47u with a few other stragglers.) Tests pass as before. The same number of tests completed in the test results section remain the same. > > test/jdk/java/util/Locale/LocaleMatchingTest.java > test/jdk/java/util/Locale/RequiredAvailableLocalesTest.java > test/jdk/java/util/Locale/TestOf.java > test/jdk/java/util/Locale/bcp47u/CalendarTests.java > test/jdk/java/util/Locale/bcp47u/CurrencyFormatTests.java > test/jdk/java/util/Locale/bcp47u/CurrencyTests.java > test/jdk/java/util/Locale/bcp47u/DisplayNameTests.java > test/jdk/java/util/Locale/bcp47u/FormatTests.java > test/jdk/java/util/Locale/bcp47u/SymbolsTests.java > test/jdk/java/util/Locale/bcp47u/SystemPropertyTests.java Marked as reviewed by liach (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27441#pullrequestreview-3258815087 From naoto at openjdk.org Tue Sep 23 17:09:13 2025 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 23 Sep 2025 17:09:13 GMT Subject: RFR: 8368335: Refactor the rest of Locale TestNG based tests to JUnit In-Reply-To: References: Message-ID: On Mon, 22 Sep 2025 22:56:55 GMT, Justin Lu wrote: > Please review this PR which finishes the conversions of _TestNG_ to _JUnit_ within the Locale tests. (Primarily under bcp47u with a few other stragglers.) Tests pass as before. The same number of tests completed in the test results section remain the same. > > test/jdk/java/util/Locale/LocaleMatchingTest.java > test/jdk/java/util/Locale/RequiredAvailableLocalesTest.java > test/jdk/java/util/Locale/TestOf.java > test/jdk/java/util/Locale/bcp47u/CalendarTests.java > test/jdk/java/util/Locale/bcp47u/CurrencyFormatTests.java > test/jdk/java/util/Locale/bcp47u/CurrencyTests.java > test/jdk/java/util/Locale/bcp47u/DisplayNameTests.java > test/jdk/java/util/Locale/bcp47u/FormatTests.java > test/jdk/java/util/Locale/bcp47u/SymbolsTests.java > test/jdk/java/util/Locale/bcp47u/SystemPropertyTests.java LGTM test/jdk/java/util/Locale/LocaleMatchingTest.java line 349: > 347: assertNotEquals(lr1, lr4, " LR(ja, 1.0).equals(LR(en, 1.0)) should return false."); > 348: assertNotNull(lr1, " LR(ja, 1.0).equals(null) should return false."); > 349: assertNotEquals("", lr1, " LR(ja, 1.0).equals(\"\") should return false."); Nit: If we change the unexpected and actual, probably do the same for L346/347 ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27441#pullrequestreview-3258892144 PR Review Comment: https://git.openjdk.org/jdk/pull/27441#discussion_r2372938597 From jlu at openjdk.org Tue Sep 23 18:25:54 2025 From: jlu at openjdk.org (Justin Lu) Date: Tue, 23 Sep 2025 18:25:54 GMT Subject: RFR: 8368335: Refactor the rest of Locale TestNG based tests to JUnit [v2] In-Reply-To: References: Message-ID: On Tue, 23 Sep 2025 16:56:37 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional commit since the last revision: >> >> Swap other args in assertions in LocaleMatchingTest > > test/jdk/java/util/Locale/LocaleMatchingTest.java line 349: > >> 347: assertNotEquals(lr1, lr4, " LR(ja, 1.0).equals(LR(en, 1.0)) should return false."); >> 348: assertNotNull(lr1, " LR(ja, 1.0).equals(null) should return false."); >> 349: assertNotEquals("", lr1, " LR(ja, 1.0).equals(\"\") should return false."); > > Nit: If we change the unexpected and actual, probably do the same for L346/347 I had originally left L345-347 untouched because it seemed like one of those cases where there wasn't a clear expected/unexpected (compared to the `""` in L349). But you are right that it would be consistent and no reason to not do so considering the opposite _actual_ vs _expected_ positioning of TestNG vs JUnit. Fixed in https://github.com/openjdk/jdk/pull/27441/commits/aef3447704fabe43348dfe2fdfd4d1731515571b. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27441#discussion_r2373123586 From jlu at openjdk.org Tue Sep 23 18:25:53 2025 From: jlu at openjdk.org (Justin Lu) Date: Tue, 23 Sep 2025 18:25:53 GMT Subject: RFR: 8368335: Refactor the rest of Locale TestNG based tests to JUnit [v2] In-Reply-To: References: Message-ID: > Please review this PR which finishes the conversions of _TestNG_ to _JUnit_ within the Locale tests. (Primarily under bcp47u with a few other stragglers.) Tests pass as before. The same number of tests completed in the test results section remain the same. > > test/jdk/java/util/Locale/LocaleMatchingTest.java > test/jdk/java/util/Locale/RequiredAvailableLocalesTest.java > test/jdk/java/util/Locale/TestOf.java > test/jdk/java/util/Locale/bcp47u/CalendarTests.java > test/jdk/java/util/Locale/bcp47u/CurrencyFormatTests.java > test/jdk/java/util/Locale/bcp47u/CurrencyTests.java > test/jdk/java/util/Locale/bcp47u/DisplayNameTests.java > test/jdk/java/util/Locale/bcp47u/FormatTests.java > test/jdk/java/util/Locale/bcp47u/SymbolsTests.java > test/jdk/java/util/Locale/bcp47u/SystemPropertyTests.java Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Swap other args in assertions in LocaleMatchingTest ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27441/files - new: https://git.openjdk.org/jdk/pull/27441/files/b7eb4398..aef34477 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27441&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27441&range=00-01 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/27441.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27441/head:pull/27441 PR: https://git.openjdk.org/jdk/pull/27441 From naoto at openjdk.org Tue Sep 23 18:50:41 2025 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 23 Sep 2025 18:50:41 GMT Subject: RFR: 8368335: Refactor the rest of Locale TestNG based tests to JUnit [v2] In-Reply-To: References: Message-ID: On Tue, 23 Sep 2025 18:25:53 GMT, Justin Lu wrote: >> Please review this PR which finishes the conversions of _TestNG_ to _JUnit_ within the Locale tests. (Primarily under bcp47u with a few other stragglers.) Tests pass as before. The same number of tests completed in the test results section remain the same. >> >> test/jdk/java/util/Locale/LocaleMatchingTest.java >> test/jdk/java/util/Locale/RequiredAvailableLocalesTest.java >> test/jdk/java/util/Locale/TestOf.java >> test/jdk/java/util/Locale/bcp47u/CalendarTests.java >> test/jdk/java/util/Locale/bcp47u/CurrencyFormatTests.java >> test/jdk/java/util/Locale/bcp47u/CurrencyTests.java >> test/jdk/java/util/Locale/bcp47u/DisplayNameTests.java >> test/jdk/java/util/Locale/bcp47u/FormatTests.java >> test/jdk/java/util/Locale/bcp47u/SymbolsTests.java >> test/jdk/java/util/Locale/bcp47u/SystemPropertyTests.java > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Swap other args in assertions in LocaleMatchingTest Marked as reviewed by naoto (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27441#pullrequestreview-3259219009 From jlu at openjdk.org Tue Sep 23 22:04:41 2025 From: jlu at openjdk.org (Justin Lu) Date: Tue, 23 Sep 2025 22:04:41 GMT Subject: RFR: 8368498: Use JUnit instead of TestNG for jdk_text tests Message-ID: Please review this PR which converts all the _TestNG_ based tests under jdk_text to use _JUnit_. The changes are done in the following order, - https://github.com/openjdk/jdk/commit/a7840e72269202dfca99d5ce5109bd4f7af0f578: Conversions automated via [script](https://github.com/lahodaj/netbeans/tree/19515c3e2dbc07d977ca227d933197f856121ae5/java/java.openjdk.project/junit-convert). - https://github.com/openjdk/jdk/commit/2466c5ee970965e57978d8b55b5b7dcad6c2aa6c: Updating to default recommended visibility of test methods + data providers. Cleaning up imports. - https://github.com/openjdk/jdk/commit/27c439804db61e26d48d7239fd28c99258cb4a9f: Copyright years updated. ------------- Commit messages: - Copyright years - Import/visiblity cleanup - Automated changes Changes: https://git.openjdk.org/jdk/pull/27460/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27460&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8368498 Stats: 569 lines in 21 files changed: 194 ins; 81 del; 294 mod Patch: https://git.openjdk.org/jdk/pull/27460.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27460/head:pull/27460 PR: https://git.openjdk.org/jdk/pull/27460 From coffeys at openjdk.org Wed Sep 24 08:04:42 2025 From: coffeys at openjdk.org (Sean Coffey) Date: Wed, 24 Sep 2025 08:04:42 GMT Subject: RFR: 8368308: ISO 4217 Amendment 180 Update In-Reply-To: References: Message-ID: <0H7N7eqD3WSjPVISprHrZvehkf9L_Ww3ig3IVF6u8oA=.16ec77d5-bfac-4f16-ab01-b9dcd2009f5b@github.com> On Mon, 22 Sep 2025 17:34:17 GMT, Justin Lu wrote: > Please review this PR which incorporates ISO 4217 update 180 into the Currency data. Bulgaria (GMT+2) now transitions to Euro, effective on the 1st of January 2026. Changes also include removal of now defunct cut overs. Marked as reviewed by coffeys (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27433#pullrequestreview-3261611437 From rgiulietti at openjdk.org Wed Sep 24 09:51:23 2025 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Wed, 24 Sep 2025 09:51:23 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v3] In-Reply-To: <88vSo4iHwx47hKJ2whkClMWAP5xunklbIH2StcsGTlM=.83f9e6aa-ecaf-4455-86c2-7b6c8f370517@github.com> References: <88vSo4iHwx47hKJ2whkClMWAP5xunklbIH2StcsGTlM=.83f9e6aa-ecaf-4455-86c2-7b6c8f370517@github.com> Message-ID: On Fri, 12 Sep 2025 22:44:54 GMT, Johannes Graham wrote: >> When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. >> >> This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. > > Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: > > VALUES_SIZE Otherwise looks good src/java.base/share/classes/java/text/DigitList.java line 326: > 324: boolean hasBeenRoundedUp = fdConverter.digitsRoundedUp(); > 325: boolean valueExactAsDecimal = fdConverter.decimalDigitsExact(); > 326: assert !fdConverter.isExceptional(); Maybe move this `assert` line at method entry. ------------- PR Review: https://git.openjdk.org/jdk/pull/27118#pullrequestreview-3261696562 PR Review Comment: https://git.openjdk.org/jdk/pull/27118#discussion_r2374926890 From rgiulietti at openjdk.org Wed Sep 24 09:51:25 2025 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Wed, 24 Sep 2025 09:51:25 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v3] In-Reply-To: <9fwe7YcFQM19gM4JMrH92REwpKxbdVjChQGZdkgjPk8=.3fc0b5d0-7248-4fc8-8a47-7ad692073076@github.com> References: <9fwe7YcFQM19gM4JMrH92REwpKxbdVjChQGZdkgjPk8=.3fc0b5d0-7248-4fc8-8a47-7ad692073076@github.com> Message-ID: On Wed, 10 Sep 2025 23:54:31 GMT, Johannes Graham wrote: >> src/java.base/share/classes/java/math/BigInteger.java line 4184: >> >>> 4182: >>> 4183: if (fitsIntoLong()) { >>> 4184: return Long.toString(longValue(), radix); >> >> We may want to consider separating this `BigInteger` fast path from this PR/change, since it is independent of the speedup in the `DigitList` changes. Others may not have a problem with it though, so maybe we can wait and see what they say. > > Without the fast-path, there was a performance drop with the "small" BigDecimals (from memory about 10%). That's what drove me to tinker with `BigInteger.toString`. But if this one can stand on its own, despite the perf drop, I'm happy to separate out the BigInteger part. I'll generate some new perf numbers after the Level.Invocation fix. @j3graham @justin-curtis-lu I'm fine with this change going in this PR. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27118#discussion_r2374921602 From rgiulietti at openjdk.org Wed Sep 24 09:51:27 2025 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Wed, 24 Sep 2025 09:51:27 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v3] In-Reply-To: References: <88vSo4iHwx47hKJ2whkClMWAP5xunklbIH2StcsGTlM=.83f9e6aa-ecaf-4455-86c2-7b6c8f370517@github.com> Message-ID: On Sun, 14 Sep 2025 04:56:37 GMT, Shaojin Wen wrote: >> Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: >> >> VALUES_SIZE > > src/java.base/share/classes/java/text/DigitList.java line 732: > >> 730: >> 731: // The digit part of -9223372036854775808L >> 732: private static final byte[] LONG_MIN_REP = "9223372036854775808".getBytes(StandardCharsets.ISO_8859_1); > > add `@Stable` here @j3graham Please consider @wenshao's suggestion. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27118#discussion_r2374930678 From duke at openjdk.org Wed Sep 24 14:11:06 2025 From: duke at openjdk.org (Johannes Graham) Date: Wed, 24 Sep 2025 14:11:06 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v4] In-Reply-To: References: Message-ID: > When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. > > This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: address review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27118/files - new: https://git.openjdk.org/jdk/pull/27118/files/47eb0a89..e1bbe19d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27118&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27118&range=02-03 Stats: 5 lines in 1 file changed: 4 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/27118.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27118/head:pull/27118 PR: https://git.openjdk.org/jdk/pull/27118 From duke at openjdk.org Wed Sep 24 14:43:40 2025 From: duke at openjdk.org (Johannes Graham) Date: Wed, 24 Sep 2025 14:43:40 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v3] In-Reply-To: References: <88vSo4iHwx47hKJ2whkClMWAP5xunklbIH2StcsGTlM=.83f9e6aa-ecaf-4455-86c2-7b6c8f370517@github.com> Message-ID: <3YWD_2z2jiDTe-cZOU_azzuREGmnUtx_-5k80aKj6Ew=.104bf14e-0a00-48a7-8300-5539fbcbdaed@github.com> On Wed, 24 Sep 2025 08:21:33 GMT, Raffaello Giulietti wrote: >> Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: >> >> VALUES_SIZE > > src/java.base/share/classes/java/text/DigitList.java line 326: > >> 324: boolean hasBeenRoundedUp = fdConverter.digitsRoundedUp(); >> 325: boolean valueExactAsDecimal = fdConverter.decimalDigitsExact(); >> 326: assert !fdConverter.isExceptional(); > > Maybe move this `assert` line at method entry. I moved it up as high as it can go. Alternatively, could be replaced with an assertion against the `source` parameter - `assert Double.isFinite(source)` ? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27118#discussion_r2376043188 From rgiulietti at openjdk.org Wed Sep 24 14:46:52 2025 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Wed, 24 Sep 2025 14:46:52 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v3] In-Reply-To: <3YWD_2z2jiDTe-cZOU_azzuREGmnUtx_-5k80aKj6Ew=.104bf14e-0a00-48a7-8300-5539fbcbdaed@github.com> References: <88vSo4iHwx47hKJ2whkClMWAP5xunklbIH2StcsGTlM=.83f9e6aa-ecaf-4455-86c2-7b6c8f370517@github.com> <3YWD_2z2jiDTe-cZOU_azzuREGmnUtx_-5k80aKj6Ew=.104bf14e-0a00-48a7-8300-5539fbcbdaed@github.com> Message-ID: On Wed, 24 Sep 2025 14:41:07 GMT, Johannes Graham wrote: >> src/java.base/share/classes/java/text/DigitList.java line 326: >> >>> 324: boolean hasBeenRoundedUp = fdConverter.digitsRoundedUp(); >>> 325: boolean valueExactAsDecimal = fdConverter.decimalDigitsExact(); >>> 326: assert !fdConverter.isExceptional(); >> >> Maybe move this `assert` line at method entry. > > I moved it up as high as it can go. Alternatively, could be replaced with an assertion against the `source` parameter - `assert Double.isFinite(source)` ? Even better! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27118#discussion_r2376052985 From duke at openjdk.org Wed Sep 24 14:59:05 2025 From: duke at openjdk.org (Johannes Graham) Date: Wed, 24 Sep 2025 14:59:05 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v5] In-Reply-To: References: Message-ID: > When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. > > This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: update assert ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27118/files - new: https://git.openjdk.org/jdk/pull/27118/files/e1bbe19d..52bd4eaf Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27118&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27118&range=03-04 Stats: 4 lines in 1 file changed: 2 ins; 2 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/27118.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27118/head:pull/27118 PR: https://git.openjdk.org/jdk/pull/27118 From jlu at openjdk.org Wed Sep 24 16:10:04 2025 From: jlu at openjdk.org (Justin Lu) Date: Wed, 24 Sep 2025 16:10:04 GMT Subject: RFR: 8368308: ISO 4217 Amendment 180 Update In-Reply-To: References: Message-ID: <61oDi2zWLrrz7gO9nJWoSzGdO5ALOknNGN4uT4pjbGc=.680fae5e-14d0-42f1-995c-a886af622875@github.com> On Mon, 22 Sep 2025 17:34:17 GMT, Justin Lu wrote: > Please review this PR which incorporates ISO 4217 update 180 into the Currency data. Bulgaria (GMT+2) now transitions to Euro, effective on the 1st of January 2026. Changes also include removal of now defunct cut overs. Thank you all for the reviews. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27433#issuecomment-3329691123 From jlu at openjdk.org Wed Sep 24 16:10:05 2025 From: jlu at openjdk.org (Justin Lu) Date: Wed, 24 Sep 2025 16:10:05 GMT Subject: Integrated: 8368308: ISO 4217 Amendment 180 Update In-Reply-To: References: Message-ID: <952aC6htgN809RRqUjDAjWroantx299yT9QTITR9E_k=.e45b3af4-ff2c-4366-b49f-900102e241e8@github.com> On Mon, 22 Sep 2025 17:34:17 GMT, Justin Lu wrote: > Please review this PR which incorporates ISO 4217 update 180 into the Currency data. Bulgaria (GMT+2) now transitions to Euro, effective on the 1st of January 2026. Changes also include removal of now defunct cut overs. This pull request has now been integrated. Changeset: 85f5bf3f Author: Justin Lu URL: https://git.openjdk.org/jdk/commit/85f5bf3f415cc3d44d1618ec574e73f846bb91c4 Stats: 12 lines in 3 files changed: 0 ins; 0 del; 12 mod 8368308: ISO 4217 Amendment 180 Update Reviewed-by: naoto, iris, coffeys ------------- PR: https://git.openjdk.org/jdk/pull/27433 From rriggs at openjdk.org Wed Sep 24 17:06:55 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 24 Sep 2025 17:06:55 GMT Subject: RFR: 8368172: Make java.time.format.DateTimePrintContext immutable [v3] In-Reply-To: References: <5xcmzM6BhoL-zhBZc_TrRSDCKBrOMqq8bRcmihc1zpU=.732bd228-f9ff-43f0-9771-56645dab6cd2@github.com> Message-ID: On Sat, 20 Sep 2025 14:39:20 GMT, Shaojin Wen wrote: >> I propose to make j.t.f.DateTimePrintContext immutable. >> >> Currently, DateTimePrintContext has only one mutable field, optional. This can be replaced by adding an optional parameter to the DateTimeFormatter.formatTo method. >> >> Immutable DateTimePrintContext can be optimized by escape analysis, such as immutable object optimization. > > Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: > > Improve code style in DateTimeFormatterBuilder.format method > > Co-authored-by: Qwen-Coder This change proposes to make every PrinterParser necessarily handle the optionality that is supported by a few printer parsers. For some, like literals, it makes no sense at all. It adds complexity to the PrinterParser interface. The optionality for nesting of printer parsers is currently handled by counting the depth in the DateTimePrintContext. Is there another way that the optionality in a DateTimeContext can be passed on nesting without adding an argument everywhere? Supposing the optional field in DateTimePrintContext could be `final boolean` and when optionality is needed, a copy be made with `optional = true` and passed to the nested printer. This technique is already used for `appendOptional`. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26913#issuecomment-3329887310 From naoto at openjdk.org Wed Sep 24 17:44:26 2025 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 24 Sep 2025 17:44:26 GMT Subject: RFR: 8368328: CompactNumberFormat.clone does not produce independent instances Message-ID: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> Fixing `CompactNumberFormat.clone()` to clone mutable reference objects. The bug was caused by accessing the shared objects concurrently which resulted in an illegal state on parsing. There are other reference fields that are shared, but the contents of those fields (such as prefix/suffix) are constants/read-only, so they may be shared. ------------- Commit messages: - initial commit Changes: https://git.openjdk.org/jdk/pull/27475/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27475&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8368328 Stats: 98 lines in 2 files changed: 97 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/27475.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27475/head:pull/27475 PR: https://git.openjdk.org/jdk/pull/27475 From rgiulietti at openjdk.org Wed Sep 24 17:46:58 2025 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Wed, 24 Sep 2025 17:46:58 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v5] In-Reply-To: References: Message-ID: On Wed, 24 Sep 2025 14:59:05 GMT, Johannes Graham wrote: >> When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. >> >> This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. > > Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: > > update assert Thanks @j3graham for your contribution! The community will appreciate. ------------- Marked as reviewed by rgiulietti (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27118#pullrequestreview-3263991767 From naoto at openjdk.org Wed Sep 24 18:10:08 2025 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 24 Sep 2025 18:10:08 GMT Subject: RFR: 8368498: Use JUnit instead of TestNG for jdk_text tests In-Reply-To: References: Message-ID: On Tue, 23 Sep 2025 21:58:56 GMT, Justin Lu wrote: > Please review this PR which converts all the _TestNG_ based tests under jdk_text to use _JUnit_. > > The changes are done in the following order, > > - https://github.com/openjdk/jdk/commit/a7840e72269202dfca99d5ce5109bd4f7af0f578: Conversions automated via [script](https://github.com/lahodaj/netbeans/tree/19515c3e2dbc07d977ca227d933197f856121ae5/java/java.openjdk.project/junit-convert). > - https://github.com/openjdk/jdk/commit/2466c5ee970965e57978d8b55b5b7dcad6c2aa6c: Updating to default recommended visibility of test methods + data providers. Cleaning up imports. > - https://github.com/openjdk/jdk/commit/27c439804db61e26d48d7239fd28c99258cb4a9f: Copyright years updated. LGTM test/jdk/java/text/Format/CompactNumberFormat/TestUExtensionOverride.java line 36: > 34: import org.junit.jupiter.params.ParameterizedTest; > 35: import org.junit.jupiter.params.provider.MethodSource; > 36: Probably done with the script, but it's interesting it would put junit impots before java's. ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27460#pullrequestreview-3264097251 PR Review Comment: https://git.openjdk.org/jdk/pull/27460#discussion_r2376648699 From jlu at openjdk.org Wed Sep 24 18:19:56 2025 From: jlu at openjdk.org (Justin Lu) Date: Wed, 24 Sep 2025 18:19:56 GMT Subject: RFR: 8368498: Use JUnit instead of TestNG for jdk_text tests In-Reply-To: References: Message-ID: On Wed, 24 Sep 2025 18:05:56 GMT, Naoto Sato wrote: >> Please review this PR which converts all the _TestNG_ based tests under jdk_text to use _JUnit_. >> >> The changes are done in the following order, >> >> - https://github.com/openjdk/jdk/commit/a7840e72269202dfca99d5ce5109bd4f7af0f578: Conversions automated via [script](https://github.com/lahodaj/netbeans/tree/19515c3e2dbc07d977ca227d933197f856121ae5/java/java.openjdk.project/junit-convert). >> - https://github.com/openjdk/jdk/commit/2466c5ee970965e57978d8b55b5b7dcad6c2aa6c: Updating to default recommended visibility of test methods + data providers. Cleaning up imports. >> - https://github.com/openjdk/jdk/commit/27c439804db61e26d48d7239fd28c99258cb4a9f: Copyright years updated. > > test/jdk/java/text/Format/CompactNumberFormat/TestUExtensionOverride.java line 36: > >> 34: import org.junit.jupiter.params.ParameterizedTest; >> 35: import org.junit.jupiter.params.provider.MethodSource; >> 36: > > Probably done with the script, but it's interesting it would put junit impots before java's. Actually, the import changes were done based off my default IntelliJ settings for optimize/clean imports. Before conversion, the TestNG tests had cases where the _org.testng.*_ imports were both above and below the _java.*_ imports. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27460#discussion_r2376672149 From naoto at openjdk.org Wed Sep 24 18:19:57 2025 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 24 Sep 2025 18:19:57 GMT Subject: RFR: 8368498: Use JUnit instead of TestNG for jdk_text tests In-Reply-To: References: Message-ID: On Wed, 24 Sep 2025 18:13:30 GMT, Justin Lu wrote: >> test/jdk/java/text/Format/CompactNumberFormat/TestUExtensionOverride.java line 36: >> >>> 34: import org.junit.jupiter.params.ParameterizedTest; >>> 35: import org.junit.jupiter.params.provider.MethodSource; >>> 36: >> >> Probably done with the script, but it's interesting it would put junit impots before java's. > > Actually, the import changes were done based off my default IntelliJ settings for optimize/clean imports. Before conversion, the TestNG tests had cases where the _org.testng.*_ imports were both above and below the _java.*_ imports. OK, yes I knew IntelliJ does such ordering, and probably that is why there's variety of orderings. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27460#discussion_r2376680255 From jlu at openjdk.org Wed Sep 24 18:33:46 2025 From: jlu at openjdk.org (Justin Lu) Date: Wed, 24 Sep 2025 18:33:46 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v5] In-Reply-To: References: Message-ID: On Wed, 24 Sep 2025 14:59:05 GMT, Johannes Graham wrote: >> When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. >> >> This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. > > Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: > > update assert Looks good, thanks for your changes and fast updates. ------------- Marked as reviewed by jlu (Committer). PR Review: https://git.openjdk.org/jdk/pull/27118#pullrequestreview-3264180820 From jlu at openjdk.org Wed Sep 24 19:32:29 2025 From: jlu at openjdk.org (Justin Lu) Date: Wed, 24 Sep 2025 19:32:29 GMT Subject: RFR: 8368335: Refactor the rest of Locale TestNG based tests to JUnit [v2] In-Reply-To: References: Message-ID: On Tue, 23 Sep 2025 18:25:53 GMT, Justin Lu wrote: >> Please review this PR which finishes the conversions of _TestNG_ to _JUnit_ within the Locale tests. (Primarily under bcp47u with a few other stragglers.) Tests pass as before. The same number of tests completed in the test results section remain the same. >> >> test/jdk/java/util/Locale/LocaleMatchingTest.java >> test/jdk/java/util/Locale/RequiredAvailableLocalesTest.java >> test/jdk/java/util/Locale/TestOf.java >> test/jdk/java/util/Locale/bcp47u/CalendarTests.java >> test/jdk/java/util/Locale/bcp47u/CurrencyFormatTests.java >> test/jdk/java/util/Locale/bcp47u/CurrencyTests.java >> test/jdk/java/util/Locale/bcp47u/DisplayNameTests.java >> test/jdk/java/util/Locale/bcp47u/FormatTests.java >> test/jdk/java/util/Locale/bcp47u/SymbolsTests.java >> test/jdk/java/util/Locale/bcp47u/SystemPropertyTests.java > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Swap other args in assertions in LocaleMatchingTest Thank you for the reviews. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27441#issuecomment-3330359665 From jlu at openjdk.org Wed Sep 24 19:32:30 2025 From: jlu at openjdk.org (Justin Lu) Date: Wed, 24 Sep 2025 19:32:30 GMT Subject: Integrated: 8368335: Refactor the rest of Locale TestNG based tests to JUnit In-Reply-To: References: Message-ID: On Mon, 22 Sep 2025 22:56:55 GMT, Justin Lu wrote: > Please review this PR which finishes the conversions of _TestNG_ to _JUnit_ within the Locale tests. (Primarily under bcp47u with a few other stragglers.) Tests pass as before. The same number of tests completed in the test results section remain the same. > > test/jdk/java/util/Locale/LocaleMatchingTest.java > test/jdk/java/util/Locale/RequiredAvailableLocalesTest.java > test/jdk/java/util/Locale/TestOf.java > test/jdk/java/util/Locale/bcp47u/CalendarTests.java > test/jdk/java/util/Locale/bcp47u/CurrencyFormatTests.java > test/jdk/java/util/Locale/bcp47u/CurrencyTests.java > test/jdk/java/util/Locale/bcp47u/DisplayNameTests.java > test/jdk/java/util/Locale/bcp47u/FormatTests.java > test/jdk/java/util/Locale/bcp47u/SymbolsTests.java > test/jdk/java/util/Locale/bcp47u/SystemPropertyTests.java This pull request has now been integrated. Changeset: 5d932420 Author: Justin Lu URL: https://git.openjdk.org/jdk/commit/5d93242028dfc68b838a8efb0fbc4de3fea7fa0d Stats: 311 lines in 10 files changed: 65 ins; 49 del; 197 mod 8368335: Refactor the rest of Locale TestNG based tests to JUnit Reviewed-by: naoto, liach ------------- PR: https://git.openjdk.org/jdk/pull/27441 From jlu at openjdk.org Wed Sep 24 21:04:52 2025 From: jlu at openjdk.org (Justin Lu) Date: Wed, 24 Sep 2025 21:04:52 GMT Subject: RFR: 8368328: CompactNumberFormat.clone does not produce independent instances In-Reply-To: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> References: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> Message-ID: On Wed, 24 Sep 2025 17:37:59 GMT, Naoto Sato wrote: > Fixing `CompactNumberFormat.clone()` to clone mutable reference objects. The bug was caused by accessing the shared objects concurrently which resulted in an illegal state on parsing. There are other reference fields that are shared, but the contents of those fields (such as prefix/suffix) are constants/read-only, so they may be shared. test/jdk/java/text/Format/CompactNumberFormat/TestClone.java line 62: > 60: } catch (ParseException pe) { > 61: throw new RuntimeException(pe); > 62: } Can replace the try/catch with `assertDoesNotThrow(() -> assertEquals(num, clone.parse(String.valueOf(num)).intValue()));` test/jdk/java/text/Format/CompactNumberFormat/TestClone.java line 77: > 75: private static Stream referenceFields() throws ClassNotFoundException { > 76: return Stream.of( > 77: Arguments.of("decimalFormat", DecimalFormat.class), We should also include `Arguments.of("symbols", DecimalFormatSymbols.class)` as an entry. test/jdk/java/text/Format/CompactNumberFormat/TestClone.java line 87: > 85: @MethodSource("referenceFields") > 86: void whiteBoxTest(String fieldName, Class type) throws Throwable { > 87: var original= NumberFormat.getCompactNumberInstance(Locale.US, NumberFormat.Style.SHORT); Suggestion: var original = NumberFormat.getCompactNumberInstance(Locale.US, NumberFormat.Style.SHORT); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27475#discussion_r2377012157 PR Review Comment: https://git.openjdk.org/jdk/pull/27475#discussion_r2377017033 PR Review Comment: https://git.openjdk.org/jdk/pull/27475#discussion_r2377018396 From jlu at openjdk.org Wed Sep 24 21:36:43 2025 From: jlu at openjdk.org (Justin Lu) Date: Wed, 24 Sep 2025 21:36:43 GMT Subject: RFR: 8368328: CompactNumberFormat.clone does not produce independent instances In-Reply-To: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> References: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> Message-ID: On Wed, 24 Sep 2025 17:37:59 GMT, Naoto Sato wrote: > Fixing `CompactNumberFormat.clone()` to clone mutable reference objects. The bug was caused by accessing the shared objects concurrently which resulted in an illegal state on parsing. There are other reference fields that are shared, but the contents of those fields (such as prefix/suffix) are constants/read-only, so they may be shared. src/java.base/share/classes/java/text/CompactNumberFormat.java line 2508: > 2506: @Override > 2507: public CompactNumberFormat clone() { > 2508: CompactNumberFormat other = (CompactNumberFormat) super.clone(); Maybe a comment indicating why we don't need to handle the `List` fields would be helpful for maintainers. (Since they are read-only after construction.) Otherwise we have to dig around the use sites to figure that out. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27475#discussion_r2377131363 From naoto at openjdk.org Wed Sep 24 22:48:39 2025 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 24 Sep 2025 22:48:39 GMT Subject: RFR: 8368328: CompactNumberFormat.clone does not produce independent instances [v2] In-Reply-To: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> References: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> Message-ID: > Fixing `CompactNumberFormat.clone()` to clone mutable reference objects. The bug was caused by accessing the shared objects concurrently which resulted in an illegal state on parsing. There are other reference fields that are shared, but the contents of those fields (such as prefix/suffix) are constants/read-only, so they may be shared. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Reflects review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27475/files - new: https://git.openjdk.org/jdk/pull/27475/files/21591749..207fed5b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27475&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27475&range=00-01 Stats: 14 lines in 2 files changed: 7 ins; 4 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/27475.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27475/head:pull/27475 PR: https://git.openjdk.org/jdk/pull/27475 From naoto at openjdk.org Wed Sep 24 22:55:41 2025 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 24 Sep 2025 22:55:41 GMT Subject: RFR: 8368328: CompactNumberFormat.clone does not produce independent instances [v2] In-Reply-To: References: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> Message-ID: <3oJ5vrUCyoixGo3ADdYY29KGvmxRA4F_A09HxzSKeYE=.dc71caf6-7e73-4ba9-ae55-c77fa0e7df11@github.com> On Wed, 24 Sep 2025 21:34:28 GMT, Justin Lu wrote: >> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: >> >> Reflects review comments > > src/java.base/share/classes/java/text/CompactNumberFormat.java line 2508: > >> 2506: @Override >> 2507: public CompactNumberFormat clone() { >> 2508: CompactNumberFormat other = (CompactNumberFormat) super.clone(); > > Maybe a comment indicating why we don't need to handle the `List` fields would be helpful for maintainers. (Since they are read-only after construction.) Otherwise we have to dig around the use sites to figure that out. Good point. Added some explanation. > test/jdk/java/text/Format/CompactNumberFormat/TestClone.java line 77: > >> 75: private static Stream referenceFields() throws ClassNotFoundException { >> 76: return Stream.of( >> 77: Arguments.of("decimalFormat", DecimalFormat.class), > > We should also include `Arguments.of("symbols", DecimalFormatSymbols.class)` as an entry. I was only testing mutable ones (as `symbols` is a constant), but as a regression test for `clone()` impl, adding all cloned fields would be desired. > test/jdk/java/text/Format/CompactNumberFormat/TestClone.java line 87: > >> 85: @MethodSource("referenceFields") >> 86: void whiteBoxTest(String fieldName, Class type) throws Throwable { >> 87: var original= NumberFormat.getCompactNumberInstance(Locale.US, NumberFormat.Style.SHORT); > > Suggestion: > > var original = NumberFormat.getCompactNumberInstance(Locale.US, NumberFormat.Style.SHORT); For me this kind of typo is hard to detect, as IDE inserts its type in between in the editor. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27475#discussion_r2377245099 PR Review Comment: https://git.openjdk.org/jdk/pull/27475#discussion_r2377247822 PR Review Comment: https://git.openjdk.org/jdk/pull/27475#discussion_r2377249888 From naoto at openjdk.org Wed Sep 24 23:07:54 2025 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 24 Sep 2025 23:07:54 GMT Subject: RFR: 8368328: CompactNumberFormat.clone does not produce independent instances [v3] In-Reply-To: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> References: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> Message-ID: <4FLqBADl9KzYVCMSevILK131Igi5AgJQb7iRvnzwdIk=.2ebc3404-e21a-4acd-9b28-2b5e7f9d62f0@github.com> > Fixing `CompactNumberFormat.clone()` to clone mutable reference objects. The bug was caused by accessing the shared objects concurrently which resulted in an illegal state on parsing. There are other reference fields that are shared, but the contents of those fields (such as prefix/suffix) are constants/read-only, so they may be shared. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Fixing test comment ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27475/files - new: https://git.openjdk.org/jdk/pull/27475/files/207fed5b..be9e9adb Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27475&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27475&range=01-02 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/27475.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27475/head:pull/27475 PR: https://git.openjdk.org/jdk/pull/27475 From jlu at openjdk.org Wed Sep 24 23:20:59 2025 From: jlu at openjdk.org (Justin Lu) Date: Wed, 24 Sep 2025 23:20:59 GMT Subject: RFR: 8368328: CompactNumberFormat.clone does not produce independent instances [v3] In-Reply-To: <4FLqBADl9KzYVCMSevILK131Igi5AgJQb7iRvnzwdIk=.2ebc3404-e21a-4acd-9b28-2b5e7f9d62f0@github.com> References: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> <4FLqBADl9KzYVCMSevILK131Igi5AgJQb7iRvnzwdIk=.2ebc3404-e21a-4acd-9b28-2b5e7f9d62f0@github.com> Message-ID: On Wed, 24 Sep 2025 23:07:54 GMT, Naoto Sato wrote: >> Fixing `CompactNumberFormat.clone()` to clone mutable reference objects. The bug was caused by accessing the shared objects concurrently which resulted in an illegal state on parsing. There are other reference fields that are shared, but the contents of those fields (such as prefix/suffix) are constants/read-only, so they may be shared. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > Fixing test comment LGTM ------------- Marked as reviewed by jlu (Committer). PR Review: https://git.openjdk.org/jdk/pull/27475#pullrequestreview-3264991325 From jlu at openjdk.org Wed Sep 24 23:21:01 2025 From: jlu at openjdk.org (Justin Lu) Date: Wed, 24 Sep 2025 23:21:01 GMT Subject: RFR: 8368328: CompactNumberFormat.clone does not produce independent instances [v3] In-Reply-To: <3oJ5vrUCyoixGo3ADdYY29KGvmxRA4F_A09HxzSKeYE=.dc71caf6-7e73-4ba9-ae55-c77fa0e7df11@github.com> References: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> <3oJ5vrUCyoixGo3ADdYY29KGvmxRA4F_A09HxzSKeYE=.dc71caf6-7e73-4ba9-ae55-c77fa0e7df11@github.com> Message-ID: On Wed, 24 Sep 2025 22:51:04 GMT, Naoto Sato wrote: >> test/jdk/java/text/Format/CompactNumberFormat/TestClone.java line 77: >> >>> 75: private static Stream referenceFields() throws ClassNotFoundException { >>> 76: return Stream.of( >>> 77: Arguments.of("decimalFormat", DecimalFormat.class), >> >> We should also include `Arguments.of("symbols", DecimalFormatSymbols.class)` as an entry. > > I was only testing mutable ones (as `symbols` is a constant), but as a regression test for `clone()` impl, adding all cloned fields would be desired. Well CNF treats `symbols` as a constant, but technically user can still mutate it. Regardless, good to see it guaranteed to be a unique reference in the test since we do make a clone on it. jshell> var dfs = new DecimalFormatSymbols() dfs ==> java.text.DecimalFormatSymbols at a7ad10d9 jshell> var cnf = new CompactNumberFormat("", dfs, new String[]{}) cnf ==> java.text.CompactNumberFormat at cd2b4d69 jshell> cnf.parse("NaN") $4 ==> NaN jshell> dfs.setNaN("FOO") jshell> cnf.parse("FOO") $6 ==> NaN ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27475#discussion_r2377274648 From rgiulietti at openjdk.org Thu Sep 25 10:33:37 2025 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Thu, 25 Sep 2025 10:33:37 GMT Subject: RFR: 8368328: CompactNumberFormat.clone does not produce independent instances [v3] In-Reply-To: <4FLqBADl9KzYVCMSevILK131Igi5AgJQb7iRvnzwdIk=.2ebc3404-e21a-4acd-9b28-2b5e7f9d62f0@github.com> References: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> <4FLqBADl9KzYVCMSevILK131Igi5AgJQb7iRvnzwdIk=.2ebc3404-e21a-4acd-9b28-2b5e7f9d62f0@github.com> Message-ID: On Wed, 24 Sep 2025 23:07:54 GMT, Naoto Sato wrote: >> Fixing `CompactNumberFormat.clone()` to clone mutable reference objects. The bug was caused by accessing the shared objects concurrently which resulted in an illegal state on parsing. There are other reference fields that are shared, but the contents of those fields (such as prefix/suffix) are constants/read-only, so they may be shared. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > Fixing test comment I think it would be useful to add a comment to each individual field that is a "read-only constant after initialization". This would make the intent explicit. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27475#issuecomment-3333318630 From duke at openjdk.org Thu Sep 25 12:44:33 2025 From: duke at openjdk.org (Khalid Boulanouare) Date: Thu, 25 Sep 2025 12:44:33 GMT Subject: RFR: 8360498: [TEST_BUG] Some Mixing test continue to fail [v15] In-Reply-To: References: Message-ID: > This PR will consolidate fixes of the following bugs: > > https://bugs.openjdk.org/browse/JDK-8361188 > https://bugs.openjdk.org/browse/JDK-8361189 > https://bugs.openjdk.org/browse/JDK-8361190 > https://bugs.openjdk.org/browse/JDK-8361191 > https://bugs.openjdk.org/browse/JDK-8361192 > https://bugs.openjdk.org/browse/JDK-8361193 > https://bugs.openjdk.org/browse/JDK-8361195 > > This PR depends on https://github.com/openjdk/jdk/pull/25971 > > For test : java/awt/Mixing/AWT_Mixing/JComboBoxOverlapping.java, the fix suggested is to return false in method isValidForPixelCheck for embedded frame, in which case the component is set to null. For more details see bug: [JDK-8361188](https://bugs.openjdk.org/browse/JDK-8361188) > > For test : test/jdk/java/awt/Mixing/AWT_Mixing/MixingPanelsResizing.java, I had to create a a tolerance color matching method for mac for the tests to pass. Also, the jbuttons needed to have different color than the color of the background frame, in order for test to pass. For more detail see bug: https://bugs.openjdk.org/browse/JDK-8361193 > > For test : test/jdk/java/awt/Mixing/AWT_Mixing/JSplitPaneOverlapping.java, it seems that color selected for lightweight component matches the background color of the frame. And this will cause the test to fail when matching colors. Choosing any color different than the background color will get the test to pass. For more details, see bug: https://bugs.openjdk.org/browse/JDK-8361192 > > For test test/jdk/java/awt/Mixing/AWT_Mixing/JPopupMenuOverlapping.java, it looks like the frame when visible, the popup test does not work properly. The frame needs to be hidden for the test to click on popup. For more details see bug: https://bugs.openjdk.org/browse/JDK-8361191 > > For test test/jdk/java/awt/Mixing/AWT_Mixing/JMenuBarOverlapping.java, the test runs successfully but it times out after the default 2 minutes of jtreg. increasing the timeout to 3 minutes get the test to pass. For more details please refer to bug: https://bugs.openjdk.org/browse/JDK-8361190 Khalid Boulanouare has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 74 commits: - Merge branch 'openjdk:master' into jdk-8360498 - Removes not needed changes - Revert "Removes not needed changes" This reverts commit e76780d50cc390e35443dccb193cfbc9a1cec1cb. - Removes not needed changes - Removes extra white lines - Merge branch 'pr/25971' into jdk-8360498 - Merge branch 'openjdk:master' into jdk-8158801 - Merge branch 'pr/25971' into jdk-8360498 - Merge branch 'openjdk:master' into jdk-8158801 - Centers missed frames in the middle of screen - ... and 64 more: https://git.openjdk.org/jdk/compare/26b5708c...e5753d14 ------------- Changes: https://git.openjdk.org/jdk/pull/26625/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26625&range=14 Stats: 185 lines in 14 files changed: 96 ins; 44 del; 45 mod Patch: https://git.openjdk.org/jdk/pull/26625.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26625/head:pull/26625 PR: https://git.openjdk.org/jdk/pull/26625 From duke at openjdk.org Thu Sep 25 13:03:51 2025 From: duke at openjdk.org (Khalid Boulanouare) Date: Thu, 25 Sep 2025 13:03:51 GMT Subject: RFR: 8360498: [TEST_BUG] Some Mixing test continue to fail [v16] In-Reply-To: References: Message-ID: <5YzcczRe9VgQqc7POMiumcCnf6esXSQO6PpUbIuuxhA=.efcb29a6-3705-475d-901c-515838317bfe@github.com> > This PR will consolidate fixes of the following bugs: > > https://bugs.openjdk.org/browse/JDK-8361188 > https://bugs.openjdk.org/browse/JDK-8361189 > https://bugs.openjdk.org/browse/JDK-8361190 > https://bugs.openjdk.org/browse/JDK-8361191 > https://bugs.openjdk.org/browse/JDK-8361192 > https://bugs.openjdk.org/browse/JDK-8361193 > https://bugs.openjdk.org/browse/JDK-8361195 > > This PR depends on https://github.com/openjdk/jdk/pull/25971 > > For test : java/awt/Mixing/AWT_Mixing/JComboBoxOverlapping.java, the fix suggested is to return false in method isValidForPixelCheck for embedded frame, in which case the component is set to null. For more details see bug: [JDK-8361188](https://bugs.openjdk.org/browse/JDK-8361188) > > For test : test/jdk/java/awt/Mixing/AWT_Mixing/MixingPanelsResizing.java, I had to create a a tolerance color matching method for mac for the tests to pass. Also, the jbuttons needed to have different color than the color of the background frame, in order for test to pass. For more detail see bug: https://bugs.openjdk.org/browse/JDK-8361193 > > For test : test/jdk/java/awt/Mixing/AWT_Mixing/JSplitPaneOverlapping.java, it seems that color selected for lightweight component matches the background color of the frame. And this will cause the test to fail when matching colors. Choosing any color different than the background color will get the test to pass. For more details, see bug: https://bugs.openjdk.org/browse/JDK-8361192 > > For test test/jdk/java/awt/Mixing/AWT_Mixing/JPopupMenuOverlapping.java, it looks like the frame when visible, the popup test does not work properly. The frame needs to be hidden for the test to click on popup. For more details see bug: https://bugs.openjdk.org/browse/JDK-8361191 > > For test test/jdk/java/awt/Mixing/AWT_Mixing/JMenuBarOverlapping.java, the test runs successfully but it times out after the default 2 minutes of jtreg. increasing the timeout to 3 minutes get the test to pass. For more details please refer to bug: https://bugs.openjdk.org/browse/JDK-8361190 Khalid Boulanouare has updated the pull request incrementally with one additional commit since the last revision: Resolves confict for when there is a merge with jdk-8158801 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26625/files - new: https://git.openjdk.org/jdk/pull/26625/files/e5753d14..8794db9a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26625&range=15 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26625&range=14-15 Stats: 55 lines in 1 file changed: 36 ins; 3 del; 16 mod Patch: https://git.openjdk.org/jdk/pull/26625.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26625/head:pull/26625 PR: https://git.openjdk.org/jdk/pull/26625 From alanb at openjdk.org Thu Sep 25 13:30:34 2025 From: alanb at openjdk.org (Alan Bateman) Date: Thu, 25 Sep 2025 13:30:34 GMT Subject: RFR: 8360498: [TEST_BUG] Some Mixing test continue to fail [v16] In-Reply-To: <5YzcczRe9VgQqc7POMiumcCnf6esXSQO6PpUbIuuxhA=.efcb29a6-3705-475d-901c-515838317bfe@github.com> References: <5YzcczRe9VgQqc7POMiumcCnf6esXSQO6PpUbIuuxhA=.efcb29a6-3705-475d-901c-515838317bfe@github.com> Message-ID: On Thu, 25 Sep 2025 13:03:51 GMT, Khalid Boulanouare wrote: >> This PR will consolidate fixes of the following bugs: >> >> https://bugs.openjdk.org/browse/JDK-8361188 >> https://bugs.openjdk.org/browse/JDK-8361189 >> https://bugs.openjdk.org/browse/JDK-8361190 >> https://bugs.openjdk.org/browse/JDK-8361191 >> https://bugs.openjdk.org/browse/JDK-8361192 >> https://bugs.openjdk.org/browse/JDK-8361193 >> https://bugs.openjdk.org/browse/JDK-8361195 >> >> This PR depends on https://github.com/openjdk/jdk/pull/25971 >> >> For test : java/awt/Mixing/AWT_Mixing/JComboBoxOverlapping.java, the fix suggested is to return false in method isValidForPixelCheck for embedded frame, in which case the component is set to null. For more details see bug: [JDK-8361188](https://bugs.openjdk.org/browse/JDK-8361188) >> >> For test : test/jdk/java/awt/Mixing/AWT_Mixing/MixingPanelsResizing.java, I had to create a a tolerance color matching method for mac for the tests to pass. Also, the jbuttons needed to have different color than the color of the background frame, in order for test to pass. For more detail see bug: https://bugs.openjdk.org/browse/JDK-8361193 >> >> For test : test/jdk/java/awt/Mixing/AWT_Mixing/JSplitPaneOverlapping.java, it seems that color selected for lightweight component matches the background color of the frame. And this will cause the test to fail when matching colors. Choosing any color different than the background color will get the test to pass. For more details, see bug: https://bugs.openjdk.org/browse/JDK-8361192 >> >> For test test/jdk/java/awt/Mixing/AWT_Mixing/JPopupMenuOverlapping.java, it looks like the frame when visible, the popup test does not work properly. The frame needs to be hidden for the test to click on popup. For more details see bug: https://bugs.openjdk.org/browse/JDK-8361191 >> >> For test test/jdk/java/awt/Mixing/AWT_Mixing/JMenuBarOverlapping.java, the test runs successfully but it times out after the default 2 minutes of jtreg. increasing the timeout to 3 minutes get the test to pass. For more details please refer to bug: https://bugs.openjdk.org/browse/JDK-8361190 > > Khalid Boulanouare has updated the pull request incrementally with one additional commit since the last revision: > > Resolves confict for when there is a merge with jdk-8158801 What is this about? The PR suggests 500+ commits and 300+ files changed but I think it's just a change to some AWT tests. Can you sync up the branch so that it only contains the changes to the AWT tests that you want to change, and remove all the labels except "client" as it will otherwise broadcast to all the mailing lists. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26625#issuecomment-3334044893 From fandreuzzi at openjdk.org Thu Sep 25 13:51:48 2025 From: fandreuzzi at openjdk.org (Francesco Andreuzzi) Date: Thu, 25 Sep 2025 13:51:48 GMT Subject: RFR: 8368357: Some HotSpot source files have initial blank lines Message-ID: <9121m5P5MFrgd7v8Rl88DaZLT6UBKVUciMcZvWNtqiM=.0fdcc411-6f28-4dc2-bb54-9c37712d22d2@github.com> Removing some spurious blank lines at the beginning of the file. Looks trivial to me. ------------- Commit messages: - more - rm Changes: https://git.openjdk.org/jdk/pull/27489/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27489&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8368357 Stats: 8 lines in 8 files changed: 0 ins; 8 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/27489.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27489/head:pull/27489 PR: https://git.openjdk.org/jdk/pull/27489 From duke at openjdk.org Thu Sep 25 14:00:08 2025 From: duke at openjdk.org (Khalid Boulanouare) Date: Thu, 25 Sep 2025 14:00:08 GMT Subject: RFR: 8360498: [TEST_BUG] Some Mixing test continue to fail [v17] In-Reply-To: References: Message-ID: > This PR will consolidate fixes of the following bugs: > > https://bugs.openjdk.org/browse/JDK-8361188 > https://bugs.openjdk.org/browse/JDK-8361189 > https://bugs.openjdk.org/browse/JDK-8361190 > https://bugs.openjdk.org/browse/JDK-8361191 > https://bugs.openjdk.org/browse/JDK-8361192 > https://bugs.openjdk.org/browse/JDK-8361193 > https://bugs.openjdk.org/browse/JDK-8361195 > > This PR depends on https://github.com/openjdk/jdk/pull/25971 > > For test : java/awt/Mixing/AWT_Mixing/JComboBoxOverlapping.java, the fix suggested is to return false in method isValidForPixelCheck for embedded frame, in which case the component is set to null. For more details see bug: [JDK-8361188](https://bugs.openjdk.org/browse/JDK-8361188) > > For test : test/jdk/java/awt/Mixing/AWT_Mixing/MixingPanelsResizing.java, I had to create a a tolerance color matching method for mac for the tests to pass. Also, the jbuttons needed to have different color than the color of the background frame, in order for test to pass. For more detail see bug: https://bugs.openjdk.org/browse/JDK-8361193 > > For test : test/jdk/java/awt/Mixing/AWT_Mixing/JSplitPaneOverlapping.java, it seems that color selected for lightweight component matches the background color of the frame. And this will cause the test to fail when matching colors. Choosing any color different than the background color will get the test to pass. For more details, see bug: https://bugs.openjdk.org/browse/JDK-8361192 > > For test test/jdk/java/awt/Mixing/AWT_Mixing/JPopupMenuOverlapping.java, it looks like the frame when visible, the popup test does not work properly. The frame needs to be hidden for the test to click on popup. For more details see bug: https://bugs.openjdk.org/browse/JDK-8361191 > > For test test/jdk/java/awt/Mixing/AWT_Mixing/JMenuBarOverlapping.java, the test runs successfully but it times out after the default 2 minutes of jtreg. increasing the timeout to 3 minutes get the test to pass. For more details please refer to bug: https://bugs.openjdk.org/browse/JDK-8361190 Khalid Boulanouare has updated the pull request incrementally with three additional commits since the last revision: - Merge branch 'openjdk:master' into jdk-8360498 - 8359378: aarch64: crash when using -XX:+UseFPUForSpilling Reviewed-by: aph, rcastanedalo - 8367103: RISC-V: store cpu features in a bitmap Reviewed-by: fyang, luhenry ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26625/files - new: https://git.openjdk.org/jdk/pull/26625/files/8794db9a..69c087a7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26625&range=16 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26625&range=15-16 Stats: 214 lines in 3 files changed: 142 ins; 4 del; 68 mod Patch: https://git.openjdk.org/jdk/pull/26625.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26625/head:pull/26625 PR: https://git.openjdk.org/jdk/pull/26625 From duke at openjdk.org Thu Sep 25 14:00:10 2025 From: duke at openjdk.org (Khalid Boulanouare) Date: Thu, 25 Sep 2025 14:00:10 GMT Subject: RFR: 8360498: [TEST_BUG] Some Mixing test continue to fail [v16] In-Reply-To: References: <5YzcczRe9VgQqc7POMiumcCnf6esXSQO6PpUbIuuxhA=.efcb29a6-3705-475d-901c-515838317bfe@github.com> Message-ID: On Thu, 25 Sep 2025 13:26:46 GMT, Alan Bateman wrote: >> Khalid Boulanouare has updated the pull request incrementally with one additional commit since the last revision: >> >> Resolves confict for when there is a merge with jdk-8158801 > > What is this about? The PR suggests 500+ commits and 300+ files changed but I think it's just a change to some AWT tests. Can you sync up the branch so that it only contains the changes to the AWT tests that you want to change, and remove all the labels except "client" as it will otherwise broadcast to all the mailing lists. @AlanBateman This PR is created based on PR https://github.com/openjdk/jdk/tree/pr/25971. My branch https://github.com/kboulanou/jdk/tree/jdk-8360498 is only 2 commits behind master. I am waiting for approval for PR https://github.com/openjdk/jdk/tree/pr/25971 for this PR to follow. Please let me know if there is anything I need to do. Thanks. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26625#issuecomment-3334251324 From stefank at openjdk.org Thu Sep 25 14:14:42 2025 From: stefank at openjdk.org (Stefan Karlsson) Date: Thu, 25 Sep 2025 14:14:42 GMT Subject: RFR: 8368357: Some HotSpot source files have initial blank lines In-Reply-To: <9121m5P5MFrgd7v8Rl88DaZLT6UBKVUciMcZvWNtqiM=.0fdcc411-6f28-4dc2-bb54-9c37712d22d2@github.com> References: <9121m5P5MFrgd7v8Rl88DaZLT6UBKVUciMcZvWNtqiM=.0fdcc411-6f28-4dc2-bb54-9c37712d22d2@github.com> Message-ID: On Thu, 25 Sep 2025 13:44:13 GMT, Francesco Andreuzzi wrote: > Removing some spurious blank lines at the beginning of the file. Looks trivial to me. HotSpot code looks good. The other files look good as well, but let's wait for the other group's Reviewers to chime in. ------------- Marked as reviewed by stefank (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27489#pullrequestreview-3267968546 From ayang at openjdk.org Thu Sep 25 15:48:38 2025 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Thu, 25 Sep 2025 15:48:38 GMT Subject: RFR: 8368357: Some source files have initial blank lines In-Reply-To: <9121m5P5MFrgd7v8Rl88DaZLT6UBKVUciMcZvWNtqiM=.0fdcc411-6f28-4dc2-bb54-9c37712d22d2@github.com> References: <9121m5P5MFrgd7v8Rl88DaZLT6UBKVUciMcZvWNtqiM=.0fdcc411-6f28-4dc2-bb54-9c37712d22d2@github.com> Message-ID: On Thu, 25 Sep 2025 13:44:13 GMT, Francesco Andreuzzi wrote: > Removing some spurious blank lines at the beginning of the file. Looks trivial to me. The title can probably be updated, as the patch changes files outside hotspot. ------------- Marked as reviewed by ayang (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27489#pullrequestreview-3268425252 From naoto at openjdk.org Thu Sep 25 16:53:18 2025 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 25 Sep 2025 16:53:18 GMT Subject: RFR: 8368328: CompactNumberFormat.clone does not produce independent instances [v4] In-Reply-To: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> References: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> Message-ID: > Fixing `CompactNumberFormat.clone()` to clone mutable reference objects. The bug was caused by accessing the shared objects concurrently which resulted in an illegal state on parsing. There are other reference fields that are shared, but the contents of those fields (such as prefix/suffix) are constants/read-only, so they may be shared. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Make explicit "read-only" comment to each constant field ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27475/files - new: https://git.openjdk.org/jdk/pull/27475/files/be9e9adb..b3198fe9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27475&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27475&range=02-03 Stats: 12 lines in 1 file changed: 5 ins; 0 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/27475.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27475/head:pull/27475 PR: https://git.openjdk.org/jdk/pull/27475 From naoto at openjdk.org Thu Sep 25 16:53:19 2025 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 25 Sep 2025 16:53:19 GMT Subject: RFR: 8368328: CompactNumberFormat.clone does not produce independent instances [v3] In-Reply-To: References: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> <4FLqBADl9KzYVCMSevILK131Igi5AgJQb7iRvnzwdIk=.2ebc3404-e21a-4acd-9b28-2b5e7f9d62f0@github.com> Message-ID: On Thu, 25 Sep 2025 10:31:07 GMT, Raffaello Giulietti wrote: > I think it would be useful to add a comment to each individual field that is a "read-only constant after initialization". This would make the intent explicit. Good point. Added the comment to each field ------------- PR Comment: https://git.openjdk.org/jdk/pull/27475#issuecomment-3335053074 From rgiulietti at openjdk.org Thu Sep 25 18:20:34 2025 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Thu, 25 Sep 2025 18:20:34 GMT Subject: RFR: 8368328: CompactNumberFormat.clone does not produce independent instances [v4] In-Reply-To: References: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> Message-ID: <5ebJK1DSWcAvHNJzFXMY64AkRqO4tDvR9-0u4z-vmSA=.098e7c6d-6847-46f5-8449-a2fca65fbd42@github.com> On Thu, 25 Sep 2025 16:53:18 GMT, Naoto Sato wrote: >> Fixing `CompactNumberFormat.clone()` to clone mutable reference objects. The bug was caused by accessing the shared objects concurrently which resulted in an illegal state on parsing. There are other reference fields that are shared, but the contents of those fields (such as prefix/suffix) are constants/read-only, so they may be shared. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > Make explicit "read-only" comment to each constant field LGTM ------------- Marked as reviewed by rgiulietti (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27475#pullrequestreview-3268948630 From duke at openjdk.org Thu Sep 25 18:26:36 2025 From: duke at openjdk.org (Johannes Graham) Date: Thu, 25 Sep 2025 18:26:36 GMT Subject: Integrated: 8367324: Avoid redundant parsing when formatting with DigitList In-Reply-To: References: Message-ID: On Fri, 5 Sep 2025 14:18:19 GMT, Johannes Graham wrote: > When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. > > This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. This pull request has now been integrated. Changeset: a48538dd Author: Johannes Graham Committer: Raffaello Giulietti URL: https://git.openjdk.org/jdk/commit/a48538dd6379d606b75b849dd899413af76a068c Stats: 145 lines in 5 files changed: 51 ins; 73 del; 21 mod 8367324: Avoid redundant parsing when formatting with DigitList Reviewed-by: jlu, rgiulietti ------------- PR: https://git.openjdk.org/jdk/pull/27118 From duke at openjdk.org Thu Sep 25 18:30:32 2025 From: duke at openjdk.org (Johannes Graham) Date: Thu, 25 Sep 2025 18:30:32 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v5] In-Reply-To: References: Message-ID: On Wed, 24 Sep 2025 14:59:05 GMT, Johannes Graham wrote: >> When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. >> >> This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. > > Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: > > update assert Thank you all for your time. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27118#issuecomment-3335417085 From serb at openjdk.org Thu Sep 25 18:41:16 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 25 Sep 2025 18:41:16 GMT Subject: RFR: 8368357: Some source files have initial blank lines In-Reply-To: <9121m5P5MFrgd7v8Rl88DaZLT6UBKVUciMcZvWNtqiM=.0fdcc411-6f28-4dc2-bb54-9c37712d22d2@github.com> References: <9121m5P5MFrgd7v8Rl88DaZLT6UBKVUciMcZvWNtqiM=.0fdcc411-6f28-4dc2-bb54-9c37712d22d2@github.com> Message-ID: On Thu, 25 Sep 2025 13:44:13 GMT, Francesco Andreuzzi wrote: > Removing some spurious blank lines at the beginning of the file. Looks trivial to me. Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27489#pullrequestreview-3269026321 From swen at openjdk.org Fri Sep 26 04:04:40 2025 From: swen at openjdk.org (Shaojin Wen) Date: Fri, 26 Sep 2025 04:04:40 GMT Subject: RFR: 8368172: Make java.time.format.DateTimePrintContext immutable [v4] In-Reply-To: <5xcmzM6BhoL-zhBZc_TrRSDCKBrOMqq8bRcmihc1zpU=.732bd228-f9ff-43f0-9771-56645dab6cd2@github.com> References: <5xcmzM6BhoL-zhBZc_TrRSDCKBrOMqq8bRcmihc1zpU=.732bd228-f9ff-43f0-9771-56645dab6cd2@github.com> Message-ID: > I propose to make j.t.f.DateTimePrintContext immutable. > > Currently, DateTimePrintContext has only one mutable field, optional. This can be replaced by adding an optional parameter to the DateTimeFormatter.formatTo method. > > Immutable DateTimePrintContext can be optimized by escape analysis, such as immutable object optimization. Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: add DateTimePrinterParser#withOptional, from @RogerRiggs ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26913/files - new: https://git.openjdk.org/jdk/pull/26913/files/cac20038..558fa46f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26913&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26913&range=02-03 Stats: 322 lines in 2 files changed: 242 ins; 2 del; 78 mod Patch: https://git.openjdk.org/jdk/pull/26913.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26913/head:pull/26913 PR: https://git.openjdk.org/jdk/pull/26913 From jessicawuttig83 at gmail.com Fri Sep 26 11:22:11 2025 From: jessicawuttig83 at gmail.com (Jessica Wuttig) Date: Fri, 26 Sep 2025 12:22:11 +0100 Subject: =?utf-8?b?2KPZgdi22YQgMTAg2YXZiNin2YLYuSDZhNmE2Kg=?= =?utf-8?b?2K3YqyDYudmGINi52YXZhCDZgdmKINin2YTZhdi62LHYqCAoMjAyNSk=?= Message-ID: ???? 10 ????? ????? ?? ??? ?? ?????? (2025) ??? ??? ?????? ?? ???? ????? ????????? ????? ?? ?? ???????? ??????? ?????? ????? ???????? ?? ???? ???? ??????? ?? ?????? ????? ???? ???? ??? ????? ????? ????????? ??????. ???? ??? ??????? ????? ?????? ?? ???? ??????? ?? ?????? ??????? ???? ?? ?????? ????? ?? ??????? ???????? ????? ????? ???? ??? ????? ???????? ??????? ????? ?????. ??? ??? ???? ?? ????? ?? ??? ?? ????? ????? ????? ???????? ??? ???? ??? ???????? ???? ????? ???????? ?? ??? linkedin ???????. ??? ???? ????? ???? ??? ??????? ?????? ????? ??? ????? ????? ????? ?????. ?? ???? ??? ?????? ???????? ????? ?????? ?????? ??? ????? ?????? ??????? ?????? ???? ????? ??????? ??? ?????? ????? ?????? ??? ???? ??????? ???? ?? ???? ??????. 1. TARGIR.c om ? ??? ???? ?????? ????? ??????? ???? ???? TARGIR ?? ???? ????? ????? ??????? ????? ?? ??????? ??? ???? ??? ??? ?????? ?????? ???? ????? ?? ???? ????? ???????? ???????? ??????. ???? ?????? ?????? ??? ????? ????? ???? ??? ????? ???? ?????? ???? ?????? ????? ????? ?????? ??? ?????? ????? ????? ???????? ?? ????? ??? ????? ??? ????? ???????? ?? ??? ?????? ??????? ???????. ???? ??? ???? ?? ????? ?? ?????? ???????? ?? ???? ?? ????? ?? ??? ??????? ?? ??? ????? ???? ?? ????? ??? ??????? ??????? ?? ?????? ????????? ??? TARGIR ???? ?????? ???? ??????. ??? ???? ?? ??????? ??? ????? ??? ???? ??????? ???? ?????? ??????? ???????? ????? ????????? ???? ?????? ?????? ?? ???? ????? ??????? ?? ?????? ???????. ?????? TARGIR: ??????? ????? ????? ?????? ?? ????? ????????. ????? ??????? ???? ?????? ??? ??????? ?? ??????. ????? ?????? ?????? ???? ????? ????????. ??????? ???? ??????? ??????? ??? ??????? ????????. ???? ??? ?????? ??????? ??? ???? ?? ????? ?? ??????? ?????? ?? ?????? ????????? ???????? ???????? ????????. ???? ?????? ????? ?????? ???? ??????? ??????? ?? ????? ???? ??? kpc ?????? maximus ?????? ?ngha ?????? ???????? ??? ??? ??? ???? uep ???????. ??? ???? ?????? ????? ?? ???????? ????? ??????? ?? ??? ????? ?????? ??? ???? ???????? ???? ???? ????? ?? ???????? ??????? ????????? ??????? ??????. ????? ????? ??????? ??? ??????? ??????? ?? ????? ???????? ??? ????? ??????? ???????? ??????? ????? ???? ???????. ???? ?????? ????? ?? ????? ?????? ??? ???????? ?????? ?????? ??????? ???????? ?????? ???? ???????. ??? ???? ?? ?????? ??? ??????? ???????? ?????? ????? ???????? ????? 2022 ?? ????? ???????? ????? ??? ????? ???? ??????. 2. Rekrute ? ??? ??? ?? ???? ??????? ???? Rekrute ?? ???? ????? ????? ??????? ?? ??????. ???? ????? ?? ????? ???? ?? ?????? ??????? ??????? ???? ??? ????? ???????? ???????? ???????. ????? ??: ???????? ?? ?????? ??????? ????????. ???????? ?? ??? ??? ?? ????? ????? ???????? ???????. 3. Emploi.ma ? ???? ??? ?? ?? ???????? Emploi.ma ???? ?????? ???????? ?? ????? ?? ?? ????? ????????. ???? ?? ????? ???? ??? ??? ???????? ???????? ?? ???? ?????. ??????? ?????? ?? ??????? ?? ????? ?? ??? ?? ????????? ?????? ?? ??? ????? ??? ???? ???? ???: "??? ?? ??? ???? ????? ?? ?????? 2022" ?? "???? ?? ??? ?? ???? ?????? ???????". ????? ???? ??????: ??? ??? ????? ?????? ????? ?????? ???? ????? ????? 100 ???? ?????? ????? ???????? 4. Bayt.com ? ????? ????? ??????? ??????? ??? ?? Bayt.com ??????? ???? ???? ?? ????? ??????? ??? ??? ????? ????? ????? ?? ??????? ??????? ?? ??????? ???? ??????? ????????. ?????: ???? ????? ??????? ???????? ?????? ???????? ???? ??? "??????" ?????? ??? ????? ?????. 5. Job.ma ? ???? ????? ?????? ????????? ????? ??? ??? ??? ??????: "???? ?? ??? ?? ????? ???? 2022" ?? "???? ?? ??? ?? ???????"? ??? Job.ma ?? ?????? ?????? ??. ????? ??? ??? ????? ?????? ?????? ????????? ????????? ?????????. 6. LinkedIn ? ???? ???????? ??????? ?? ?????? ?????? LinkedIn ???? ????? ????? ???? ???? ????? ????? ?? ????? ?? ?????? ?????? ??? ??????? ??? ??????? ?? ??????. ????? ?????? ??? ??? ?? ??? ??????? ?? ??????? ?????? ?? ??????? ???????? ???? ???? ?? ???? ?? ??????? ???????. 7. Indeed ? ???? ??? ???? ??????? ?? ???? Indeed ??????? ????? ???? ???? ??????? ???????? ????? ??????? ???: ????? ?? ??? ????? ?? ????? ??? ?? ??? ?? ???? ????? ??????? morocco ????? ?? ?????? ????? ?? ????? ?? ????? ?? ?????? ?????? 8. Anapec ? ??????? ??????? ??????? ????? ???? ??????? ??????? ?????? ??????? ????????? (Anapec) ???? ?????? ?????? ???? ??????? ??????? ???????? ???? ?? ?????? ?????. ???? ??????: ??? ?? ??? ???? ??????. ??????? ?? ?????? ???? ????? 2021 ?2022. 9. Wadifate ? ????? ?????? ?? ??? ?????? ?????? ??? ?????? ?? ???? ??????? ???????? ?? ??? ???? ????? ??????? ?? ??????? ??????? ?????? ?? ??? ???????? ?? ????? ?? ?????? ?????. ???? ?????? ??????? ?????? ?? ??????? ??????? ?? ????? ???????? ??? ????????? ???????? ????????. ????? ???????? ?????? ??? ??? ??? ???? ??????? ??????? ??????? ??????? ???????? ???????? ??? ??? ????? ???? ?? ????? ???? ??? maximus ?????? kpc ?????? ????? ?????. ??? ???? ?????? ?????? ?? ????? ?????? ??? ?????? ??????? ??????? ????????? ?????. ???? ??? ?????? ???? ???? ??? ?? ???? ?? ?????? ??? ??????? ???????? ?????? ????? ???????? ????? 2022? ??? ???? ??? ????? ?????? ??? ??????? ?? ??? ???????? ?? ??????? ??????. ????? ???? ??????: ??? ??? ????? ?????? ??????? ??????? ?????? ?????? ??????????????? ???????? ???? ??? ???? ????? ?????? ???????? ?? ????????? ?????????? 10. MarocAnnonces ? ??????? ???? ???? ??????? ??? ??? ???? ??????? ????? ??? ?? MarocAnnonces ????? ??? ??? ??? ?? ??????? ?????? ??? ???? ???????? ???????? ??: ??? ?? ??? ???? ?? ???? ?? ?????. ??? ?? ??? ?? ???? ?????? ?? ??????. ???? ?? ??? ?? ?????? ?????. ??????? ??????? ??? ????? ?? ??? ?? ?????? *?? ?? ???? ????? ????? ?? ????? ?? ???????* ?????? ??????: 1. TARGIR.c om ? ??? ???? ?????? ????? ??????? * ?? ?????? ????? ????? ???? ????? ?? ???????* ???? ???? ?????? ?? ??? ????? ?? ?????? ???? ?????? ?????? ?? ?????? ?????? ?????? ????????. *??? ???? ?? ??? ?? ?????? ???? ?? ?????* ?????? ????? ??? Job.ma ?MarocAnnonces? ????? ?????? ???: "??? ?? ??? ???? ?? ????? ???????" ?? "??? ?? ??? ???? ?????? ??????". ????? ?? ?? ?? ???????? ???? ?????? ????? ????? ?? ??? ?? ??????? ??? ????? ???? ????? ????? ????? ???? ???? ??? ??? ?????? ?????? ??????. ???? ??? ???? ?? ????? ?? ?????? ?? ??? ?? ????? ?? ??? ????? ?? ????? ?? ????? ???????? ????? ????? TARGIR.c om ?? ???? ???? ??? ??????? ?????? ?? ??? ???????. ?? ????? ??????? ?? ???? ???? ?????. ???? ?????? ????????? ???? ????? ???????? ??? ??????? ?? ???? ????? ?? ??????! -------------- next part -------------- An HTML attachment was scrubbed... URL: From duke at openjdk.org Fri Sep 26 13:53:56 2025 From: duke at openjdk.org (duke) Date: Fri, 26 Sep 2025 13:53:56 GMT Subject: RFR: 8368357: Some source files have initial blank lines In-Reply-To: <9121m5P5MFrgd7v8Rl88DaZLT6UBKVUciMcZvWNtqiM=.0fdcc411-6f28-4dc2-bb54-9c37712d22d2@github.com> References: <9121m5P5MFrgd7v8Rl88DaZLT6UBKVUciMcZvWNtqiM=.0fdcc411-6f28-4dc2-bb54-9c37712d22d2@github.com> Message-ID: On Thu, 25 Sep 2025 13:44:13 GMT, Francesco Andreuzzi wrote: > Removing some spurious blank lines at the beginning of the file. Looks trivial to me. @fandreuz Your change (at version 8a753ce5c03817bd5a007f0cb660fb45d77b6c5b) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27489#issuecomment-3338831250 From rriggs at openjdk.org Fri Sep 26 15:17:07 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 26 Sep 2025 15:17:07 GMT Subject: RFR: 8368172: Make java.time.format.DateTimePrintContext immutable [v4] In-Reply-To: References: <5xcmzM6BhoL-zhBZc_TrRSDCKBrOMqq8bRcmihc1zpU=.732bd228-f9ff-43f0-9771-56645dab6cd2@github.com> Message-ID: On Fri, 26 Sep 2025 04:04:40 GMT, Shaojin Wen wrote: >> I propose to make j.t.f.DateTimePrintContext immutable. >> >> Currently, DateTimePrintContext has only one mutable field, optional. This can be replaced by adding an optional parameter to the DateTimeFormatter.formatTo method. >> >> Immutable DateTimePrintContext can be optimized by escape analysis, such as immutable object optimization. > > Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: > > add DateTimePrinterParser#withOptional, from @RogerRiggs This has a much more invasive impact on PrinterParsers than the version with an extra argument on the format method. Are there other implementations of the nested depth counter in DateTimePrinterContext? ------------- PR Comment: https://git.openjdk.org/jdk/pull/26913#issuecomment-3339118873 From jwaters at openjdk.org Fri Sep 26 16:34:21 2025 From: jwaters at openjdk.org (Julian Waters) Date: Fri, 26 Sep 2025 16:34:21 GMT Subject: RFR: 8368357: Some source files have initial blank lines In-Reply-To: <9121m5P5MFrgd7v8Rl88DaZLT6UBKVUciMcZvWNtqiM=.0fdcc411-6f28-4dc2-bb54-9c37712d22d2@github.com> References: <9121m5P5MFrgd7v8Rl88DaZLT6UBKVUciMcZvWNtqiM=.0fdcc411-6f28-4dc2-bb54-9c37712d22d2@github.com> Message-ID: On Thu, 25 Sep 2025 13:44:13 GMT, Francesco Andreuzzi wrote: > Removing some spurious blank lines at the beginning of the file. Looks trivial to me. HotSpot looks good. Please wait for the reviewers of the other non HotSpot parts to approve before integrating however. ------------- Marked as reviewed by jwaters (Committer). PR Review: https://git.openjdk.org/jdk/pull/27489#pullrequestreview-3272985248 From naoto at openjdk.org Fri Sep 26 16:50:18 2025 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 26 Sep 2025 16:50:18 GMT Subject: RFR: 8368328: CompactNumberFormat.clone does not produce independent instances [v4] In-Reply-To: References: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> Message-ID: On Thu, 25 Sep 2025 16:53:18 GMT, Naoto Sato wrote: >> Fixing `CompactNumberFormat.clone()` to clone mutable reference objects. The bug was caused by accessing the shared objects concurrently which resulted in an illegal state on parsing. There are other reference fields that are shared, but the contents of those fields (such as prefix/suffix) are constants/read-only, so they may be shared. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > Make explicit "read-only" comment to each constant field Thanks for the reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/27475#issuecomment-3339583188 From naoto at openjdk.org Fri Sep 26 16:53:33 2025 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 26 Sep 2025 16:53:33 GMT Subject: Integrated: 8368328: CompactNumberFormat.clone does not produce independent instances In-Reply-To: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> References: <1ZWJMAjxfaiYkc4oDUixKS7lDGWiRta4vg556O-M9GU=.80db09e8-28ed-410c-8dad-af62ddb0bd42@github.com> Message-ID: On Wed, 24 Sep 2025 17:37:59 GMT, Naoto Sato wrote: > Fixing `CompactNumberFormat.clone()` to clone mutable reference objects. The bug was caused by accessing the shared objects concurrently which resulted in an illegal state on parsing. There are other reference fields that are shared, but the contents of those fields (such as prefix/suffix) are constants/read-only, so they may be shared. This pull request has now been integrated. Changeset: bdf6853c Author: Naoto Sato URL: https://git.openjdk.org/jdk/commit/bdf6853cfdd24176bdddb59b6d7bb85036b94c57 Stats: 114 lines in 2 files changed: 106 ins; 0 del; 8 mod 8368328: CompactNumberFormat.clone does not produce independent instances Reviewed-by: rgiulietti, jlu ------------- PR: https://git.openjdk.org/jdk/pull/27475 From jlu at openjdk.org Fri Sep 26 20:15:26 2025 From: jlu at openjdk.org (Justin Lu) Date: Fri, 26 Sep 2025 20:15:26 GMT Subject: Integrated: 8368498: Use JUnit instead of TestNG for jdk_text tests In-Reply-To: References: Message-ID: On Tue, 23 Sep 2025 21:58:56 GMT, Justin Lu wrote: > Please review this PR which converts all the _TestNG_ based tests under jdk_text to use _JUnit_. > > The changes are done in the following order, > > - https://github.com/openjdk/jdk/commit/a7840e72269202dfca99d5ce5109bd4f7af0f578: Conversions automated via [script](https://github.com/lahodaj/netbeans/tree/19515c3e2dbc07d977ca227d933197f856121ae5/java/java.openjdk.project/junit-convert). > - https://github.com/openjdk/jdk/commit/2466c5ee970965e57978d8b55b5b7dcad6c2aa6c: Updating to default recommended visibility of test methods + data providers. Cleaning up imports. > - https://github.com/openjdk/jdk/commit/27c439804db61e26d48d7239fd28c99258cb4a9f: Copyright years updated. This pull request has now been integrated. Changeset: 12c0f29b Author: Justin Lu URL: https://git.openjdk.org/jdk/commit/12c0f29b97f0ccd03dee6850a3a9a7117124016e Stats: 569 lines in 21 files changed: 194 ins; 81 del; 294 mod 8368498: Use JUnit instead of TestNG for jdk_text tests Reviewed-by: naoto ------------- PR: https://git.openjdk.org/jdk/pull/27460 From swen at openjdk.org Fri Sep 26 22:14:20 2025 From: swen at openjdk.org (Shaojin Wen) Date: Fri, 26 Sep 2025 22:14:20 GMT Subject: RFR: 8368172: Make java.time.format.DateTimePrintContext immutable [v4] In-Reply-To: References: <5xcmzM6BhoL-zhBZc_TrRSDCKBrOMqq8bRcmihc1zpU=.732bd228-f9ff-43f0-9771-56645dab6cd2@github.com> Message-ID: On Fri, 26 Sep 2025 15:14:16 GMT, Roger Riggs wrote: > This has a much more invasive impact on PrinterParsers than the version with an extra argument on the format method. Are there other implementations of the nested depth counter in DateTimePrinterContext? I also agree that # version 558fa46 has too many changes; I haven't found a better version yet. The advantage of the current version is that it clearly defines "optional" as a feature that is handled during build time, rather than during formatting. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26913#issuecomment-3340654567 From prappo at openjdk.org Fri Sep 26 23:12:55 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Fri, 26 Sep 2025 23:12:55 GMT Subject: RFR: 8366829: Add constants for the Duration MIN/MAX values Message-ID: We have [recently discussed][] a possibility of adding the `Duration.MIN` and `Duration.MAX` constants. Can we now start implementation? If and when we are in agreement on this PR, I will file a CSR. I drafted a minimal specification and added some tests. I tried to phrase the spec for `Duration.MIN` in a way that makes it clear that `Duration.MIN` is the most negative value and not the least positive. [recently discussed]: https://mail.openjdk.org/pipermail/core-libs-dev/2025-September/151098.html ------------- Commit messages: - Initial commit Changes: https://git.openjdk.org/jdk/pull/27534/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27534&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8366829 Stats: 55 lines in 3 files changed: 52 ins; 1 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/27534.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27534/head:pull/27534 PR: https://git.openjdk.org/jdk/pull/27534 From alanb at openjdk.org Sat Sep 27 13:20:15 2025 From: alanb at openjdk.org (Alan Bateman) Date: Sat, 27 Sep 2025 13:20:15 GMT Subject: RFR: 8366829: Add constants for the Duration MIN/MAX values In-Reply-To: References: Message-ID: On Fri, 26 Sep 2025 23:06:36 GMT, Pavel Rappo wrote: > We have [recently discussed][] a possibility of adding the `Duration.MIN` and `Duration.MAX` constants. Can we now start implementation? If and when we are in agreement on this PR, I will file a CSR. > > I drafted a minimal specification and added some tests. I tried to phrase the spec for `Duration.MIN` in a way that makes it clear that `Duration.MIN` is the most negative value and not the least positive. > > [recently discussed]: https://mail.openjdk.org/pipermail/core-libs-dev/2025-September/151098.html I've added the "csr" label as it will need a CSR to track this once there is agreement on the change/spec. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27534#issuecomment-3341704602 From swen at openjdk.org Mon Sep 29 01:12:11 2025 From: swen at openjdk.org (Shaojin Wen) Date: Mon, 29 Sep 2025 01:12:11 GMT Subject: RFR: 8368825: Change the DateTimeFormatterBuilder::FIELD_MAP type from Map to Array Message-ID: The DateTimeFormatterBuilder::FIELD_MAP is of type Map, with key values in the range 'A-Z' and 'a-z'. We can change the type of FIELD_MAP to an array of length 128 and then use char as an index to access the array. This will reduce the memory usage of DateTimeFormatterBuilder::FIELD_MAP and improve performance slightly. By analyzing the jmap dump memory, we can see that the memory size used by DateTimeFormatterBuilder::FIELD_MAP has dropped from 1.12kb to 528b, the number of objects has decreased and the memory has become more flat. as shown below: * before image * after image ------------- Commit messages: - @Stable FIELD_MAP Changes: https://git.openjdk.org/jdk/pull/26634/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26634&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8368825 Stats: 29 lines in 1 file changed: 2 ins; 0 del; 27 mod Patch: https://git.openjdk.org/jdk/pull/26634.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26634/head:pull/26634 PR: https://git.openjdk.org/jdk/pull/26634 From liach at openjdk.org Mon Sep 29 01:12:11 2025 From: liach at openjdk.org (Chen Liang) Date: Mon, 29 Sep 2025 01:12:11 GMT Subject: RFR: 8368825: Change the DateTimeFormatterBuilder::FIELD_MAP type from Map to Array In-Reply-To: References: Message-ID: On Tue, 5 Aug 2025 01:42:53 GMT, Shaojin Wen wrote: > with key values in the range 'A-Z' and 'a-z'. You can use a table of size 64, and access the table with `& 63`. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26634#issuecomment-3155689750 From swen at openjdk.org Mon Sep 29 01:12:11 2025 From: swen at openjdk.org (Shaojin Wen) Date: Mon, 29 Sep 2025 01:12:11 GMT Subject: RFR: 8368825: Change the DateTimeFormatterBuilder::FIELD_MAP type from Map to Array In-Reply-To: References: Message-ID: On Tue, 5 Aug 2025 15:30:30 GMT, Chen Liang wrote: > > with key values in the range 'A-Z' and 'a-z'. > > You can use a table of size 64, and access the table with `& 63`. This will save memory space, but it will also increase the complexity a little bit. @Stable private static final TemporalField[] FIELD_MAP = new TemporalField[64]; static { // SDF = SimpleDateFormat FIELD_MAP['G' & 0x3f] = ChronoField.ERA; // SDF, LDML (different to both for 1/2 chars) FIELD_MAP['y' & 0x3f] = ChronoField.YEAR_OF_ERA; // SDF, LDML FIELD_MAP['u' & 0x3f] = ChronoField.YEAR; // LDML (different in SDF) FIELD_MAP['Q' & 0x3f] = IsoFields.QUARTER_OF_YEAR; // LDML (removed quarter from 310) FIELD_MAP['q' & 0x3f] = IsoFields.QUARTER_OF_YEAR; // LDML (stand-alone) FIELD_MAP['M' & 0x3f] = ChronoField.MONTH_OF_YEAR; // SDF, LDML FIELD_MAP['L' & 0x3f] = ChronoField.MONTH_OF_YEAR; // SDF, LDML (stand-alone) FIELD_MAP['D' & 0x3f] = ChronoField.DAY_OF_YEAR; // SDF, LDML FIELD_MAP['d' & 0x3f] = ChronoField.DAY_OF_MONTH; // SDF, LDML FIELD_MAP['F' & 0x3f] = ChronoField.ALIGNED_WEEK_OF_MONTH; // SDF, LDML FIELD_MAP['E' & 0x3f] = ChronoField.DAY_OF_WEEK; // SDF, LDML (different to both for 1/2 chars) FIELD_MAP['c' & 0x3f] = ChronoField.DAY_OF_WEEK; // LDML (stand-alone) FIELD_MAP['e' & 0x3f] = ChronoField.DAY_OF_WEEK; // LDML (needs localized week number) FIELD_MAP['a' & 0x3f] = ChronoField.AMPM_OF_DAY; // SDF, LDML FIELD_MAP['H' & 0x3f] = ChronoField.HOUR_OF_DAY; // SDF, LDML FIELD_MAP['k' & 0x3f] = ChronoField.CLOCK_HOUR_OF_DAY; // SDF, LDML FIELD_MAP['K' & 0x3f] = ChronoField.HOUR_OF_AMPM; // SDF, LDML FIELD_MAP['h' & 0x3f] = ChronoField.CLOCK_HOUR_OF_AMPM; // SDF, LDML FIELD_MAP['m' & 0x3f] = ChronoField.MINUTE_OF_HOUR; // SDF, LDML FIELD_MAP['s' & 0x3f] = ChronoField.SECOND_OF_MINUTE; // SDF, LDML FIELD_MAP['S' & 0x3f] = ChronoField.NANO_OF_SECOND; // LDML (SDF uses milli-of-second number) FIELD_MAP['A' & 0x3f] = ChronoField.MILLI_OF_DAY; // LDML FIELD_MAP['n' & 0x3f] = ChronoField.NANO_OF_SECOND; // 310 (proposed for LDML) FIELD_MAP['N' & 0x3f] = ChronoField.NANO_OF_DAY; // 310 (proposed for LDML) FIELD_MAP['g' & 0x3f] = JulianFields.MODIFIED_JULIAN_DAY; private void parsePattern(String pattern) { // ... TemporalField field = FIELD_MAP[cur & 0x3f]; // ... } ------------- PR Comment: https://git.openjdk.org/jdk/pull/26634#issuecomment-3157086644 From liach at openjdk.org Mon Sep 29 04:41:14 2025 From: liach at openjdk.org (Chen Liang) Date: Mon, 29 Sep 2025 04:41:14 GMT Subject: RFR: 8368825: Change the DateTimeFormatterBuilder::FIELD_MAP type from Map to Array In-Reply-To: References: Message-ID: <81v0LE9uGuqTHPdPXKg6ABzXy9IJEzpcG0Vl8G0bIuM=.b896ba22-a045-4e98-b5a6-e9ca42f2b5b3@github.com> On Tue, 5 Aug 2025 01:42:53 GMT, Shaojin Wen wrote: > The DateTimeFormatterBuilder::FIELD_MAP is of type Map, with key values in the range 'A-Z' and 'a-z'. > > We can change the type of FIELD_MAP to an array of length 128 and then use char as an index to access the array. > > This will reduce the memory usage of DateTimeFormatterBuilder::FIELD_MAP and improve performance slightly. > > By analyzing the jmap dump memory, we can see that the memory size used by DateTimeFormatterBuilder::FIELD_MAP has dropped from 1.12kb to 528b, the number of objects has decreased and the memory has become more flat. as shown below: > * before > image > > * after > image A sensible minor optimization. Looking at this code, I think to accomplish real performance gains, we might need some redesign to simplify the branchiness and speed up lookup. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26634#issuecomment-3344845684 From myankelevich at openjdk.org Mon Sep 29 10:28:19 2025 From: myankelevich at openjdk.org (Mikhail Yankelevich) Date: Mon, 29 Sep 2025 10:28:19 GMT Subject: RFR: 8365072: Refactor tests to use PEM API (Phase 2) [v3] In-Reply-To: <_Qf2f6cwWoaNPHpm8TfYeWQTiiqhn-z291PeGY7uP6U=.8e77e560-d233-4232-86e8-4e0da5180947@github.com> References: <_Qf2f6cwWoaNPHpm8TfYeWQTiiqhn-z291PeGY7uP6U=.8e77e560-d233-4232-86e8-4e0da5180947@github.com> Message-ID: > Tests changed in this PR: > 1. test/jdk/java/security/cert/CertPathBuilder/selfIssued/StatusLoopDependency.java > 2. test/jdk/java/security/cert/CertPathValidator/indirectCRL/CircularCRLTwoLevel.java > 3. test/jdk/java/security/cert/CertPathValidator/indirectCRL/CircularCRLTwoLevelRevoked.java > 6. test/jdk/sun/security/ssl/ClientHandshaker/RSAExport.java > 7. test/jdk/javax/net/ssl/ServerName/SSLSocketSNISensitive.java > 9. test/jdk/sun/security/ssl/X509TrustManagerImpl/BasicConstraints.java > 10. test/jdk/sun/security/ssl/X509TrustManagerImpl/ComodoHacker.java > 11. test/jdk/javax/net/ssl/interop/ClientHelloInterOp.java > 12. test/jdk/sun/security/rsa/InvalidBitString.java > 14. test/jdk/java/security/cert/CertPathBuilder/NoExtensions.java > 17. test/jdk/sun/security/provider/certpath/DisabledAlgorithms/CPValidatorTrustAnchor.java > 19. test/jdk/sun/security/x509/X509CRLImpl/Verify.java > > PEMRecord tests will be done under a subtask [JDK-8367326](https://bugs.openjdk.org/browse/JDK-8367326) Mikhail Yankelevich has updated the pull request incrementally with 364 additional commits since the last revision: - removed pemrecord usage - 8365190: Remove LockingMode related code from share Reviewed-by: aboldtch, dholmes, ayang, coleenp, lmesnik, rcastanedalo - 8367025: zIndexDistributor.hpp uses angle-bracket inclusion of globalDefinitions.hpp Reviewed-by: aboldtch, tschatzl, jwaters - 8360219: [AIX] assert(locals_base >= l2) failed: bad placement Reviewed-by: dlong, mdoerr - 8366864: Sort os/linux includes Reviewed-by: ayang, dholmes - 8366874: Test gc/arguments/TestParallelGCErgo.java fails with UseTransparentHugePages Reviewed-by: ayang, shade, stefank, tschatzl - 8351260: java.lang.AssertionError: Unexpected type tree: (ERROR) = (ERROR) Reviewed-by: vromero - 8365776: Convert JShell tests to use JUnit instead of TestNG Reviewed-by: vromero - 8354871: Replace stack map frame type magics with constants Reviewed-by: liach - 8361533: Apply java.io.Serial annotations in java.logging Reviewed-by: rriggs - ... and 354 more: https://git.openjdk.org/jdk/compare/d44cb277...e0be5eaa ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27194/files - new: https://git.openjdk.org/jdk/pull/27194/files/d44cb277..e0be5eaa Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27194&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27194&range=01-02 Stats: 53711 lines in 1891 files changed: 31453 ins; 14034 del; 8224 mod Patch: https://git.openjdk.org/jdk/pull/27194.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27194/head:pull/27194 PR: https://git.openjdk.org/jdk/pull/27194 From rriggs at openjdk.org Mon Sep 29 16:08:08 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 29 Sep 2025 16:08:08 GMT Subject: RFR: 8368825: Change the DateTimeFormatterBuilder::FIELD_MAP type from Map to Array In-Reply-To: References: Message-ID: On Tue, 5 Aug 2025 01:42:53 GMT, Shaojin Wen wrote: > The DateTimeFormatterBuilder::FIELD_MAP is of type Map, with key values in the range 'A-Z' and 'a-z'. > > We can change the type of FIELD_MAP to an array of length 128 and then use char as an index to access the array. > > This will reduce the memory usage of DateTimeFormatterBuilder::FIELD_MAP and improve performance slightly. > > By analyzing the jmap dump memory, we can see that the memory size used by DateTimeFormatterBuilder::FIELD_MAP has dropped from 1.12kb to 528b, the number of objects has decreased and the memory has become more flat. as shown below: > * before > image > > * after > image The suggestion, from Claes, to use and expression switch would work well too. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26634#issuecomment-3347842788 From rriggs at openjdk.org Mon Sep 29 16:11:10 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 29 Sep 2025 16:11:10 GMT Subject: RFR: 8366829: Add constants for the Duration MIN/MAX values In-Reply-To: References: Message-ID: On Fri, 26 Sep 2025 23:06:36 GMT, Pavel Rappo wrote: > We have [recently discussed][] a possibility of adding the `Duration.MIN` and `Duration.MAX` constants. Can we now start implementation? If and when we are in agreement on this PR, I will file a CSR. > > I drafted a minimal specification and added some tests. I tried to phrase the spec for `Duration.MIN` in a way that makes it clear that `Duration.MIN` is the most negative value and not the least positive. > > [recently discussed]: https://mail.openjdk.org/pipermail/core-libs-dev/2025-September/151098.html Looks good, better with copyright updates. ------------- PR Review: https://git.openjdk.org/jdk/pull/27534#pullrequestreview-3280653998 From naoto at openjdk.org Mon Sep 29 16:21:08 2025 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 29 Sep 2025 16:21:08 GMT Subject: RFR: 8366829: Add constants for the Duration MIN/MAX values In-Reply-To: References: Message-ID: On Fri, 26 Sep 2025 23:06:36 GMT, Pavel Rappo wrote: > We have [recently discussed][] a possibility of adding the `Duration.MIN` and `Duration.MAX` constants. Can we now start implementation? If and when we are in agreement on this PR, I will file a CSR. > > I drafted a minimal specification and added some tests. I tried to phrase the spec for `Duration.MIN` in a way that makes it clear that `Duration.MIN` is the most negative value and not the least positive. > > [recently discussed]: https://mail.openjdk.org/pipermail/core-libs-dev/2025-September/151098.html LGTM too. I think we can put some takeaways from the discussion into the javadoc as `@apiNote`. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27534#issuecomment-3347921682 From prappo at openjdk.org Mon Sep 29 16:26:01 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Mon, 29 Sep 2025 16:26:01 GMT Subject: RFR: 8366829: Add constants for the Duration MIN/MAX values In-Reply-To: References: Message-ID: On Mon, 29 Sep 2025 16:18:14 GMT, Naoto Sato wrote: > we can put some takeaways from the discussion into the javadoc Any particular suggestions? ------------- PR Comment: https://git.openjdk.org/jdk/pull/27534#issuecomment-3347939821 From rriggs at openjdk.org Mon Sep 29 19:17:29 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 29 Sep 2025 19:17:29 GMT Subject: RFR: 8366829: Add constants for the Duration MIN/MAX values In-Reply-To: References: Message-ID: On Fri, 26 Sep 2025 23:06:36 GMT, Pavel Rappo wrote: > We have [recently discussed][] a possibility of adding the `Duration.MIN` and `Duration.MAX` constants. Can we now start implementation? If and when we are in agreement on this PR, I will file a CSR. > > I drafted a minimal specification and added some tests. I tried to phrase the spec for `Duration.MIN` in a way that makes it clear that `Duration.MIN` is the most negative value and not the least positive. > > [recently discussed]: https://mail.openjdk.org/pipermail/core-libs-dev/2025-September/151098.html I'd suggest describing it as a sentinel value, not suitable for adding or subtracting from any Temporal value due to the potential to overflow and throwing of ArithmeticException. Should not be used with `plus` or `minus` on any Temporal value. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27534#issuecomment-3348653060 From naoto at openjdk.org Mon Sep 29 19:17:34 2025 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 29 Sep 2025 19:17:34 GMT Subject: RFR: 8366829: Add constants for the Duration MIN/MAX values In-Reply-To: References: Message-ID: On Mon, 29 Sep 2025 16:22:59 GMT, Pavel Rappo wrote: > > we can put some takeaways from the discussion into the javadoc > > Any particular suggestions? Since there was a discussion of possible misuse of the proposed constants. I cannot come up with a concise description though. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27534#issuecomment-3348654235 From prappo at openjdk.org Mon Sep 29 21:36:35 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Mon, 29 Sep 2025 21:36:35 GMT Subject: RFR: 8366829: Add constants for the Duration MIN/MAX values [v2] In-Reply-To: References: Message-ID: <6lKi-7evBK6--V_1dPRo55Zf2ZU7euf9v-VJiperHg4=.b97f7a84-1ac2-4c6b-b1fb-581640ce1326@github.com> > We have [recently discussed][] a possibility of adding the `Duration.MIN` and `Duration.MAX` constants. Can we now start implementation? If and when we are in agreement on this PR, I will file a CSR. > > I drafted a minimal specification and added some tests. I tried to phrase the spec for `Duration.MIN` in a way that makes it clear that `Duration.MIN` is the most negative value and not the least positive. > > [recently discussed]: https://mail.openjdk.org/pipermail/core-libs-dev/2025-September/151098.html Pavel Rappo has updated the pull request incrementally with two additional commits since the last revision: - Update copyright years Note: any commit hashes below might be outdated due to subsequent history rewriting (e.g. git rebase). + update src/java.base/share/classes/java/time/temporal/ChronoUnit.java due to 9a54ba1d353 + update test/jdk/java/time/tck/java/time/TCKDuration.java due to 9a54ba1d353 - Provide @apiNote as suggested ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27534/files - new: https://git.openjdk.org/jdk/pull/27534/files/9a54ba1d..c5a3f228 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27534&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27534&range=00-01 Stats: 20 lines in 3 files changed: 18 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/27534.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27534/head:pull/27534 PR: https://git.openjdk.org/jdk/pull/27534 From prappo at openjdk.org Mon Sep 29 21:46:06 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Mon, 29 Sep 2025 21:46:06 GMT Subject: RFR: 8366829: Add constants for the Duration MIN/MAX values In-Reply-To: References: Message-ID: On Mon, 29 Sep 2025 19:07:36 GMT, Roger Riggs wrote: > I'd suggest describing it as a sentinel value, not suitable for adding or subtracting from any Temporal value due to the potential to overflow and throwing of ArithmeticException. Should not be used with `plus` or `minus` on any Temporal value. I provided initial `@apiNote`; please have a look. I mentioned that adding an edge value to or subtracting it from an instant should not be done. But do we really need to say anything similar about **all** implementations of `Temporal` here, like you suggested? Here's my thinking. While it's true in java.time, in the wild, there might be some implementations of `Temporal` which we don't know anything about. Similarly, in the future, java.time might get an implementation of `Temporal` for which it won't be true. Does it make sense, or am I overthinking it? ------------- PR Comment: https://git.openjdk.org/jdk/pull/27534#issuecomment-3349156490 From jlu at openjdk.org Mon Sep 29 21:46:18 2025 From: jlu at openjdk.org (Justin Lu) Date: Mon, 29 Sep 2025 21:46:18 GMT Subject: RFR: 6177299: [Fmt-Nu] NumberFormat.getPercentInstance() does not work correctly Message-ID: Please review this PR which corrects an edge case bug for `DecimalFormat` parsing when a multiplier is applied. This issue applies to any parsed Strings whose resultant double value is rounded to _9.223372036854776E18_ after the multiplier is applied. The returned value is incorrectly given as `Long.MAX_VALUE` when it should be returned as the double _9.223372036854776E18_. For example, the String _"922,337,203,685,477,600,000%"_ is first parsed as _9.223372036854776E20_, after which the multiplier is then applied to give _9.223372036854776E18_. The original code evaluates `9.223372036854776E18 == (double)(long)9.223372036854776E18` as true, leading to the long representation returned. The double value should first be checked if it is within the long min/max range before being checked if it can be represented as a long. Note that the check should be inclusive, as during the comparison, `Long.MAX_VALUE` is promoted to _9.223372036854776E18_. Thus _9.223372036854775E18_ correctly compares as false, and all doubles above compare as true. ------------- Commit messages: - init Changes: https://git.openjdk.org/jdk/pull/27563/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27563&range=00 Issue: https://bugs.openjdk.org/browse/JDK-6177299 Stats: 30 lines in 2 files changed: 25 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/27563.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27563/head:pull/27563 PR: https://git.openjdk.org/jdk/pull/27563 From swen at openjdk.org Tue Sep 30 00:58:17 2025 From: swen at openjdk.org (Shaojin Wen) Date: Tue, 30 Sep 2025 00:58:17 GMT Subject: RFR: 8368825: Change the DateTimeFormatterBuilder::FIELD_MAP type from Map to Array In-Reply-To: References: Message-ID: On Tue, 5 Aug 2025 01:42:53 GMT, Shaojin Wen wrote: > The DateTimeFormatterBuilder::FIELD_MAP is of type Map, with key values in the range 'A-Z' and 'a-z'. > > We can change the type of FIELD_MAP to an array of length 128 and then use char as an index to access the array. > > This will reduce the memory usage of DateTimeFormatterBuilder::FIELD_MAP and improve performance slightly. > > By analyzing the jmap dump memory, we can see that the memory size used by DateTimeFormatterBuilder::FIELD_MAP has dropped from 1.12kb to 528b, the number of objects has decreased and the memory has become more flat. as shown below: > * before > image > > * after > image j.t.f.DateTimeFormatterBuilder#parsePattern This is a large method with codeSize 1300+. I think optimizing it should be a separate PR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26634#issuecomment-3349552375 From liach at openjdk.org Tue Sep 30 01:44:48 2025 From: liach at openjdk.org (Chen Liang) Date: Tue, 30 Sep 2025 01:44:48 GMT Subject: RFR: 8368825: Change the DateTimeFormatterBuilder::FIELD_MAP type from Map to Array In-Reply-To: References: Message-ID: On Tue, 5 Aug 2025 01:42:53 GMT, Shaojin Wen wrote: > The DateTimeFormatterBuilder::FIELD_MAP is of type Map, with key values in the range 'A-Z' and 'a-z'. > > We can change the type of FIELD_MAP to an array of length 128 and then use char as an index to access the array. > > This will reduce the memory usage of DateTimeFormatterBuilder::FIELD_MAP and improve performance slightly. > > By analyzing the jmap dump memory, we can see that the memory size used by DateTimeFormatterBuilder::FIELD_MAP has dropped from 1.12kb to 528b, the number of objects has decreased and the memory has become more flat. as shown below: > * before > image > > * after > image We might just remove this map when we optimize that huge method, which is this map's only user. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26634#issuecomment-3349631832 From swen at openjdk.org Tue Sep 30 03:25:28 2025 From: swen at openjdk.org (Shaojin Wen) Date: Tue, 30 Sep 2025 03:25:28 GMT Subject: RFR: 8368825: Change the DateTimeFormatterBuilder::FIELD_MAP type from Map to Array [v2] In-Reply-To: References: Message-ID: > The DateTimeFormatterBuilder::FIELD_MAP is of type Map, with key values in the range 'A-Z' and 'a-z'. > > We can change the type of FIELD_MAP to an array of length 128 and then use char as an index to access the array. > > This will reduce the memory usage of DateTimeFormatterBuilder::FIELD_MAP and improve performance slightly. > > By analyzing the jmap dump memory, we can see that the memory size used by DateTimeFormatterBuilder::FIELD_MAP has dropped from 1.12kb to 528b, the number of objects has decreased and the memory has become more flat. as shown below: > * before > image > > * after > image Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: use switch, from @RogerRiggs & @cl4es ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26634/files - new: https://git.openjdk.org/jdk/pull/26634/files/aeab63da..abb2123e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26634&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26634&range=00-01 Stats: 44 lines in 1 file changed: 0 ins; 8 del; 36 mod Patch: https://git.openjdk.org/jdk/pull/26634.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26634/head:pull/26634 PR: https://git.openjdk.org/jdk/pull/26634 From jpai at openjdk.org Tue Sep 30 06:55:49 2025 From: jpai at openjdk.org (Jaikiran Pai) Date: Tue, 30 Sep 2025 06:55:49 GMT Subject: RFR: 8368357: Some source files have initial blank lines In-Reply-To: <9121m5P5MFrgd7v8Rl88DaZLT6UBKVUciMcZvWNtqiM=.0fdcc411-6f28-4dc2-bb54-9c37712d22d2@github.com> References: <9121m5P5MFrgd7v8Rl88DaZLT6UBKVUciMcZvWNtqiM=.0fdcc411-6f28-4dc2-bb54-9c37712d22d2@github.com> Message-ID: <-AtApQjIshlnieD15eDe-CktLxAG14eDbk8USBlQ0P0=.dbf5e726-ba74-4ba3-aeb7-97dd820c130b@github.com> On Thu, 25 Sep 2025 13:44:13 GMT, Francesco Andreuzzi wrote: > Removing some spurious blank lines at the beginning of the file. Looks trivial to me. This looks good and trivial to me. ------------- Marked as reviewed by jpai (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27489#pullrequestreview-3282862820 From fandreuzzi at openjdk.org Tue Sep 30 10:44:22 2025 From: fandreuzzi at openjdk.org (Francesco Andreuzzi) Date: Tue, 30 Sep 2025 10:44:22 GMT Subject: Integrated: 8368357: Some source files have initial blank lines In-Reply-To: <9121m5P5MFrgd7v8Rl88DaZLT6UBKVUciMcZvWNtqiM=.0fdcc411-6f28-4dc2-bb54-9c37712d22d2@github.com> References: <9121m5P5MFrgd7v8Rl88DaZLT6UBKVUciMcZvWNtqiM=.0fdcc411-6f28-4dc2-bb54-9c37712d22d2@github.com> Message-ID: On Thu, 25 Sep 2025 13:44:13 GMT, Francesco Andreuzzi wrote: > Removing some spurious blank lines at the beginning of the file. Looks trivial to me. This pull request has now been integrated. Changeset: ba0a6eed Author: Francesco Andreuzzi Committer: Albert Mingkun Yang URL: https://git.openjdk.org/jdk/commit/ba0a6eed1a6a22bd4c1d159592b62e054afa401a Stats: 8 lines in 8 files changed: 0 ins; 8 del; 0 mod 8368357: Some source files have initial blank lines Reviewed-by: stefank, ayang, serb, jwaters, jpai ------------- PR: https://git.openjdk.org/jdk/pull/27489 From rgiulietti at openjdk.org Tue Sep 30 13:55:25 2025 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Tue, 30 Sep 2025 13:55:25 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v5] In-Reply-To: References: Message-ID: <6_nDc6bAQ1wXY30wFuXSX9ez69jAUPkOu9vb3FODHfI=.bddc91a4-db44-49a5-97a4-d241286946f0@github.com> On Thu, 25 Sep 2025 18:27:12 GMT, Johannes Graham wrote: >> Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: >> >> update assert > > Thank you all for your time. @j3graham > This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. Do you plan to address the removal of getChars() anytime soon? No pressure here, but since I'm working on `FloatingDecimal` as well, I just want to make sure we don't step on each other's toes. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27118#issuecomment-3352287571 From duke at openjdk.org Tue Sep 30 14:48:29 2025 From: duke at openjdk.org (Johannes Graham) Date: Tue, 30 Sep 2025 14:48:29 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v5] In-Reply-To: References: Message-ID: <-omO5ZB4p9FLJBk1kNsHL7Z3isYrnD6CtyqU6lxmsO8=.b88633e5-2cdb-4ce8-a575-27a1164d2747@github.com> On Wed, 24 Sep 2025 14:59:05 GMT, Johannes Graham wrote: >> When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. >> >> This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. > > Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: > > update assert Happy do do it - I was actually worried about stepping on your toes a well. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27118#issuecomment-3352557450 From rgiulietti at openjdk.org Tue Sep 30 14:54:22 2025 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Tue, 30 Sep 2025 14:54:22 GMT Subject: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v5] In-Reply-To: References: Message-ID: <054QsohR81mUZg1AIxAI-zJ5UCL72TLG4omNEtA8Vyo=.d23e393e-f50c-4663-bfa8-674120c133ec@github.com> On Wed, 24 Sep 2025 14:59:05 GMT, Johannes Graham wrote: >> When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array. >> >> This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there. > > Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: > > update assert OK, then feel free to open a JBS issue and work on it. My patch will take another couple of weeks, so chances for interference are unlikely. BTW, beyond `getChars()`, I think that `isNegative()` and `isExceptional()` are unused as well, so might be removed in that same PR. Up to you, of course. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27118#issuecomment-3352581136 From rriggs at openjdk.org Tue Sep 30 15:05:31 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 30 Sep 2025 15:05:31 GMT Subject: RFR: 8368825: Change the DateTimeFormatterBuilder::FIELD_MAP type from Map to Array [v2] In-Reply-To: References: Message-ID: On Tue, 30 Sep 2025 03:25:28 GMT, Shaojin Wen wrote: >> The DateTimeFormatterBuilder::FIELD_MAP is of type Map, with key values in the range 'A-Z' and 'a-z'. >> >> We can change the type of FIELD_MAP to an array of length 128 and then use char as an index to access the array. >> >> This will reduce the memory usage of DateTimeFormatterBuilder::FIELD_MAP and improve performance slightly. >> >> By analyzing the jmap dump memory, we can see that the memory size used by DateTimeFormatterBuilder::FIELD_MAP has dropped from 1.12kb to 528b, the number of objects has decreased and the memory has become more flat. as shown below: >> * before >> image >> >> * after >> image > > Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: > > use switch, from @RogerRiggs & @cl4es looks good. ------------- Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26634#pullrequestreview-3285471554 From naoto at openjdk.org Tue Sep 30 16:31:08 2025 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 30 Sep 2025 16:31:08 GMT Subject: RFR: 8366829: Add constants for the Duration MIN/MAX values [v2] In-Reply-To: <6lKi-7evBK6--V_1dPRo55Zf2ZU7euf9v-VJiperHg4=.b97f7a84-1ac2-4c6b-b1fb-581640ce1326@github.com> References: <6lKi-7evBK6--V_1dPRo55Zf2ZU7euf9v-VJiperHg4=.b97f7a84-1ac2-4c6b-b1fb-581640ce1326@github.com> Message-ID: On Mon, 29 Sep 2025 21:36:35 GMT, Pavel Rappo wrote: >> We have [recently discussed][] a possibility of adding the `Duration.MIN` and `Duration.MAX` constants. Can we now start implementation? If and when we are in agreement on this PR, I will file a CSR. >> >> I drafted a minimal specification and added some tests. I tried to phrase the spec for `Duration.MIN` in a way that makes it clear that `Duration.MIN` is the most negative value and not the least positive. >> >> [recently discussed]: https://mail.openjdk.org/pipermail/core-libs-dev/2025-September/151098.html > > Pavel Rappo has updated the pull request incrementally with two additional commits since the last revision: > > - Update copyright years > > Note: any commit hashes below might be outdated due to subsequent > history rewriting (e.g. git rebase). > > + update src/java.base/share/classes/java/time/temporal/ChronoUnit.java due to 9a54ba1d353 > + update test/jdk/java/time/tck/java/time/TCKDuration.java due to 9a54ba1d353 > - Provide @apiNote as suggested Marked as reviewed by naoto (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27534#pullrequestreview-3285828520 From naoto at openjdk.org Tue Sep 30 16:36:22 2025 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 30 Sep 2025 16:36:22 GMT Subject: RFR: 8368825: Change the DateTimeFormatterBuilder::FIELD_MAP type from Map to Array [v2] In-Reply-To: References: Message-ID: <7Yu5-ZKFd_poM59kVbLk1ssCES-in9lqSRDFSUuWZiA=.417305bf-6c9b-4afb-83c5-ece2a22a0655@github.com> On Tue, 30 Sep 2025 03:25:28 GMT, Shaojin Wen wrote: >> The DateTimeFormatterBuilder::FIELD_MAP is of type Map, with key values in the range 'A-Z' and 'a-z'. >> >> We can change the type of FIELD_MAP to an array of length 128 and then use char as an index to access the array. >> >> This will reduce the memory usage of DateTimeFormatterBuilder::FIELD_MAP and improve performance slightly. >> >> By analyzing the jmap dump memory, we can see that the memory size used by DateTimeFormatterBuilder::FIELD_MAP has dropped from 1.12kb to 528b, the number of objects has decreased and the memory has become more flat. as shown below: >> * before >> image >> >> * after >> image > > Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: > > use switch, from @RogerRiggs & @cl4es src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java line 126: > 124: import jdk.internal.util.DateTimeHelper; > 125: import jdk.internal.util.DecimalDigits; > 126: import jdk.internal.vm.annotation.Stable; Leftover? src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java line 2227: > 2225: // LDML - U - cycle year name, not supported by 310 yet > 2226: // LDML - l - deprecated > 2227: // LDML - j - not relevant Do not remove these informational comments ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26634#discussion_r2392196321 PR Review Comment: https://git.openjdk.org/jdk/pull/26634#discussion_r2392210599 From naoto at openjdk.org Tue Sep 30 17:19:14 2025 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 30 Sep 2025 17:19:14 GMT Subject: RFR: 6177299: [Fmt-Nu] NumberFormat.getPercentInstance() does not work correctly In-Reply-To: References: Message-ID: On Mon, 29 Sep 2025 21:38:28 GMT, Justin Lu wrote: > Please review this PR which corrects an edge case bug for `DecimalFormat` parsing when a multiplier is applied. > > This issue applies to any parsed Strings whose resultant double value is rounded to _9.223372036854776E18_ after the multiplier is applied. The returned value is incorrectly given as `Long.MAX_VALUE` when it should be returned as the double _9.223372036854776E18_. > > For example, the String _"922,337,203,685,477,600,000%"_ is first parsed as _9.223372036854776E20_, after which the multiplier is then applied to give _9.223372036854776E18_. The original code evaluates `9.223372036854776E18 == (double)(long)9.223372036854776E18` as true, leading to the long representation returned. > > The double value should first be checked if it is within the long min/max range before being checked if it can be represented as a long. Note that the check should be inclusive, as during the comparison, `Long.MAX_VALUE` is promoted to _9.223372036854776E18_. Thus _9.223372036854775E18_ correctly compares as false, and all doubles above compare as true. Looks good. I think the tests can move to more generic NumberFormat regression tests, such as NumberRegression.java, as LenientParseTest sounds dedicated to `lenient parsing`. ------------- PR Review: https://git.openjdk.org/jdk/pull/27563#pullrequestreview-3285988635 From jlu at openjdk.org Tue Sep 30 17:54:21 2025 From: jlu at openjdk.org (Justin Lu) Date: Tue, 30 Sep 2025 17:54:21 GMT Subject: RFR: 6177299: [Fmt-Nu] NumberFormat.getPercentInstance() does not work correctly [v2] In-Reply-To: References: Message-ID: > Please review this PR which corrects an edge case bug for `DecimalFormat` parsing when a multiplier is applied. > > This issue applies to any parsed Strings whose resultant double value is rounded to _9.223372036854776E18_ after the multiplier is applied. The returned value is incorrectly given as `Long.MAX_VALUE` when it should be returned as the double _9.223372036854776E18_. > > For example, the String _"922,337,203,685,477,600,000%"_ is first parsed as _9.223372036854776E20_, after which the multiplier is then applied to give _9.223372036854776E18_. The original code evaluates `9.223372036854776E18 == (double)(long)9.223372036854776E18` as true, leading to the long representation returned. > > The double value should first be checked if it is within the long min/max range before being checked if it can be represented as a long. Note that the check should be inclusive, as during the comparison, `Long.MAX_VALUE` is promoted to _9.223372036854776E18_. Thus _9.223372036854775E18_ correctly compares as false, and all doubles above compare as true. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Naoto review - move test to NR.java ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27563/files - new: https://git.openjdk.org/jdk/pull/27563/files/fc00ec3b..d24e6dff Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27563&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27563&range=00-01 Stats: 66 lines in 2 files changed: 39 ins; 24 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/27563.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27563/head:pull/27563 PR: https://git.openjdk.org/jdk/pull/27563 From naoto at openjdk.org Tue Sep 30 18:11:53 2025 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 30 Sep 2025 18:11:53 GMT Subject: RFR: 6177299: [Fmt-Nu] NumberFormat.getPercentInstance() does not work correctly [v2] In-Reply-To: References: Message-ID: On Tue, 30 Sep 2025 17:54:21 GMT, Justin Lu wrote: >> Please review this PR which corrects an edge case bug for `DecimalFormat` parsing when a multiplier is applied. >> >> This issue applies to any parsed Strings whose resultant double value is rounded to _9.223372036854776E18_ after the multiplier is applied. The returned value is incorrectly given as `Long.MAX_VALUE` when it should be returned as the double _9.223372036854776E18_. >> >> For example, the String _"922,337,203,685,477,600,000%"_ is first parsed as _9.223372036854776E20_, after which the multiplier is then applied to give _9.223372036854776E18_. The original code evaluates `9.223372036854776E18 == (double)(long)9.223372036854776E18` as true, leading to the long representation returned. >> >> The double value should first be checked if it is within the long min/max range before being checked if it can be represented as a long. Note that the check should be inclusive, as during the comparison, `Long.MAX_VALUE` is promoted to _9.223372036854776E18_. Thus _9.223372036854775E18_ correctly compares as false, and all doubles above compare as true. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Naoto review - move test to NR.java Marked as reviewed by naoto (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/27563#pullrequestreview-3286169680 From scolebourne at openjdk.org Tue Sep 30 18:54:55 2025 From: scolebourne at openjdk.org (Stephen Colebourne) Date: Tue, 30 Sep 2025 18:54:55 GMT Subject: RFR: 8366829: Add constants for the Duration MIN/MAX values [v2] In-Reply-To: <6lKi-7evBK6--V_1dPRo55Zf2ZU7euf9v-VJiperHg4=.b97f7a84-1ac2-4c6b-b1fb-581640ce1326@github.com> References: <6lKi-7evBK6--V_1dPRo55Zf2ZU7euf9v-VJiperHg4=.b97f7a84-1ac2-4c6b-b1fb-581640ce1326@github.com> Message-ID: <9JzyRLB1Ix0tuSHEyZhPa5oiMA1a3U99IJCAtS8IVqI=.771ac541-986b-4c11-902e-ea892683bab6@github.com> On Mon, 29 Sep 2025 21:36:35 GMT, Pavel Rappo wrote: >> We have [recently discussed][] a possibility of adding the `Duration.MIN` and `Duration.MAX` constants. Can we now start implementation? If and when we are in agreement on this PR, I will file a CSR. >> >> I drafted a minimal specification and added some tests. I tried to phrase the spec for `Duration.MIN` in a way that makes it clear that `Duration.MIN` is the most negative value and not the least positive. >> >> [recently discussed]: https://mail.openjdk.org/pipermail/core-libs-dev/2025-September/151098.html > > Pavel Rappo has updated the pull request incrementally with two additional commits since the last revision: > > - Update copyright years > > Note: any commit hashes below might be outdated due to subsequent > history rewriting (e.g. git rebase). > > + update src/java.base/share/classes/java/time/temporal/ChronoUnit.java due to 9a54ba1d353 > + update test/jdk/java/time/tck/java/time/TCKDuration.java due to 9a54ba1d353 > - Provide @apiNote as suggested src/java.base/share/classes/java/time/Duration.java line 151: > 149: * instant}, as doing so will cause overflow. Extreme care should be taken > 150: * when performing {@code Duration} arithmetic on them, such as adding > 151: * them to or subtracting them from another duration. https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Instant.html#MIN Suggestion: * The minimum supported Duration, which is {@code Long.MIN_VALUE} seconds. * * @apiNote This constant represents the smallest possible instance of {@code Duration}. * Since Durations are directed, the smallest possible duration is negative. *

* The constant is intended to be used as a sentinel value, such as in * comparisons and tests. Care should be taken when performing arithmetic * on {@code MIN} as there is a high risk that {@code ArithmeticException} * will be thrown. Similar for MAX. But it can repeat the class header comment about being longer than the age of the universe, ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27534#discussion_r2392531493 From prappo at openjdk.org Tue Sep 30 19:18:45 2025 From: prappo at openjdk.org (Pavel Rappo) Date: Tue, 30 Sep 2025 19:18:45 GMT Subject: RFR: 8366829: Add constants for the Duration MIN/MAX values [v2] In-Reply-To: <9JzyRLB1Ix0tuSHEyZhPa5oiMA1a3U99IJCAtS8IVqI=.771ac541-986b-4c11-902e-ea892683bab6@github.com> References: <6lKi-7evBK6--V_1dPRo55Zf2ZU7euf9v-VJiperHg4=.b97f7a84-1ac2-4c6b-b1fb-581640ce1326@github.com> <9JzyRLB1Ix0tuSHEyZhPa5oiMA1a3U99IJCAtS8IVqI=.771ac541-986b-4c11-902e-ea892683bab6@github.com> Message-ID: On Tue, 30 Sep 2025 18:51:17 GMT, Stephen Colebourne wrote: >> Pavel Rappo has updated the pull request incrementally with two additional commits since the last revision: >> >> - Update copyright years >> >> Note: any commit hashes below might be outdated due to subsequent >> history rewriting (e.g. git rebase). >> >> + update src/java.base/share/classes/java/time/temporal/ChronoUnit.java due to 9a54ba1d353 >> + update test/jdk/java/time/tck/java/time/TCKDuration.java due to 9a54ba1d353 >> - Provide @apiNote as suggested > > src/java.base/share/classes/java/time/Duration.java line 151: > >> 149: * instant}, as doing so will cause overflow. Extreme care should be taken >> 150: * when performing {@code Duration} arithmetic on them, such as adding >> 151: * them to or subtracting them from another duration. > > https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Instant.html#MIN > > Suggestion: > > * The minimum supported Duration, which is {@code Long.MIN_VALUE} seconds. > * > * @apiNote This constant represents the smallest possible instance of {@code Duration}. > * Since Durations are directed, the smallest possible duration is negative. > *

> * The constant is intended to be used as a sentinel value, such as in > * comparisons and tests. Care should be taken when performing arithmetic > * on {@code MIN} as there is a high risk that {@code ArithmeticException} > * will be thrown. > > > Similar for MAX. But it can repeat the class header comment about being longer than the age of the universe, > Care should be taken when performing arithmetic on `MIN` as there is a high risk that `ArithmeticException` will be thrown. It's a bit less specific than what I had. I also note that aside from `ArithmeticException`, `DateTimeException` might be thrown too. The former is thrown for long overflow, while the latter is for exceeding `Instant` boundaries. @RogerRiggs, @naotoj any comments for this suggestion from @jodastephen? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27534#discussion_r2392595410 From jessicawuttig83 at gmail.com Tue Sep 30 19:46:07 2025 From: jessicawuttig83 at gmail.com (Jessica Wuttig) Date: Tue, 30 Sep 2025 20:46:07 +0100 Subject: =?utf-8?b?2KfZhti22YUg2YTYrdiz2KfYqCBDYW52YSBQcm8g?= =?utf-8?b?2YXYrNin2YbZi9inINin2YTYotmG?= Message-ID: ???? ???? ??? ???? Canva Pro ?????? ??? ???? ?????? ?????? ???????? ??????? ?? 2025? ?????? ?? ???? ??????? ???????? ??? ?? ?????. ?? ??? ?????? ???? ?? ????? ?????? ??? ???? ?????? ????? Canva Pro Edu? ??? ???? ????? ?? ???????? ??????? ???????? ??????? ???????. https://www.targir.com/2025/02/canva-pro.html ?? ?? Canva Pro? Canva ???? ????? ?????? ??????? ???? ????? ???? ???????? ??????? ??????? ????????? ???????? ???? ??? ??????. ?????? ??????? ???? ????? ?????? ??????? ????? ???? Canva Pro ????? ???? ?? ????? ???????????? ????? ???????? ??? ????? ???????? ?????? ????? ???? ?????. ????? ???????? ?????? ???????: ???? ?????? ????? ??????? ???? ??????? ??????? ?? 5 ???? ?????. ????? ?????????. Canva Pro: ????? ???? ???? ?? 100 ????? ????? ????? ??????? 1 ???????? ?????? ?????? ??? ????? ?????? ???????. Canva Teams: ???? ????????? ?? ????? ????? ???? ?????? ??????? ????????. Canva Pro Edu: ????? ???????? ???????? ????? ??? ???? ????? Canva Pro ???????? ??? ????? ???????. ??? ???? ??? Canva Pro Edu ??????? ? ??????? ??? ???? ???? ???? ??? ????????. ? ????? ???? ???? ?? ??????? ????? ???????? ?? ????. ? ??? ???? ??????? ????? ????? ???????? ??? Canva Pro Edu ????? ????? ???????. ???? ????? ???????? ? ?? ???? ?????? ?? ?????? ?????? ???????. ? ???? ???????? ????? ???????? (??? edu). ? ???????? ??? ???? ???? ???. ?? ???? ?????? ??? Canva Pro ???? ????? ???? ???? ???? ??????? ?????? ???? 30 ????? ????? ?????? ??? ?????? ??????. ???? ??? ?????? ?????? ????? ???????? ?????? ????? ???????? ??? ???????? ????? ??????. ??? ?????? ??? Canva Pro ???? ?????? ???? ????? ???? ???? ??? ??? ?????? ?????????. ??? ??????? ???? ?????? Canva Pro Edu ?????? ? ????? ??? ???? ?? 100 ????? ???? ????? ?????????. ? ???? ?? 600 ??? ???? ???????. ? ????? ?????? ??? ????? ??????? ?????? ?????? ????????. ? ????? ????? 1 ????????. ? ??????? ????? ??????? ?? ?????? ???????? ??? ?????? ??????. ????? ????? Canva Pro Edu? ??? ?????? ????? ???? ????? Canva Pro ??? ?????? ??? ????? ???????? ?????? ???? ???????? ??????? ?????? ?????? ????? ????????. ?????? ??? ??? ???? ?????? ????? ????? ???? ????? ?????????. ????? ??? ??? ?????? ?? ??????? ??? ???? ????? ?????? ??? Canva Pro ?????? ?? ??? ???? ?????? ??? Canva Pro Edu. ???? ?????? ????? ?? ???? ??????? ??????? ??? ?? ????. ???? ???? ?????? ?? ???? ????? ???? ?? ????? ??????? ????????? ????????? ??????? ??? ????? ??????? ???????? Canva Pro Edu ?? 2025. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rriggs at openjdk.org Tue Sep 30 20:51:01 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 30 Sep 2025 20:51:01 GMT Subject: RFR: 8366829: Add constants for the Duration MIN/MAX values [v2] In-Reply-To: <6lKi-7evBK6--V_1dPRo55Zf2ZU7euf9v-VJiperHg4=.b97f7a84-1ac2-4c6b-b1fb-581640ce1326@github.com> References: <6lKi-7evBK6--V_1dPRo55Zf2ZU7euf9v-VJiperHg4=.b97f7a84-1ac2-4c6b-b1fb-581640ce1326@github.com> Message-ID: On Mon, 29 Sep 2025 21:36:35 GMT, Pavel Rappo wrote: >> We have [recently discussed][] a possibility of adding the `Duration.MIN` and `Duration.MAX` constants. Can we now start implementation? If and when we are in agreement on this PR, I will file a CSR. >> >> I drafted a minimal specification and added some tests. I tried to phrase the spec for `Duration.MIN` in a way that makes it clear that `Duration.MIN` is the most negative value and not the least positive. >> >> [recently discussed]: https://mail.openjdk.org/pipermail/core-libs-dev/2025-September/151098.html > > Pavel Rappo has updated the pull request incrementally with two additional commits since the last revision: > > - Update copyright years > > Note: any commit hashes below might be outdated due to subsequent > history rewriting (e.g. git rebase). > > + update src/java.base/share/classes/java/time/temporal/ChronoUnit.java due to 9a54ba1d353 > + update test/jdk/java/time/tck/java/time/TCKDuration.java due to 9a54ba1d353 > - Provide @apiNote as suggested Calling out these values a sentinels is fine, it emphasizes that they are not simple values for computation. ------------- Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27534#pullrequestreview-3286671039 From swen at openjdk.org Tue Sep 30 23:00:21 2025 From: swen at openjdk.org (Shaojin Wen) Date: Tue, 30 Sep 2025 23:00:21 GMT Subject: RFR: 8368825: Change the DateTimeFormatterBuilder::FIELD_MAP type from Map to Array [v3] In-Reply-To: References: Message-ID: > The DateTimeFormatterBuilder::FIELD_MAP is of type Map, with key values in the range 'A-Z' and 'a-z'. > > We can change the type of FIELD_MAP to an array of length 128 and then use char as an index to access the array. > > This will reduce the memory usage of DateTimeFormatterBuilder::FIELD_MAP and improve performance slightly. > > By analyzing the jmap dump memory, we can see that the memory size used by DateTimeFormatterBuilder::FIELD_MAP has dropped from 1.12kb to 528b, the number of objects has decreased and the memory has become more flat. as shown below: > * before > image > > * after > image Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: revert comment & remove unused import, from @natoj ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26634/files - new: https://git.openjdk.org/jdk/pull/26634/files/abb2123e..c6ce33c5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26634&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26634&range=01-02 Stats: 14 lines in 1 file changed: 13 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/26634.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26634/head:pull/26634 PR: https://git.openjdk.org/jdk/pull/26634 From liach at openjdk.org Tue Sep 30 23:16:09 2025 From: liach at openjdk.org (Chen Liang) Date: Tue, 30 Sep 2025 23:16:09 GMT Subject: RFR: 8368825: Change the DateTimeFormatterBuilder::FIELD_MAP type from Map to Array [v3] In-Reply-To: References: Message-ID: On Tue, 30 Sep 2025 23:00:21 GMT, Shaojin Wen wrote: >> The DateTimeFormatterBuilder::FIELD_MAP is of type Map, with key values in the range 'A-Z' and 'a-z'. >> >> We can change the type of FIELD_MAP to an array of length 128 and then use char as an index to access the array. >> >> This will reduce the memory usage of DateTimeFormatterBuilder::FIELD_MAP and improve performance slightly. >> >> By analyzing the jmap dump memory, we can see that the memory size used by DateTimeFormatterBuilder::FIELD_MAP has dropped from 1.12kb to 528b, the number of objects has decreased and the memory has become more flat. as shown below: >> * before >> image >> >> * after >> image > > Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: > > revert comment & remove unused import, from @natoj src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java line 2193: > 2191: */ > 2192: private static TemporalField getField(char ch) { > 2193: return switch (ch) { Please restore the comment // SDF = SimpleDateFormat ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26634#discussion_r2393030741 From swen at openjdk.org Tue Sep 30 23:21:32 2025 From: swen at openjdk.org (Shaojin Wen) Date: Tue, 30 Sep 2025 23:21:32 GMT Subject: RFR: 8368825: Change the DateTimeFormatterBuilder::FIELD_MAP type from Map to Array [v4] In-Reply-To: References: Message-ID: > The DateTimeFormatterBuilder::FIELD_MAP is of type Map, with key values in the range 'A-Z' and 'a-z'. > > We can change the type of FIELD_MAP to an array of length 128 and then use char as an index to access the array. > > This will reduce the memory usage of DateTimeFormatterBuilder::FIELD_MAP and improve performance slightly. > > By analyzing the jmap dump memory, we can see that the memory size used by DateTimeFormatterBuilder::FIELD_MAP has dropped from 1.12kb to 528b, the number of objects has decreased and the memory has become more flat. as shown below: > * before > image > > * after > image Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: revert comment @liach ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26634/files - new: https://git.openjdk.org/jdk/pull/26634/files/c6ce33c5..d3aa1333 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26634&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26634&range=02-03 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/26634.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26634/head:pull/26634 PR: https://git.openjdk.org/jdk/pull/26634