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