From shade at openjdk.org Wed Nov 1 09:54:28 2023 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 1 Nov 2023 09:54:28 GMT Subject: RFR: 8309622: Re-examine the cache mechanism in BaseLocale In-Reply-To: References: <5MqmN4P1TLKDCfXPhKWrH1b2FTgOXmjtKgd1bVXDd_M=.2000f20d-365d-48dc-bc37-45d8bcb9447f@github.com> Message-ID: On Mon, 12 Jun 2023 17:28:44 GMT, Naoto Sato wrote: >> One other thing to consider... >> If the BaseLocale entries are being GC'd sooner, then perhaps the value of the String.intern() is reduced. >> Eliminating `.intern90` would make creating a normalized BaseLocale faster. > >> One other thing to consider... If the BaseLocale entries are being GC'd sooner, then perhaps the value of the String.intern() is reduced. Eliminating `.intern90` would make creating a normalized BaseLocale faster. > > Some code inside the Locale still relies on `intern` and do `==` comparison. Yes, it would be faster but I think that would be out of the scope of this fix @naotoj, we are still seeing the CI failures due to this. Are you planning to finish this work? Thanks! ------------- PR Comment: https://git.openjdk.org/jdk/pull/14404#issuecomment-1788686569 From jlu at openjdk.org Wed Nov 1 21:33:10 2023 From: jlu at openjdk.org (Justin Lu) Date: Wed, 1 Nov 2023 21:33:10 GMT Subject: Integrated: JDK-8317612: ChoiceFormat and MessageFormat constructors call non-final public method In-Reply-To: References: Message-ID: On Thu, 5 Oct 2023 20:44:55 GMT, Justin Lu wrote: > Please review this PR which updates ChoiceFormat and MessageFormat to no longer call overridable methods in their constructors. > > The overridable methods called in the constructors are: _ChoiceFormat::applyPattern_, _ChoiceFormat::setChoices_, and _MessageFormat::applyPattern_. The code should be updated so that both the methods and constructors call a separate private method. Some other drive-by cleanup changes were included in the change as well. This pull request has now been integrated. Changeset: ee57e731 Author: Justin Lu URL: https://git.openjdk.org/jdk/commit/ee57e731d03101ba6508297ef7d895082b04b427 Stats: 53 lines in 2 files changed: 36 ins; 3 del; 14 mod 8317612: ChoiceFormat and MessageFormat constructors call non-final public method Reviewed-by: naoto, lancea ------------- PR: https://git.openjdk.org/jdk/pull/16064 From jlu at openjdk.org Wed Nov 1 21:35:10 2023 From: jlu at openjdk.org (Justin Lu) Date: Wed, 1 Nov 2023 21:35:10 GMT Subject: RFR: 8318466: Improve spec of NumberFormat's methods with unsupported operations Message-ID: Please review this simple change which refines the specification of some NumberFormat methods (with unsupported operations) to separate the API and implementation specification. ------------- Commit messages: - cleanup setRoundingMode() - Merge branch 'master' into JDK-8318466-NumberFormat-Unsupported - reflect review - init Changes: https://git.openjdk.org/jdk/pull/16464/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16464&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8318466 Stats: 36 lines in 1 file changed: 9 ins; 11 del; 16 mod Patch: https://git.openjdk.org/jdk/pull/16464.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16464/head:pull/16464 PR: https://git.openjdk.org/jdk/pull/16464 From naoto at openjdk.org Thu Nov 2 16:46:04 2023 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 2 Nov 2023 16:46:04 GMT Subject: RFR: 8318466: Improve spec of NumberFormat's methods with unsupported operations In-Reply-To: References: Message-ID: On Wed, 1 Nov 2023 21:27:57 GMT, Justin Lu wrote: > Please review this simple change which refines the specification of some NumberFormat methods (with unsupported operations) to separate the API and implementation specification. LGTM ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16464#pullrequestreview-1710785970 From iris at openjdk.org Thu Nov 2 17:14:02 2023 From: iris at openjdk.org (Iris Clark) Date: Thu, 2 Nov 2023 17:14:02 GMT Subject: RFR: 8318466: Improve spec of NumberFormat's methods with unsupported operations In-Reply-To: References: Message-ID: <3ZrP-Qi2CcTiQYmZps5GlU8yJf-98rr5Qfefd_gvnI8=.9b34fbd4-db01-4089-83db-f130682a0aa1@github.com> On Wed, 1 Nov 2023 21:27:57 GMT, Justin Lu wrote: > Please review this simple change which refines the specification of some NumberFormat methods (with unsupported operations) to separate the API and implementation specification. Marked as reviewed by iris (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16464#pullrequestreview-1710843738 From jlahoda at openjdk.org Fri Nov 3 15:02:11 2023 From: jlahoda at openjdk.org (Jan Lahoda) Date: Fri, 3 Nov 2023 15:02:11 GMT Subject: RFR: JDK-8315457 Implementation of String Templates (Second Preview) [v3] In-Reply-To: <_XrazddvO7-8lIILbhUn9VBpcp_YErXSWtxK4-eE53o=.7f423608-6901-4b34-a963-abc132d6c3cc@github.com> References: <_XrazddvO7-8lIILbhUn9VBpcp_YErXSWtxK4-eE53o=.7f423608-6901-4b34-a963-abc132d6c3cc@github.com> Message-ID: On Tue, 17 Oct 2023 16:03:25 GMT, Jim Laskey wrote: >> Update String Templates for a second preview. With the addition of >> >> - Expression type and throws are determined from the `process` method of the processor type and not the processor type. >> >> - Qualified `STR` and `RAW` are treated the same as unqualified `STR` and `RAW` . >> >> - Raw (generic) process types are no longer an error. > > Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: > > Cache process method type in JCStringTemplate Looks good to me. ------------- Marked as reviewed by jlahoda (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16202#pullrequestreview-1712905674 From jlaskey at openjdk.org Fri Nov 3 15:29:25 2023 From: jlaskey at openjdk.org (Jim Laskey) Date: Fri, 3 Nov 2023 15:29:25 GMT Subject: RFR: JDK-8315457 Implementation of String Templates (Second Preview) [v4] In-Reply-To: References: Message-ID: > Update String Templates for a second preview. With the addition of > > - Expression type and throws are determined from the `process` method of the processor type and not the processor type. > > - Qualified `STR` and `RAW` are treated the same as unqualified `STR` and `RAW` . > > - Raw (generic) process types are no longer an error. Jim Laskey 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 six additional commits since the last revision: - Merge remote-tracking branch 'upstream/master' into 8315457 - Cache process method type in JCStringTemplate - Revert source - Revert @since 22 - Accept qualified STR and RAW - String Templates (second preview) ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16202/files - new: https://git.openjdk.org/jdk/pull/16202/files/ae136779..2afadc69 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16202&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16202&range=02-03 Stats: 53408 lines in 1930 files changed: 29390 ins; 10168 del; 13850 mod Patch: https://git.openjdk.org/jdk/pull/16202.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16202/head:pull/16202 PR: https://git.openjdk.org/jdk/pull/16202 From jlu at openjdk.org Fri Nov 3 17:36:13 2023 From: jlu at openjdk.org (Justin Lu) Date: Fri, 3 Nov 2023 17:36:13 GMT Subject: Integrated: 8318466: Improve spec of NumberFormat's methods with unsupported operations In-Reply-To: References: Message-ID: On Wed, 1 Nov 2023 21:27:57 GMT, Justin Lu wrote: > Please review this simple change which refines the specification of some NumberFormat methods (with unsupported operations) to separate the API and implementation specification. This pull request has now been integrated. Changeset: ea6a88a0 Author: Justin Lu URL: https://git.openjdk.org/jdk/commit/ea6a88a0aa4e8a365a94e71078e67a4452f40945 Stats: 36 lines in 1 file changed: 9 ins; 11 del; 16 mod 8318466: Improve spec of NumberFormat's methods with unsupported operations Reviewed-by: naoto, iris ------------- PR: https://git.openjdk.org/jdk/pull/16464 From rriggs at openjdk.org Fri Nov 3 20:33:47 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 3 Nov 2023 20:33:47 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v3] In-Reply-To: References: Message-ID: On Mon, 16 Oct 2023 20:52:10 GMT, Shaojin Wen wrote: >> j.u.Formatter now prints "%tF" (iso standard date) and the result is incorrect when processing year < 0 or year > 9999 > > Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: > > fix typo Please separate out the change to be locale-independent from the fix for the original issue. The compatibility risk may have an unknown impact on existing applications and needs further consideration. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16033#issuecomment-1793059304 From redestad at openjdk.org Fri Nov 3 21:01:45 2023 From: redestad at openjdk.org (Claes Redestad) Date: Fri, 3 Nov 2023 21:01:45 GMT Subject: RFR: 8319423: Improve Year.isLeap by checking divisibility by 16 Message-ID: https://github.com/cassioneri/eaf suggest this code for leap year calculation: public static boolean isLeap(long year) { int d = year % 100 != 0 ? 4 : 16; return (year & (d - 1)) == 0; } .. with a claim this would compile down to branchless, easily pipelined code. This doesn't currently happen with C2. In the meantime I think we can improve the current code in `Year.isLeap` and `IsoChronology.isLeapYear` by leveraging the fact that the `% 100` check is only needed if `(year & 15) != 0`: public static boolean isLeap(long year) { return (year & 15) == 0 ? (year & 3) == 0 : (year & 3) == 0 && year % 100 != 0; } Mac M1: Name Cnt Base Error Test Error Unit Change LeapYearBench.isLeapYear 15 0,743 ? 0,009 0,994 ? 0,005 ops/us 1,34x (p = 0,000*) LeapYearBench.isLeapYearChrono 15 0,748 ? 0,006 0,991 ? 0,003 ops/us 1,32x (p = 0,000*) LeapYearBench.isLeapYearNS 15 0,558 ? 0,026 0,552 ? 0,033 ops/us 0,99x (p = 0,602 ) * = significant Linux x64: Name Cnt Base Error Test Error Unit Change LeapYearBench.isLeapYear 15 0.534 ? 0.001 0.765 ? 0.004 ops/us 1.43x (p = 0.000*) LeapYearBench.isLeapYearChrono 15 0.535 ? 0.000 0.753 ? 0.040 ops/us 1.41x (p = 0.000*) LeapYearBench.isLeapYearNS 15 0.352 ? 0.000 0.351 ? 0.001 ops/us 1.00x (p = 0.000*) * = significant 30% higher throughput on M1, 40% on x64. `isLeapYearNS` runs a variant of the code from https://github.com/cassioneri/eaf ported to java - perhaps the JIT can be improved to do whatever clang/gcc does here and achieve an even better speed-up. Testing: so far only java/time/tck/java/time locally, will run a few tiers before filing an enhancement and opening the PR for review. ------------- Commit messages: - Add comment - Delegate IsoChronology.isLeapYear to Year.isLeap (both specified to behave identically), add microbenchmark testing the variant that optimize well with gcc - Merge branch 'master' into leapyear - Leap year optimization inspired by Neri & Schneider Changes: https://git.openjdk.org/jdk/pull/16491/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16491&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8319423 Stats: 101 lines in 3 files changed: 99 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/16491.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16491/head:pull/16491 PR: https://git.openjdk.org/jdk/pull/16491 From rriggs at openjdk.org Fri Nov 3 21:01:45 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 3 Nov 2023 21:01:45 GMT Subject: RFR: 8319423: Improve Year.isLeap by checking divisibility by 16 In-Reply-To: References: Message-ID: <9rkJo2eaipAf-s54hk34o_UxUkzjsKii21xn7L1sRj8=.9229dc7e-381f-4132-977e-2e13bf420d3a@github.com> On Fri, 3 Nov 2023 12:03:24 GMT, Claes Redestad wrote: > https://github.com/cassioneri/eaf suggest this code for leap year calculation: > > public static boolean isLeap(long year) { > int d = year % 100 != 0 ? 4 : 16; > return (year & (d - 1)) == 0; > } > > .. with a claim this would compile down to branchless, easily pipelined code. > > This doesn't currently happen with C2. In the meantime I think we can improve the current code in `Year.isLeap` and `IsoChronology.isLeapYear` by leveraging the fact that the `% 100` check is only needed if `(year & 15) != 0`: > > > public static boolean isLeap(long year) { > return (year & 15) == 0 ? (year & 3) == 0 : (year & 3) == 0 && year % 100 != 0; > } > > > Mac M1: > > Name Cnt Base Error Test Error Unit Change > LeapYearBench.isLeapYear 15 0,743 ? 0,009 0,994 ? 0,005 ops/us 1,34x (p = 0,000*) > LeapYearBench.isLeapYearChrono 15 0,748 ? 0,006 0,991 ? 0,003 ops/us 1,32x (p = 0,000*) > LeapYearBench.isLeapYearNS 15 0,558 ? 0,026 0,552 ? 0,033 ops/us 0,99x (p = 0,602 ) > * = significant > > > Linux x64: > > Name Cnt Base Error Test Error Unit Change > LeapYearBench.isLeapYear 15 0.534 ? 0.001 0.765 ? 0.004 ops/us 1.43x (p = 0.000*) > LeapYearBench.isLeapYearChrono 15 0.535 ? 0.000 0.753 ? 0.040 ops/us 1.41x (p = 0.000*) > LeapYearBench.isLeapYearNS 15 0.352 ? 0.000 0.351 ? 0.001 ops/us 1.00x (p = 0.000*) > * = significant > > > 30% higher throughput on M1, 40% on x64. `isLeapYearNS` runs a variant of the code from https://github.com/cassioneri/eaf ported to java - perhaps the JIT can be improved to do whatever clang/gcc does here and achieve an even better speed-up. > > Testing: so far only java/time/tck/java/time locally, will run a few tiers before filing an enhancement and opening the PR for review. Looks good. It probably needs a comment explaining why or a reference; otherwise it looks mysterious. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16491#issuecomment-1792984156 From alanb at openjdk.org Sat Nov 4 13:31:11 2023 From: alanb at openjdk.org (Alan Bateman) Date: Sat, 4 Nov 2023 13:31:11 GMT Subject: RFR: JDK-8315457 Implementation of String Templates (Second Preview) [v4] In-Reply-To: References: Message-ID: On Fri, 3 Nov 2023 15:29:25 GMT, Jim Laskey wrote: >> Update String Templates for a second preview. With the addition of >> >> - Expression type and throws are determined from the `process` method of the processor type and not the processor type. >> >> - Qualified `STR` and `RAW` are treated the same as unqualified `STR` and `RAW` . >> >> - Raw (generic) process types are no longer an error. > > Jim Laskey 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 six additional commits since the last revision: > > - Merge remote-tracking branch 'upstream/master' into 8315457 > - Cache process method type in JCStringTemplate > - Revert source > - Revert @since 22 > - Accept qualified STR and RAW > - String Templates (second preview) Marked as reviewed by alanb (Reviewer). src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 424: > 422: * @since 21 > 423: */ > 424: @PreviewFeature(feature=PreviewFeature.Feature.STRING_TEMPLATES) I think you can drop both `@since` and `@PreviewFeature` from these methods. This in an internal interface, used for shared secrets, there is a lot of churn in JLA in each release. ------------- PR Review: https://git.openjdk.org/jdk/pull/16202#pullrequestreview-1713768565 PR Review Comment: https://git.openjdk.org/jdk/pull/16202#discussion_r1382392709 From alanb at openjdk.org Sat Nov 4 13:31:12 2023 From: alanb at openjdk.org (Alan Bateman) Date: Sat, 4 Nov 2023 13:31:12 GMT Subject: RFR: JDK-8315457 Implementation of String Templates (Second Preview) [v4] In-Reply-To: References: Message-ID: On Mon, 16 Oct 2023 14:31:46 GMT, Jim Laskey wrote: > Wasn't sure about that. Thx. When in doubt, JEP 12. Alex provided good guidance for API authors on how `@since` should be used with preview APIs. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16202#discussion_r1382392982 From jlaskey at openjdk.org Mon Nov 6 12:51:34 2023 From: jlaskey at openjdk.org (Jim Laskey) Date: Mon, 6 Nov 2023 12:51:34 GMT Subject: RFR: JDK-8315457 Implementation of String Templates (Second Preview) [v5] In-Reply-To: References: Message-ID: <9uwfuPjY_0dSLi2a52bsIoRswDtAH5-ILNQm6wm1Zjs=.b4222a67-f020-40b8-b5c6-cbdb26f46116@github.com> > Update String Templates for a second preview. With the addition of > > - Expression type and throws are determined from the `process` method of the processor type and not the processor type. > > - Qualified `STR` and `RAW` are treated the same as unqualified `STR` and `RAW` . > > - Raw (generic) process types are no longer an error. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Remove preview from JavaLangAccess ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16202/files - new: https://git.openjdk.org/jdk/pull/16202/files/2afadc69..4641ec05 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16202&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16202&range=03-04 Stats: 8 lines in 1 file changed: 0 ins; 7 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16202.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16202/head:pull/16202 PR: https://git.openjdk.org/jdk/pull/16202 From jlaskey at openjdk.org Mon Nov 6 12:51:39 2023 From: jlaskey at openjdk.org (Jim Laskey) Date: Mon, 6 Nov 2023 12:51:39 GMT Subject: RFR: JDK-8315457 Implementation of String Templates (Second Preview) [v4] In-Reply-To: References: Message-ID: <6mtIcg0H0wbOwcAzlmWG9thAjUpDCzQe55aLQDGA33Q=.deaada83-150c-4e1d-85c3-c07c61ff62a5@github.com> On Sat, 4 Nov 2023 13:26:04 GMT, Alan Bateman wrote: >> Jim Laskey 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 six additional commits since the last revision: >> >> - Merge remote-tracking branch 'upstream/master' into 8315457 >> - Cache process method type in JCStringTemplate >> - Revert source >> - Revert @since 22 >> - Accept qualified STR and RAW >> - String Templates (second preview) > > src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 424: > >> 422: * @since 21 >> 423: */ >> 424: @PreviewFeature(feature=PreviewFeature.Feature.STRING_TEMPLATES) > > I think you can drop both `@since` and `@PreviewFeature` from these methods. This in an internal interface, used for shared secrets, there is a lot of churn in JLA in each release. Removed ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16202#discussion_r1383275177 From duke at openjdk.org Mon Nov 6 14:55:54 2023 From: duke at openjdk.org (Shaojin Wen) Date: Mon, 6 Nov 2023 14:55:54 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v4] In-Reply-To: References: Message-ID: > j.u.Formatter now prints "%tF" (iso standard date) and the result is incorrect when processing year < 0 or year > 9999 Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: revert localize change ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16033/files - new: https://git.openjdk.org/jdk/pull/16033/files/8b31e875..b6313fc0 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16033&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16033&range=02-03 Stats: 31 lines in 2 files changed: 0 ins; 27 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/16033.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16033/head:pull/16033 PR: https://git.openjdk.org/jdk/pull/16033 From naoto at openjdk.org Tue Nov 7 00:03:31 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 7 Nov 2023 00:03:31 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v4] In-Reply-To: References: Message-ID: <7wlZslqihB6PE5hFT9I_j8GvRTPTNBJMHCdzK1xsapo=.b47e0d2c-5def-4cba-98d0-c7254263e30a@github.com> On Mon, 6 Nov 2023 14:55:54 GMT, Shaojin Wen wrote: >> j.u.Formatter now prints "%tF" (iso standard date) and the result is incorrect when processing year < 0 or year > 9999 > > Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: > > revert localize change src/java.base/share/classes/java/util/Formatter.java line 4495: > 4493: int year = t.get(ChronoField.YEAR); > 4494: if (year < 0) { > 4495: sb.append('-'); Some locales use a different code point to express negative numbers from `hyphen-minus`, such as `minus sign` (U+2212). I'd suggest getting it from `DecimalFormatSymbols.getMinusSign()` ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16033#discussion_r1384186755 From duke at openjdk.org Tue Nov 7 01:31:03 2023 From: duke at openjdk.org (Shaojin Wen) Date: Tue, 7 Nov 2023 01:31:03 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v5] In-Reply-To: References: Message-ID: > j.u.Formatter now prints "%tF" (iso standard date) and the result is incorrect when processing year < 0 or year > 9999 Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: use DecimalFormatSymbols#getMinusSign ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16033/files - new: https://git.openjdk.org/jdk/pull/16033/files/b6313fc0..7051ad51 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16033&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16033&range=03-04 Stats: 8 lines in 2 files changed: 7 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16033.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16033/head:pull/16033 PR: https://git.openjdk.org/jdk/pull/16033 From jlaskey at openjdk.org Tue Nov 7 12:29:54 2023 From: jlaskey at openjdk.org (Jim Laskey) Date: Tue, 7 Nov 2023 12:29:54 GMT Subject: RFR: JDK-8315457 Implementation of String Templates (Second Preview) [v6] In-Reply-To: References: Message-ID: <3NHJ2yDj2dW6Y4qPF8FmBkqkXcG7l-BzQ3EKWYArZMI=.28885188-9e99-46e8-81bd-6234023c1b1f@github.com> > Update String Templates for a second preview. With the addition of > > - Expression type and throws are determined from the `process` method of the processor type and not the processor type. > > - Qualified `STR` and `RAW` are treated the same as unqualified `STR` and `RAW` . > > - Raw (generic) process types are no longer an error. Jim Laskey 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 eight additional commits since the last revision: - Merge remote-tracking branch 'upstream/master' into 8315457 - Remove preview from JavaLangAccess - Merge remote-tracking branch 'upstream/master' into 8315457 - Cache process method type in JCStringTemplate - Revert source - Revert @since 22 - Accept qualified STR and RAW - String Templates (second preview) ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16202/files - new: https://git.openjdk.org/jdk/pull/16202/files/4641ec05..c616f48e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16202&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16202&range=04-05 Stats: 2467 lines in 114 files changed: 1740 ins; 357 del; 370 mod Patch: https://git.openjdk.org/jdk/pull/16202.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16202/head:pull/16202 PR: https://git.openjdk.org/jdk/pull/16202 From naoto at openjdk.org Tue Nov 7 13:31:35 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 7 Nov 2023 13:31:35 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v5] In-Reply-To: References: Message-ID: On Tue, 7 Nov 2023 01:31:03 GMT, Shaojin Wen wrote: >> j.u.Formatter now prints "%tF" (iso standard date) and the result is incorrect when processing year < 0 or year > 9999 > > Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: > > use DecimalFormatSymbols#getMinusSign src/java.base/share/classes/java/util/Formatter.java line 4495: > 4493: int year = t.get(ChronoField.YEAR); > 4494: if (year < 0) { > 4495: sb.append(DecimalFormatSymbols.getInstance(l).getMinusSign()); Instead of creating the instance each time, `getMinusSign(Locale)` can be defined, analogous to `getZero(Locale)` so that the cached instance is reused. test/jdk/java/util/Formatter/BasicDateTime.java line 473: > 471: "%tF", > 472: DecimalFormatSymbols.getInstance(localeEuES).getMinusSign() + "2023-01-13", > 473: LocalDate.of(-2023, 1, 13)); Needs some comments here, otherwise it would be a bit cryptic. Also, "eu-ES" locale using `\u2212` depends on the current CLDR implementation, so you might want to check all locales with `Locale.availableLocale()`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16033#discussion_r1384355166 PR Review Comment: https://git.openjdk.org/jdk/pull/16033#discussion_r1384915823 From redestad at openjdk.org Tue Nov 7 13:51:40 2023 From: redestad at openjdk.org (Claes Redestad) Date: Tue, 7 Nov 2023 13:51:40 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v5] In-Reply-To: References: Message-ID: On Tue, 7 Nov 2023 13:28:06 GMT, Naoto Sato wrote: >> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: >> >> use DecimalFormatSymbols#getMinusSign > > test/jdk/java/util/Formatter/BasicDateTime.java line 473: > >> 471: "%tF", >> 472: DecimalFormatSymbols.getInstance(localeEuES).getMinusSign() + "2023-01-13", >> 473: LocalDate.of(-2023, 1, 13)); > > Needs some comments here, otherwise it would be a bit cryptic. Also, "eu-ES" locale using `\u2212` depends on the current CLDR implementation, so you might want to check all locales with `Locale.availableLocale()`. While it might be reasonable to localize using `getMinusSign()` this will introduce a new inconsistency with `DateTimeFormatter` (which *does not* localize minus signs in front of years): int minus = DecimalFormatSymbols.getInstance(Locale.forLanguageTag("eu-ES")) .getMinusSign() minus ==> 8722 int first = DateTimeFormatter.ISO_DATE .withLocale(Locale.forLanguageTag("eu-ES")) .format(ZonedDateTime.now() .minus(4000, java.time.temporal.ChronoUnit.YEARS) .charAt(0) first ==> 45 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16033#discussion_r1384939609 From rriggs at openjdk.org Tue Nov 7 15:06:36 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 7 Nov 2023 15:06:36 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v5] In-Reply-To: References: Message-ID: On Tue, 7 Nov 2023 13:45:54 GMT, Claes Redestad wrote: >> test/jdk/java/util/Formatter/BasicDateTime.java line 473: >> >>> 471: "%tF", >>> 472: DecimalFormatSymbols.getInstance(localeEuES).getMinusSign() + "2023-01-13", >>> 473: LocalDate.of(-2023, 1, 13)); >> >> Needs some comments here, otherwise it would be a bit cryptic. Also, "eu-ES" locale using `\u2212` depends on the current CLDR implementation, so you might want to check all locales with `Locale.availableLocale()`. > > While it might be reasonable to localize using `getMinusSign()` this will introduce a new inconsistency with `DateTimeFormatter` (which *does not* localize minus signs in front of years): > > int minus = DecimalFormatSymbols.getInstance(Locale.forLanguageTag("eu-ES")) > .getMinusSign() > minus ==> 8722 > > int first = DateTimeFormatter.ISO_DATE > .withLocale(Locale.forLanguageTag("eu-ES")) > .format(ZonedDateTime.now() > .minus(4000, java.time.temporal.ChronoUnit.YEARS) > .charAt(0) > first ==> 45 Within java.util.Formatter, the year formatter supports only the range [0,9999]. Only ISO_STANDARD_DATE has a ISO 8601 format defined for numbers outside that range. The formatting in java.time is defined over the full range of years. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16033#discussion_r1385067362 From duke at openjdk.org Tue Nov 7 15:18:37 2023 From: duke at openjdk.org (Shaojin Wen) Date: Tue, 7 Nov 2023 15:18:37 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v5] In-Reply-To: References: Message-ID: On Tue, 7 Nov 2023 15:04:16 GMT, Roger Riggs wrote: >> While it might be reasonable to localize using `getMinusSign()` this will introduce a new inconsistency with `DateTimeFormatter` (which *does not* localize minus signs in front of years): >> >> int minus = DecimalFormatSymbols.getInstance(Locale.forLanguageTag("eu-ES")) >> .getMinusSign() >> minus ==> 8722 >> >> int first = DateTimeFormatter.ISO_DATE >> .withLocale(Locale.forLanguageTag("eu-ES")) >> .format(ZonedDateTime.now() >> .minus(4000, java.time.temporal.ChronoUnit.YEARS) >> .charAt(0) >> first ==> 45 > > Within java.util.Formatter, the year formatter supports only the range [0,9999]. > Only ISO_STANDARD_DATE has a ISO 8601 format defined for numbers outside that range. > The formatting in java.time is defined over the full range of years. I think it is more reasonable for ISO_STANDARD_DATE to be consistent with java.time.DateTimeFormatter, ISO 8601 format is not localized. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16033#discussion_r1385083995 From naoto at openjdk.org Tue Nov 7 16:44:33 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 7 Nov 2023 16:44:33 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v5] In-Reply-To: References: Message-ID: <6VnaPgf9pbpLauwPU_ixQGQXSK7Pz28xi2VyFYe2ATI=.cd8aeb2c-3fc6-4720-81ae-efa57eef571c@github.com> On Tue, 7 Nov 2023 15:15:19 GMT, Shaojin Wen wrote: >> Within java.util.Formatter, the year formatter supports only the range [0,9999]. >> Only ISO_STANDARD_DATE has a ISO 8601 format defined for numbers outside that range. >> The formatting in java.time is defined over the full range of years. > > I think it is more reasonable for ISO_STANDARD_DATE to be consistent with java.time.DateTimeFormatter, ISO 8601 format is not localized. IIUC, what we are trying to fix here is to align the weird *behavior* outside of 0-9999 in java.util.Formatter with java.time's, not how they are represented. j.u.Formatter already formats numbers in local digits, so I believe it is natural to use the localized negative prefix as well. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16033#discussion_r1385229360 From duke at openjdk.org Wed Nov 8 00:52:36 2023 From: duke at openjdk.org (Shaojin Wen) Date: Wed, 8 Nov 2023 00:52:36 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v6] In-Reply-To: References: Message-ID: > j.u.Formatter now prints "%tF" (iso standard date) and the result is incorrect when processing year < 0 or year > 9999 Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: Use minus sign from cached DecimalFormatSymbols and improved testcase ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16033/files - new: https://git.openjdk.org/jdk/pull/16033/files/7051ad51..47fc35f1 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16033&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16033&range=04-05 Stats: 16 lines in 2 files changed: 10 ins; 0 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/16033.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16033/head:pull/16033 PR: https://git.openjdk.org/jdk/pull/16033 From job at kimmeringer.de Wed Nov 8 12:38:42 2023 From: job at kimmeringer.de (Lothar Kimmeringer) Date: Wed, 8 Nov 2023 13:38:42 +0100 Subject: RFR: 8319423: Improve Year.isLeap by checking divisibility by 16 In-Reply-To: References: Message-ID: Am 03.11.2023 um 22:01 schrieb Claes Redestad: > public static boolean isLeap(long year) { > return (year & 15) == 0 ? (year & 3) == 0 : (year & 3) == 0 && year % 100 != 0; > } Not sure if this has any effect in terms of performance but not being a fan of duplicated code, a variant would be return (year & 3) == 0 && (year & 15 == 0 || year % 100 != 0); Cheers, Lothar From naoto at openjdk.org Wed Nov 8 18:41:59 2023 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 8 Nov 2023 18:41:59 GMT Subject: RFR: 8306116: Update CLDR to Version 44.0 Message-ID: Upgrading CLDR to v44 (https://cldr.unicode.org/index/downloads/cldr-44). Besides the data upgrade, regression tests are modified to accommodate the following CLDR fixes: CLDR-16534: Suggestion to rename the Islamic Calendar to Hijri Calendar (https://unicode-org.atlassian.net/browse/CLDR-16534) CLDR-17042: Use exception list for new languages (https://unicode-org.atlassian.net/browse/CLDR-17042) CLDR-16586: en_ID shows IDR rather than Rp for currency (https://unicode-org.atlassian.net/browse/CLDR-16586) CLDR-16358: Mexico and Latin America countries should be using 12 hours time format (https://unicode-org.atlassian.net/browse/CLDR-16358) CLDR-16974: en_GB and en_AU: request to remove comma from MMMEEEEd format (https://unicode-org.atlassian.net/browse/CLDR-16974) CLDR-16857: Need updated translations for new Sierra Leone currency - SLL became SLE (https://unicode-org.atlassian.net/browse/CLDR-16857) ------------- Commit messages: - update license files - Merge branch 'master' into JDK-8306116-CLDR44 - Merge branch 'master' into JDK-8306116-CLDR44 - Fix to generate java.time.long.Eras - release-44 - release-44-beta5 - release-44-beta4 - release-44-beta3 - release-44-beta2 - native UTF-8 for `mgo` name - ... and 9 more: https://git.openjdk.org/jdk/compare/cdf33735...f286ddd3 Changes: https://git.openjdk.org/jdk/pull/16439/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16439&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8306116 Stats: 591898 lines in 499 files changed: 72642 ins; 463467 del; 55789 mod Patch: https://git.openjdk.org/jdk/pull/16439.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16439/head:pull/16439 PR: https://git.openjdk.org/jdk/pull/16439 From naoto at openjdk.org Wed Nov 8 18:49:11 2023 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 8 Nov 2023 18:49:11 GMT Subject: RFR: 8296250" Update ICU4J to Version 74.1 Message-ID: Updating the ICU4J components to v74.1 (https://icu.unicode.org/download/74). This change completes the Unicode 15.1 upgrade. The change is merely replacing binary data files used for the Nomalization and BiDi support ------------- Commit messages: - update the license file - Merge branch 'master' into JDK-8296250-ICU4J-74.1 - v74.1 final - iniital commit Changes: https://git.openjdk.org/jdk/pull/16458/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16458&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8296250 Stats: 528 lines in 12 files changed: 80 ins; 426 del; 22 mod Patch: https://git.openjdk.org/jdk/pull/16458.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16458/head:pull/16458 PR: https://git.openjdk.org/jdk/pull/16458 From srl at openjdk.org Wed Nov 8 18:50:01 2023 From: srl at openjdk.org (Steven Loomis) Date: Wed, 8 Nov 2023 18:50:01 GMT Subject: RFR: 8306116: Update CLDR to Version 44.0 In-Reply-To: References: Message-ID: On Tue, 31 Oct 2023 21:06:13 GMT, Naoto Sato wrote: > Upgrading CLDR to v44 (https://cldr.unicode.org/index/downloads/cldr-44). Besides the data upgrade, regression tests are modified to accommodate the following CLDR fixes: > > CLDR-16534: Suggestion to rename the Islamic Calendar to Hijri Calendar (https://unicode-org.atlassian.net/browse/CLDR-16534) > CLDR-17042: Use exception list for new languages (https://unicode-org.atlassian.net/browse/CLDR-17042) > CLDR-16586: en_ID shows IDR rather than Rp for currency (https://unicode-org.atlassian.net/browse/CLDR-16586) > CLDR-16358: Mexico and Latin America countries should be using 12 hours time format (https://unicode-org.atlassian.net/browse/CLDR-16358) > CLDR-16974: en_GB and en_AU: request to remove comma from MMMEEEEd format (https://unicode-org.atlassian.net/browse/CLDR-16974) > CLDR-16857: Need updated translations for new Sierra Leone currency - SLL became SLE (https://unicode-org.atlassian.net/browse/CLDR-16857) LGTM! make/jdk/src/classes/build/tools/cldrconverter/Bundle.java line 517: > 515: } > 516: map.put(realKey, value); > 517: map.put("java.time." + realKey, value); I'm assuming this was a workaround no longer needed? src/java.base/share/legal/cldr.md line 1: > 1: ## Unicode Common Local Data Repository (CLDR) v44 Short and sweet! ------------- Marked as reviewed by srl (Committer). PR Review: https://git.openjdk.org/jdk/pull/16439#pullrequestreview-1721048254 PR Review Comment: https://git.openjdk.org/jdk/pull/16439#discussion_r1387059253 PR Review Comment: https://git.openjdk.org/jdk/pull/16439#discussion_r1387059522 From naoto at openjdk.org Wed Nov 8 19:00:00 2023 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 8 Nov 2023 19:00:00 GMT Subject: RFR: 8306116: Update CLDR to Version 44.0 In-Reply-To: References: Message-ID: On Wed, 8 Nov 2023 18:45:47 GMT, Steven Loomis wrote: >> Upgrading CLDR to v44 (https://cldr.unicode.org/index/downloads/cldr-44). Besides the data upgrade, regression tests are modified to accommodate the following CLDR fixes: >> >> CLDR-16534: Suggestion to rename the Islamic Calendar to Hijri Calendar (https://unicode-org.atlassian.net/browse/CLDR-16534) >> CLDR-17042: Use exception list for new languages (https://unicode-org.atlassian.net/browse/CLDR-17042) >> CLDR-16586: en_ID shows IDR rather than Rp for currency (https://unicode-org.atlassian.net/browse/CLDR-16586) >> CLDR-16358: Mexico and Latin America countries should be using 12 hours time format (https://unicode-org.atlassian.net/browse/CLDR-16358) >> CLDR-16974: en_GB and en_AU: request to remove comma from MMMEEEEd format (https://unicode-org.atlassian.net/browse/CLDR-16974) >> CLDR-16857: Need updated translations for new Sierra Leone currency - SLL became SLE (https://unicode-org.atlassian.net/browse/CLDR-16857) > > make/jdk/src/classes/build/tools/cldrconverter/Bundle.java line 517: > >> 515: } >> 516: map.put(realKey, value); >> 517: map.put("java.time." + realKey, value); > > I'm assuming this was a workaround no longer needed? Since `short` and `abbreviated` handling differ between `java.text/util` and `java.time`, this is still needed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16439#discussion_r1387071317 From joehw at openjdk.org Thu Nov 9 00:46:55 2023 From: joehw at openjdk.org (Joe Wang) Date: Thu, 9 Nov 2023 00:46:55 GMT Subject: RFR: 8296250" Update ICU4J to Version 74.1 In-Reply-To: References: Message-ID: On Wed, 1 Nov 2023 17:40:09 GMT, Naoto Sato wrote: > Updating the ICU4J components to v74.1 (https://icu.unicode.org/download/74). This change completes the Unicode 15.1 upgrade. The change is merely replacing binary data files used for the Normalization and BiDi support Marked as reviewed by joehw (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16458#pullrequestreview-1721505890 From joehw at openjdk.org Thu Nov 9 02:07:57 2023 From: joehw at openjdk.org (Joe Wang) Date: Thu, 9 Nov 2023 02:07:57 GMT Subject: RFR: 8306116: Update CLDR to Version 44.0 In-Reply-To: References: Message-ID: On Tue, 31 Oct 2023 21:06:13 GMT, Naoto Sato wrote: > Upgrading CLDR to v44 (https://cldr.unicode.org/index/downloads/cldr-44). Besides the data upgrade, regression tests are modified to accommodate the following CLDR fixes: > > CLDR-16534: Suggestion to rename the Islamic Calendar to Hijri Calendar (https://unicode-org.atlassian.net/browse/CLDR-16534) > CLDR-17042: Use exception list for new languages (https://unicode-org.atlassian.net/browse/CLDR-17042) > CLDR-16586: en_ID shows IDR rather than Rp for currency (https://unicode-org.atlassian.net/browse/CLDR-16586) > CLDR-16358: Mexico and Latin America countries should be using 12 hours time format (https://unicode-org.atlassian.net/browse/CLDR-16358) > CLDR-16974: en_GB and en_AU: request to remove comma from MMMEEEEd format (https://unicode-org.atlassian.net/browse/CLDR-16974) > CLDR-16857: Need updated translations for new Sierra Leone currency - SLL became SLE (https://unicode-org.atlassian.net/browse/CLDR-16857) Marked as reviewed by joehw (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16439#pullrequestreview-1721571315 From lancea at openjdk.org Thu Nov 9 11:32:57 2023 From: lancea at openjdk.org (Lance Andersen) Date: Thu, 9 Nov 2023 11:32:57 GMT Subject: RFR: 8296250" Update ICU4J to Version 74.1 In-Reply-To: References: Message-ID: On Wed, 1 Nov 2023 17:40:09 GMT, Naoto Sato wrote: > Updating the ICU4J components to v74.1 (https://icu.unicode.org/download/74). This change completes the Unicode 15.1 upgrade. The change is merely replacing binary data files used for the Normalization and BiDi support Marked as reviewed by lancea (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16458#pullrequestreview-1722327026 From rriggs at openjdk.org Thu Nov 9 15:44:02 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 9 Nov 2023 15:44:02 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v6] In-Reply-To: References: Message-ID: On Wed, 8 Nov 2023 00:52:36 GMT, Shaojin Wen wrote: >> j.u.Formatter now prints "%tF" (iso standard date) and the result is incorrect when processing year < 0 or year > 9999 > > Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: > > Use minus sign from cached DecimalFormatSymbols and improved testcase Thanks for the updates. ------------- Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16033#pullrequestreview-1722846831 From vromero at openjdk.org Thu Nov 9 16:05:06 2023 From: vromero at openjdk.org (Vicente Romero) Date: Thu, 9 Nov 2023 16:05:06 GMT Subject: RFR: JDK-8315457 Implementation of String Templates (Second Preview) [v6] In-Reply-To: <3NHJ2yDj2dW6Y4qPF8FmBkqkXcG7l-BzQ3EKWYArZMI=.28885188-9e99-46e8-81bd-6234023c1b1f@github.com> References: <3NHJ2yDj2dW6Y4qPF8FmBkqkXcG7l-BzQ3EKWYArZMI=.28885188-9e99-46e8-81bd-6234023c1b1f@github.com> Message-ID: <0K0xamwKYF8WAEot9UxNl8ncxWFkonJiSDgCVqs8b7A=.755020db-142d-4572-9a59-e1e31a741945@github.com> On Tue, 7 Nov 2023 12:29:54 GMT, Jim Laskey wrote: >> Update String Templates for a second preview. With the addition of >> >> - Expression type and throws are determined from the `process` method of the processor type and not the processor type. >> >> - Qualified `STR` and `RAW` are treated the same as unqualified `STR` and `RAW` . >> >> - Raw (generic) process types are no longer an error. > > Jim Laskey 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 eight additional commits since the last revision: > > - Merge remote-tracking branch 'upstream/master' into 8315457 > - Remove preview from JavaLangAccess > - Merge remote-tracking branch 'upstream/master' into 8315457 > - Cache process method type in JCStringTemplate > - Revert source > - Revert @since 22 > - Accept qualified STR and RAW > - String Templates (second preview) lgtm ------------- Marked as reviewed by vromero (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16202#pullrequestreview-1722905748 From rriggs at openjdk.org Thu Nov 9 16:05:59 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 9 Nov 2023 16:05:59 GMT Subject: RFR: 8296250" Update ICU4J to Version 74.1 In-Reply-To: References: Message-ID: <7L1uSdeCYhYJZEwsjqWRVI2uVjxbp87DA-JGiV6neSM=.0e318dd7-a577-4493-b4d4-f579d69b8ca0@github.com> On Wed, 1 Nov 2023 17:40:09 GMT, Naoto Sato wrote: > Updating the ICU4J components to v74.1 (https://icu.unicode.org/download/74). This change completes the Unicode 15.1 upgrade. The change is merely replacing binary data files used for the Normalization and BiDi support Marked as reviewed by rriggs (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16458#pullrequestreview-1722908995 From lancea at openjdk.org Thu Nov 9 16:20:59 2023 From: lancea at openjdk.org (Lance Andersen) Date: Thu, 9 Nov 2023 16:20:59 GMT Subject: RFR: 8306116: Update CLDR to Version 44.0 In-Reply-To: References: Message-ID: <0DDdC9CF-OhIVtmCFum1POY7ZTgWhEi-7kDZO5QZq5Q=.4f0c1ddb-1527-45c1-963f-8fc6a5ac89e7@github.com> On Tue, 31 Oct 2023 21:06:13 GMT, Naoto Sato wrote: > Upgrading CLDR to v44 (https://cldr.unicode.org/index/downloads/cldr-44). Besides the data upgrade, regression tests are modified to accommodate the following CLDR fixes: > > CLDR-16534: Suggestion to rename the Islamic Calendar to Hijri Calendar (https://unicode-org.atlassian.net/browse/CLDR-16534) > CLDR-17042: Use exception list for new languages (https://unicode-org.atlassian.net/browse/CLDR-17042) > CLDR-16586: en_ID shows IDR rather than Rp for currency (https://unicode-org.atlassian.net/browse/CLDR-16586) > CLDR-16358: Mexico and Latin America countries should be using 12 hours time format (https://unicode-org.atlassian.net/browse/CLDR-16358) > CLDR-16974: en_GB and en_AU: request to remove comma from MMMEEEEd format (https://unicode-org.atlassian.net/browse/CLDR-16974) > CLDR-16857: Need updated translations for new Sierra Leone currency - SLL became SLE (https://unicode-org.atlassian.net/browse/CLDR-16857) Marked as reviewed by lancea (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16439#pullrequestreview-1722957033 From naoto at openjdk.org Thu Nov 9 17:18:03 2023 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 9 Nov 2023 17:18:03 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v6] In-Reply-To: References: Message-ID: On Wed, 8 Nov 2023 00:52:36 GMT, Shaojin Wen wrote: >> j.u.Formatter now prints "%tF" (iso standard date) and the result is incorrect when processing year < 0 or year > 9999 > > Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: > > Use minus sign from cached DecimalFormatSymbols and improved testcase Looks like your fix causes a regression test failure in test/jdk/java/time/test/java/util/TestFormatter.java ----------System.out:(1097/72894)---------- test test.java.util.TestFormatter.test("en_US"): success test test.java.util.TestFormatter.test("th_TH"): success ChronoZonedDateTimeImpl(Japanese) actual: D:[04/19/05] F:[2023-04-19] FAILED; expected: D:[04/19/05] F:[0005-04-19] java.lang.RuntimeException at test.java.util.TestFormatter.test(TestFormatter.java:198) at test.java.util.TestFormatter.testDate(TestFormatter.java:216) at test.java.util.TestFormatter.test(TestFormatter.java:114) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132) at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599) at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174) at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46) at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822) at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128) at java.base/java.util.ArrayList.forEach(ArrayList.java:1597) at org.testng.TestRunner.privateRun(TestRunner.java:764) at org.testng.TestRunner.run(TestRunner.java:585) at org.testng.SuiteRunner.runTest(SuiteRunner.java:384) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337) at org.testng.SuiteRunner.run(SuiteRunner.java:286) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218) at org.testng.TestNG.runSuitesLocally(TestNG.java:1140) at org.testng.TestNG.runSuites(TestNG.java:1069) at org.testng.TestNG.run(TestNG.java:1037) at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:102) at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:58) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138) at java.base/java.lang.Thread.run(Thread.java:1570) Please make sure all the related regression tests pass. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16033#issuecomment-1804237006 From rriggs at openjdk.org Thu Nov 9 17:27:00 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 9 Nov 2023 17:27:00 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v6] In-Reply-To: References: Message-ID: <-GfViWiwQmceGNowaIERufq7gJn3DF3dA6oLo03BR04=.63199bff-9265-4d36-8bf3-0375800c1e6f@github.com> On Wed, 8 Nov 2023 00:52:36 GMT, Shaojin Wen wrote: >> j.u.Formatter now prints "%tF" (iso standard date) and the result is incorrect when processing year < 0 or year > 9999 > > Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: > > Use minus sign from cached DecimalFormatSymbols and improved testcase Without the change localization of the dates, the CSR is not needed ------------- PR Comment: https://git.openjdk.org/jdk/pull/16033#issuecomment-1804251322 From naoto at openjdk.org Thu Nov 9 17:56:10 2023 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 9 Nov 2023 17:56:10 GMT Subject: RFR: 8319640: ClassicFormat::parseObject (from DateTimeFormatter) does not conform to the javadoc and may leak DateTimeException Message-ID: Fixing the `Format::parseObject(String, ParsePosition)` implementation in `DateTimeFormatter` class, to not throw `DateTimeException` but to return null. ------------- Commit messages: - initial commit Changes: https://git.openjdk.org/jdk/pull/16586/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16586&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8319640 Stats: 39 lines in 2 files changed: 24 ins; 8 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/16586.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16586/head:pull/16586 PR: https://git.openjdk.org/jdk/pull/16586 From rriggs at openjdk.org Thu Nov 9 18:38:56 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 9 Nov 2023 18:38:56 GMT Subject: RFR: 8319640: ClassicFormat::parseObject (from DateTimeFormatter) does not conform to the javadoc and may leak DateTimeException In-Reply-To: References: Message-ID: On Thu, 9 Nov 2023 17:44:44 GMT, Naoto Sato wrote: > Fixing the `Format::parseObject(String, ParsePosition)` implementation in `DateTimeFormatter` class, to not throw `DateTimeException` but to return null. Looks good. ------------- Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16586#pullrequestreview-1723260458 From iris at openjdk.org Thu Nov 9 18:57:01 2023 From: iris at openjdk.org (Iris Clark) Date: Thu, 9 Nov 2023 18:57:01 GMT Subject: RFR: 8319640: ClassicFormat::parseObject (from DateTimeFormatter) does not conform to the javadoc and may leak DateTimeException In-Reply-To: References: Message-ID: On Thu, 9 Nov 2023 17:44:44 GMT, Naoto Sato wrote: > Fixing the `Format::parseObject(String, ParsePosition)` implementation in `DateTimeFormatter` class, to not throw `DateTimeException` but to return null. Marked as reviewed by iris (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16586#pullrequestreview-1723287749 From jlu at openjdk.org Thu Nov 9 22:05:15 2023 From: jlu at openjdk.org (Justin Lu) Date: Thu, 9 Nov 2023 22:05:15 GMT Subject: RFR: JDK-8318189: ChoiceFormat::format throws undocumented AIOOBE Message-ID: Please review this PR which makes an `ArrayIndexOutOfBoundsException` apparent in ChoiceFormat::format. An _incomplete_ ChoiceFormat can be created, which is not revealed until format is invoked. ------------- Commit messages: - init Changes: https://git.openjdk.org/jdk/pull/16587/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16587&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8318189 Stats: 13 lines in 1 file changed: 11 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/16587.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16587/head:pull/16587 PR: https://git.openjdk.org/jdk/pull/16587 From jlu at openjdk.org Thu Nov 9 22:54:56 2023 From: jlu at openjdk.org (Justin Lu) Date: Thu, 9 Nov 2023 22:54:56 GMT Subject: RFR: 8319640: ClassicFormat::parseObject (from DateTimeFormatter) does not conform to the javadoc and may leak DateTimeException In-Reply-To: References: Message-ID: On Thu, 9 Nov 2023 17:44:44 GMT, Naoto Sato wrote: > Fixing the `Format::parseObject(String, ParsePosition)` implementation in `DateTimeFormatter` class, to not throw `DateTimeException` but to return null. LGTM ------------- Marked as reviewed by jlu (Committer). PR Review: https://git.openjdk.org/jdk/pull/16586#pullrequestreview-1723639587 From naoto at openjdk.org Fri Nov 10 00:08:57 2023 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 10 Nov 2023 00:08:57 GMT Subject: RFR: JDK-8318189: ChoiceFormat::format throws undocumented AIOOBE In-Reply-To: References: Message-ID: On Thu, 9 Nov 2023 21:58:12 GMT, Justin Lu wrote: > Please review this PR which makes an `ArrayIndexOutOfBoundsException` apparent in ChoiceFormat::format. > > An _incomplete_ ChoiceFormat can be created, which is not revealed until format is invoked. Marked as reviewed by naoto (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16587#pullrequestreview-1723711743 From joehw at openjdk.org Fri Nov 10 01:22:57 2023 From: joehw at openjdk.org (Joe Wang) Date: Fri, 10 Nov 2023 01:22:57 GMT Subject: RFR: 8319640: ClassicFormat::parseObject (from DateTimeFormatter) does not conform to the javadoc and may leak DateTimeException In-Reply-To: References: Message-ID: On Thu, 9 Nov 2023 17:44:44 GMT, Naoto Sato wrote: > Fixing the `Format::parseObject(String, ParsePosition)` implementation in `DateTimeFormatter` class, to not throw `DateTimeException` but to return null. test/jdk/java/time/test/java/time/format/TestDateTimeParsing.java line 260: > 258: .toFormatter(Locale.ROOT) > 259: .toFormat(); > 260: assertEquals(f.parseObject("17-30", new ParsePosition(0)), null); I might have missed it, but this test doesn't seem to exercise the situation where IOOBE would happen. Though the result would be the same as it catches RuntimeException always, I wonder whether an additional test case would be helpful to verify the IOOBE situation, e.g. set the position to be greater than the length. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16586#discussion_r1388762259 From duke at openjdk.org Fri Nov 10 03:14:22 2023 From: duke at openjdk.org (Shaojin Wen) Date: Fri, 10 Nov 2023 03:14:22 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v7] In-Reply-To: References: Message-ID: > j.u.Formatter now prints "%tF" (iso standard date) and the result is incorrect when processing year < 0 or year > 9999 Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: fix format 'ja-JP-u-ca-japanese' ChronoLocalDate ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16033/files - new: https://git.openjdk.org/jdk/pull/16033/files/47fc35f1..902ab4ca Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16033&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16033&range=05-06 Stats: 25 lines in 2 files changed: 24 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16033.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16033/head:pull/16033 PR: https://git.openjdk.org/jdk/pull/16033 From duke at openjdk.org Fri Nov 10 03:31:26 2023 From: duke at openjdk.org (Shaojin Wen) Date: Fri, 10 Nov 2023 03:31:26 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v8] In-Reply-To: References: Message-ID: > j.u.Formatter now prints "%tF" (iso standard date) and the result is incorrect when processing year < 0 or year > 9999 Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: fix format 'ja-JP-u-ca-japanese' ChronoLocalDate ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16033/files - new: https://git.openjdk.org/jdk/pull/16033/files/902ab4ca..4e518b39 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16033&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16033&range=06-07 Stats: 17 lines in 2 files changed: 15 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/16033.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16033/head:pull/16033 PR: https://git.openjdk.org/jdk/pull/16033 From aturbanov at openjdk.org Sun Nov 12 09:18:04 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Sun, 12 Nov 2023 09:18:04 GMT Subject: RFR: 8316557: Make fields final in 'sun.util' package In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 08:58:56 GMT, Andrey Turbanov wrote: > A few classes in `sun.util` package have non-final fields which could easily be marked `final`. Can I get a review? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15736#issuecomment-1807066050 From jlu at openjdk.org Sun Nov 12 21:43:08 2023 From: jlu at openjdk.org (Justin Lu) Date: Sun, 12 Nov 2023 21:43:08 GMT Subject: Integrated: JDK-8318189: ChoiceFormat::format throws undocumented AIOOBE In-Reply-To: References: Message-ID: <_7ErQkr_PSy1C9WH3F9l5AiVouA92CVKhLBSMuX768k=.d7cb535e-a601-457d-87e8-ab64606b709a@github.com> On Thu, 9 Nov 2023 21:58:12 GMT, Justin Lu wrote: > Please review this PR which makes an `ArrayIndexOutOfBoundsException` apparent in ChoiceFormat::format. > > An _incomplete_ ChoiceFormat can be created, which is not revealed until format is invoked. This pull request has now been integrated. Changeset: caf71810 Author: Justin Lu URL: https://git.openjdk.org/jdk/commit/caf71810f85ea55083ce7d1c76307a0c42d9be0e Stats: 13 lines in 1 file changed: 11 ins; 0 del; 2 mod 8318189: ChoiceFormat::format throws undocumented AIOOBE Reviewed-by: naoto ------------- PR: https://git.openjdk.org/jdk/pull/16587 From jlu at openjdk.org Sun Nov 12 21:45:10 2023 From: jlu at openjdk.org (Justin Lu) Date: Sun, 12 Nov 2023 21:45:10 GMT Subject: RFR: JDK-8319628: DateFormat does not mention IllegalArgumentException for invalid style args Message-ID: Please review this PR and [CSR](https://bugs.openjdk.org/browse/JDK-8319868) which makes IllegalArgumentExceptions apparent for the _j.text.DateFormat_ static factory methods that have the _style_ parameter. ------------- Commit messages: - init Changes: https://git.openjdk.org/jdk/pull/16624/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16624&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8319628 Stats: 6 lines in 1 file changed: 2 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/16624.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16624/head:pull/16624 PR: https://git.openjdk.org/jdk/pull/16624 From pminborg at openjdk.org Mon Nov 13 11:45:06 2023 From: pminborg at openjdk.org (Per Minborg) Date: Mon, 13 Nov 2023 11:45:06 GMT Subject: RFR: 8316557: Make fields final in 'sun.util' package In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 08:58:56 GMT, Andrey Turbanov wrote: > A few classes in `sun.util` package have non-final fields which could easily be marked `final`. src/java.base/share/classes/sun/util/cldr/CLDRCalendarDataProviderImpl.java line 48: > 46: public class CLDRCalendarDataProviderImpl extends CalendarDataProviderImpl { > 47: > 48: private static final Map firstDay = new ConcurrentHashMap<>(); We might rename these fields to FIRST_DAY etc. src/java.base/share/classes/sun/util/cldr/CLDRLocaleProviderAdapter.java line 63: > 61: > 62: // parent locales map > 63: private static final Map parentLocalesMap; Rename to PARENT_LOCALES_MAP? src/java.base/share/classes/sun/util/locale/LocaleObjectCache.java line 102: > 100: } > 101: > 102: private static class CacheEntry extends SoftReference { The class itself might be `final` ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15736#discussion_r1391002631 PR Review Comment: https://git.openjdk.org/jdk/pull/15736#discussion_r1391004183 PR Review Comment: https://git.openjdk.org/jdk/pull/15736#discussion_r1391005224 From pminborg at openjdk.org Mon Nov 13 11:51:00 2023 From: pminborg at openjdk.org (Per Minborg) Date: Mon, 13 Nov 2023 11:51:00 GMT Subject: RFR: 8316557: Make fields final in 'sun.util' package In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 08:58:56 GMT, Andrey Turbanov wrote: > A few classes in `sun.util` package have non-final fields which could easily be marked `final`. LGTM. See comments though. src/java.base/share/classes/sun/util/locale/StringTokenIterator.java line 33: > 31: package sun.util.locale; > 32: > 33: public class StringTokenIterator { The class may be `final` ------------- Marked as reviewed by pminborg (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15736#pullrequestreview-1727154051 PR Review Comment: https://git.openjdk.org/jdk/pull/15736#discussion_r1391008427 From naoto at openjdk.org Mon Nov 13 16:57:14 2023 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 13 Nov 2023 16:57:14 GMT Subject: Integrated: 8296250" Update ICU4J to Version 74.1 In-Reply-To: References: Message-ID: On Wed, 1 Nov 2023 17:40:09 GMT, Naoto Sato wrote: > Updating the ICU4J components to v74.1 (https://icu.unicode.org/download/74). This change completes the Unicode 15.1 upgrade. The change is merely replacing binary data files used for the Normalization and BiDi support This pull request has now been integrated. Changeset: 88ccd646 Author: Naoto Sato URL: https://git.openjdk.org/jdk/commit/88ccd646a7778045d773099da0f743efb169169c Stats: 528 lines in 12 files changed: 80 ins; 426 del; 22 mod 8296250: Update ICU4J to Version 74.1 Reviewed-by: joehw, lancea, rriggs ------------- PR: https://git.openjdk.org/jdk/pull/16458 From naoto at openjdk.org Mon Nov 13 16:58:17 2023 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 13 Nov 2023 16:58:17 GMT Subject: Integrated: 8306116: Update CLDR to Version 44.0 In-Reply-To: References: Message-ID: On Tue, 31 Oct 2023 21:06:13 GMT, Naoto Sato wrote: > Upgrading CLDR to v44 (https://cldr.unicode.org/index/downloads/cldr-44). Besides the data upgrade, regression tests are modified to accommodate the following CLDR fixes: > > CLDR-16534: Suggestion to rename the Islamic Calendar to Hijri Calendar (https://unicode-org.atlassian.net/browse/CLDR-16534) > CLDR-17042: Use exception list for new languages (https://unicode-org.atlassian.net/browse/CLDR-17042) > CLDR-16586: en_ID shows IDR rather than Rp for currency (https://unicode-org.atlassian.net/browse/CLDR-16586) > CLDR-16358: Mexico and Latin America countries should be using 12 hours time format (https://unicode-org.atlassian.net/browse/CLDR-16358) > CLDR-16974: en_GB and en_AU: request to remove comma from MMMEEEEd format (https://unicode-org.atlassian.net/browse/CLDR-16974) > CLDR-16857: Need updated translations for new Sierra Leone currency - SLL became SLE (https://unicode-org.atlassian.net/browse/CLDR-16857) This pull request has now been integrated. Changeset: 3684b4b5 Author: Naoto Sato URL: https://git.openjdk.org/jdk/commit/3684b4b5f24b413408b1b6d206917931b855844e Stats: 591898 lines in 499 files changed: 72642 ins; 463467 del; 55789 mod 8306116: Update CLDR to Version 44.0 Reviewed-by: srl, joehw, lancea ------------- PR: https://git.openjdk.org/jdk/pull/16439 From naoto at openjdk.org Mon Nov 13 18:37:42 2023 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 13 Nov 2023 18:37:42 GMT Subject: RFR: 8319640: ClassicFormat::parseObject (from DateTimeFormatter) does not conform to the javadoc and may leak DateTimeException [v2] In-Reply-To: References: Message-ID: > Fixing the `Format::parseObject(String, ParsePosition)` implementation in `DateTimeFormatter` class, to not throw `DateTimeException` but to return null. Naoto Sato has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: - comment fix - Addresses review comments - Merge branch 'master' into JDK-8319640-ClassicFormat-parseObject - initial commit ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16586/files - new: https://git.openjdk.org/jdk/pull/16586/files/7a4b8ef2..2b03aa2d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16586&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16586&range=00-01 Stats: 611054 lines in 787 files changed: 78824 ins; 472476 del; 59754 mod Patch: https://git.openjdk.org/jdk/pull/16586.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16586/head:pull/16586 PR: https://git.openjdk.org/jdk/pull/16586 From naoto at openjdk.org Mon Nov 13 18:37:42 2023 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 13 Nov 2023 18:37:42 GMT Subject: RFR: 8319640: ClassicFormat::parseObject (from DateTimeFormatter) does not conform to the javadoc and may leak DateTimeException [v2] In-Reply-To: References: Message-ID: On Fri, 10 Nov 2023 01:20:28 GMT, Joe Wang wrote: >> Naoto Sato has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: >> >> - comment fix >> - Addresses review comments >> - Merge branch 'master' into JDK-8319640-ClassicFormat-parseObject >> - initial commit > > test/jdk/java/time/test/java/time/format/TestDateTimeParsing.java line 260: > >> 258: .toFormatter(Locale.ROOT) >> 259: .toFormat(); >> 260: assertEquals(f.parseObject("17-30", new ParsePosition(0)), null); > > I might have missed it, but this test doesn't seem to exercise the situation where IOOBE would happen. Though the result would be the same as it catches RuntimeException always, I wonder whether an additional test case would be helpful to verify the IOOBE situation, e.g. set the position to be greater than the length. Thanks, Joe. Added extra test for IOOBE. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16586#discussion_r1391518275 From naoto at openjdk.org Mon Nov 13 18:41:08 2023 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 13 Nov 2023 18:41:08 GMT Subject: RFR: 8319640: ClassicFormat::parseObject (from DateTimeFormatter) does not conform to the javadoc and may leak DateTimeException [v3] In-Reply-To: References: Message-ID: <3kVo3Ekns0CGdqxh9XtcU3Nq3VfLjAN55kZ6qV7S2ck=.5401cdab-726f-4f71-96cd-50099e9cc81a@github.com> > Fixing the `Format::parseObject(String, ParsePosition)` implementation in `DateTimeFormatter` class, to not throw `DateTimeException` but to return null. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: comment fix^2 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16586/files - new: https://git.openjdk.org/jdk/pull/16586/files/2b03aa2d..f43ae0f2 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16586&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16586&range=01-02 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/16586.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16586/head:pull/16586 PR: https://git.openjdk.org/jdk/pull/16586 From naoto at openjdk.org Mon Nov 13 19:35:41 2023 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 13 Nov 2023 19:35:41 GMT Subject: RFR: JDK-8319628: DateFormat does not mention IllegalArgumentException for invalid style args In-Reply-To: References: Message-ID: <745WFfokAyTnXxGiMr6ux80MxA85Y2PyQr322jllonI=.d5d53f5e-18bb-4fd1-bd3e-c70184ea4be8@github.com> On Sun, 12 Nov 2023 21:39:29 GMT, Justin Lu wrote: > Please review this PR and [CSR](https://bugs.openjdk.org/browse/JDK-8319868) which makes IllegalArgumentExceptions apparent for the _j.text.DateFormat_ static factory methods that have the _style_ parameter. src/java.base/share/classes/java/text/DateFormat.java line 68: > 66: * styles. The formatting styles include {@link #FULL}, {@link #LONG}, {@link #MEDIUM}, and {@link #SHORT}. > 67: * For any of the factory methods with the parameter style, an {@code > 68: * IllegalArgumentException} will be thrown if style is not equal to one I wonder if "not equal to *any* of the ..." may read better here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16624#discussion_r1391596506 From rriggs at openjdk.org Mon Nov 13 19:52:10 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 13 Nov 2023 19:52:10 GMT Subject: RFR: 8319640: ClassicFormat::parseObject (from DateTimeFormatter) does not conform to the javadoc and may leak DateTimeException [v3] In-Reply-To: <3kVo3Ekns0CGdqxh9XtcU3Nq3VfLjAN55kZ6qV7S2ck=.5401cdab-726f-4f71-96cd-50099e9cc81a@github.com> References: <3kVo3Ekns0CGdqxh9XtcU3Nq3VfLjAN55kZ6qV7S2ck=.5401cdab-726f-4f71-96cd-50099e9cc81a@github.com> Message-ID: <93p7Rpn6iffeQPULlFiHv_hFJxd63GGz8Of6hJsN9vc=.f811574f-276c-41a4-a1d7-204b4b6df32b@github.com> On Mon, 13 Nov 2023 18:41:08 GMT, Naoto Sato wrote: >> Fixing the `Format::parseObject(String, ParsePosition)` implementation in `DateTimeFormatter` class, to not throw `DateTimeException` but to return null. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > comment fix^2 Marked as reviewed by rriggs (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16586#pullrequestreview-1728140279 From jlu at openjdk.org Mon Nov 13 21:38:11 2023 From: jlu at openjdk.org (Justin Lu) Date: Mon, 13 Nov 2023 21:38:11 GMT Subject: RFR: JDK-8319628: DateFormat does not mention IllegalArgumentException for invalid style args [v2] In-Reply-To: References: Message-ID: > Please review this PR and [CSR](https://bugs.openjdk.org/browse/JDK-8319868) which makes IllegalArgumentExceptions apparent for the _j.text.DateFormat_ static factory methods that have the _style_ parameter. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: reflect review, one -> any ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16624/files - new: https://git.openjdk.org/jdk/pull/16624/files/f1a4b6c9..fa795543 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16624&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16624&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16624.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16624/head:pull/16624 PR: https://git.openjdk.org/jdk/pull/16624 From jlu at openjdk.org Mon Nov 13 21:38:11 2023 From: jlu at openjdk.org (Justin Lu) Date: Mon, 13 Nov 2023 21:38:11 GMT Subject: RFR: JDK-8319628: DateFormat does not mention IllegalArgumentException for invalid style args [v2] In-Reply-To: <745WFfokAyTnXxGiMr6ux80MxA85Y2PyQr322jllonI=.d5d53f5e-18bb-4fd1-bd3e-c70184ea4be8@github.com> References: <745WFfokAyTnXxGiMr6ux80MxA85Y2PyQr322jllonI=.d5d53f5e-18bb-4fd1-bd3e-c70184ea4be8@github.com> Message-ID: On Mon, 13 Nov 2023 19:32:18 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional commit since the last revision: >> >> reflect review, one -> any > > src/java.base/share/classes/java/text/DateFormat.java line 68: > >> 66: * styles. The formatting styles include {@link #FULL}, {@link #LONG}, {@link #MEDIUM}, and {@link #SHORT}. >> 67: * For any of the factory methods with the parameter style, an {@code >> 68: * IllegalArgumentException} will be thrown if style is not equal to one > > I wonder if "not equal to *any* of the ..." may read better here. Agreed that sounds better. Changed in both the CSR and the PR, thanks. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16624#discussion_r1391730654 From joehw at openjdk.org Mon Nov 13 22:13:28 2023 From: joehw at openjdk.org (Joe Wang) Date: Mon, 13 Nov 2023 22:13:28 GMT Subject: RFR: 8319640: ClassicFormat::parseObject (from DateTimeFormatter) does not conform to the javadoc and may leak DateTimeException [v3] In-Reply-To: <3kVo3Ekns0CGdqxh9XtcU3Nq3VfLjAN55kZ6qV7S2ck=.5401cdab-726f-4f71-96cd-50099e9cc81a@github.com> References: <3kVo3Ekns0CGdqxh9XtcU3Nq3VfLjAN55kZ6qV7S2ck=.5401cdab-726f-4f71-96cd-50099e9cc81a@github.com> Message-ID: On Mon, 13 Nov 2023 18:41:08 GMT, Naoto Sato wrote: >> Fixing the `Format::parseObject(String, ParsePosition)` implementation in `DateTimeFormatter` class, to not throw `DateTimeException` but to return null. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > comment fix^2 Marked as reviewed by joehw (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16586#pullrequestreview-1728370308 From joehw at openjdk.org Mon Nov 13 22:13:31 2023 From: joehw at openjdk.org (Joe Wang) Date: Mon, 13 Nov 2023 22:13:31 GMT Subject: RFR: 8319640: ClassicFormat::parseObject (from DateTimeFormatter) does not conform to the javadoc and may leak DateTimeException [v3] In-Reply-To: References: Message-ID: On Mon, 13 Nov 2023 18:33:55 GMT, Naoto Sato wrote: >> test/jdk/java/time/test/java/time/format/TestDateTimeParsing.java line 260: >> >>> 258: .toFormatter(Locale.ROOT) >>> 259: .toFormat(); >>> 260: assertEquals(f.parseObject("17-30", new ParsePosition(0)), null); >> >> I might have missed it, but this test doesn't seem to exercise the situation where IOOBE would happen. Though the result would be the same as it catches RuntimeException always, I wonder whether an additional test case would be helpful to verify the IOOBE situation, e.g. set the position to be greater than the length. > > Thanks, Joe. Added extra test for IOOBE. Thanks, Naoto. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16586#discussion_r1391759495 From naoto at openjdk.org Mon Nov 13 23:40:27 2023 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 13 Nov 2023 23:40:27 GMT Subject: RFR: JDK-8319628: DateFormat does not mention IllegalArgumentException for invalid style args [v2] In-Reply-To: References: Message-ID: On Mon, 13 Nov 2023 21:38:11 GMT, Justin Lu wrote: >> Please review this PR and [CSR](https://bugs.openjdk.org/browse/JDK-8319868) which makes IllegalArgumentExceptions apparent for the _j.text.DateFormat_ static factory methods that have the _style_ parameter. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > reflect review, one -> any LGTM. The CSR has also been reviewed. ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16624#pullrequestreview-1728451901 From naoto at openjdk.org Mon Nov 13 23:40:36 2023 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 13 Nov 2023 23:40:36 GMT Subject: RFR: 8319986: Invalid/inconsistent description and example for DateFormat Message-ID: Correcting the explanation of the `DateFormat.SHORT` constant. ------------- Commit messages: - initial commit Changes: https://git.openjdk.org/jdk/pull/16645/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16645&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8319986 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16645.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16645/head:pull/16645 PR: https://git.openjdk.org/jdk/pull/16645 From naoto at openjdk.org Mon Nov 13 23:45:37 2023 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 13 Nov 2023 23:45:37 GMT Subject: Integrated: 8319640: ClassicFormat::parseObject (from DateTimeFormatter) does not conform to the javadoc and may leak DateTimeException In-Reply-To: References: Message-ID: On Thu, 9 Nov 2023 17:44:44 GMT, Naoto Sato wrote: > Fixing the `Format::parseObject(String, ParsePosition)` implementation in `DateTimeFormatter` class, to not throw `DateTimeException` but to return null. This pull request has now been integrated. Changeset: fe0ccdf5 Author: Naoto Sato URL: https://git.openjdk.org/jdk/commit/fe0ccdf5f8a5559a608d2e2cd2b6aecbe245c5ec Stats: 50 lines in 2 files changed: 34 ins; 8 del; 8 mod 8319640: ClassicFormat::parseObject (from DateTimeFormatter) does not conform to the javadoc and may leak DateTimeException Reviewed-by: rriggs, iris, jlu, joehw ------------- PR: https://git.openjdk.org/jdk/pull/16586 From joehw at openjdk.org Tue Nov 14 01:45:26 2023 From: joehw at openjdk.org (Joe Wang) Date: Tue, 14 Nov 2023 01:45:26 GMT Subject: RFR: 8319986: Invalid/inconsistent description and example for DateFormat In-Reply-To: References: Message-ID: <8GdRmjvKIH0rjG6uP98UpaIGnl1qrYRKu74narYg0c4=.445ac7c3-fe57-41d4-9886-0e53c7e46bbb@github.com> On Mon, 13 Nov 2023 23:35:11 GMT, Naoto Sato wrote: > Correcting the explanation of the `DateFormat.SHORT` constant. src/java.base/share/classes/java/text/DateFormat.java line 120: > 118: * result; from {@link #SHORT} to {@link #MEDIUM} to {@link #LONG} to {@link #FULL}. The exact result depends > 119: * on the locale, but generally: > 120: *
  • {@link #SHORT} is the shortest and mainly numeric, such as {@code 12.13.52} or {@code 3:30pm} Not sure if we want to update the descriptions of all options, but if we want to be consistent, here's a suggestion, how about: {@link #SHORT} is a concise format using numeric digits, for example, {@code 12.13.52} or {@code 3:30pm} {@link #MEDIUM} provides more detail, such as {@code Jan 12, 1952} {@link #LONG} is a comprehensive format, such as {@code January 12, 1952} or {@code 3:30:32pm} {@link #FULL} provides a complete date representation, such as "pretty completely" is a bit casual :-) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16645#discussion_r1391880915 From naoto at openjdk.org Tue Nov 14 17:16:59 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 14 Nov 2023 17:16:59 GMT Subject: RFR: 8319986: Invalid/inconsistent description and example for DateFormat [v2] In-Reply-To: References: Message-ID: > Correcting the explanation of the `DateFormat.SHORT` constant. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Reflects review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16645/files - new: https://git.openjdk.org/jdk/pull/16645/files/2c9243a9..b5c33cc5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16645&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16645&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16645.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16645/head:pull/16645 PR: https://git.openjdk.org/jdk/pull/16645 From naoto at openjdk.org Tue Nov 14 17:17:02 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 14 Nov 2023 17:17:02 GMT Subject: RFR: 8319986: Invalid/inconsistent description and example for DateFormat [v2] In-Reply-To: <8GdRmjvKIH0rjG6uP98UpaIGnl1qrYRKu74narYg0c4=.445ac7c3-fe57-41d4-9886-0e53c7e46bbb@github.com> References: <8GdRmjvKIH0rjG6uP98UpaIGnl1qrYRKu74narYg0c4=.445ac7c3-fe57-41d4-9886-0e53c7e46bbb@github.com> Message-ID: On Tue, 14 Nov 2023 01:41:15 GMT, Joe Wang wrote: >> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: >> >> Reflects review comments > > src/java.base/share/classes/java/text/DateFormat.java line 120: > >> 118: * result; from {@link #SHORT} to {@link #MEDIUM} to {@link #LONG} to {@link #FULL}. The exact result depends >> 119: * on the locale, but generally: >> 120: *
    • {@link #SHORT} is the shortest and mainly numeric, such as {@code 12.13.52} or {@code 3:30pm} > > Not sure if we want to update the descriptions of all options, but if we want to be consistent, here's a suggestion, how about: > {@link #SHORT} is a concise format using numeric digits, for example, {@code 12.13.52} or {@code 3:30pm} > {@link #MEDIUM} provides more detail, such as {@code Jan 12, 1952} > {@link #LONG} is a comprehensive format, such as {@code January 12, 1952} or {@code 3:30:32pm} > {@link #FULL} provides a complete date representation, such as > > "pretty completely" is a bit casual :-) Thanks for the feedback, Joe. I think I would rather keep the description somewhat abstract, simply mentioning the formatted output is `SHORT` <= `MEDIUM` <= `LONG` <= `FULL` in length-wise. As it is noted in the previous sentence, it is pretty much locale-dependent. I simply replaced that casual wording with "the longest" for consistency. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16645#discussion_r1392948818 From jlu at openjdk.org Tue Nov 14 17:46:31 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 14 Nov 2023 17:46:31 GMT Subject: RFR: 8319986: Invalid/inconsistent description and example for DateFormat [v2] In-Reply-To: References: Message-ID: On Tue, 14 Nov 2023 17:16:59 GMT, Naoto Sato wrote: >> Correcting the explanation of the `DateFormat.SHORT` constant. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > Reflects review comments src/java.base/share/classes/java/text/DateFormat.java line 122: > 120: *
      • {@link #SHORT} is the shortest and mainly numeric, such as {@code 12.13.52} or {@code 3:30pm} > 121: *
      • {@link #MEDIUM} is longer, such as {@code Jan 12, 1952} > 122: *
      • {@link #LONG} is longer, such as {@code January 12, 1952} or {@code 3:30:32pm} Does it make sense to change LONG to "_is even longer_" or "_is longer than MEDIUM_"? Still keeps it abstract but clarifies it a little more IMO (and should still hold true regardless of locale) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16645#discussion_r1392996202 From naoto at openjdk.org Tue Nov 14 17:52:45 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 14 Nov 2023 17:52:45 GMT Subject: RFR: 8319986: Invalid/inconsistent description and example for DateFormat [v2] In-Reply-To: References: Message-ID: On Tue, 14 Nov 2023 17:43:54 GMT, Justin Lu wrote: >> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: >> >> Reflects review comments > > src/java.base/share/classes/java/text/DateFormat.java line 122: > >> 120: *
        • {@link #SHORT} is the shortest and mainly numeric, such as {@code 12.13.52} or {@code 3:30pm} >> 121: *
        • {@link #MEDIUM} is longer, such as {@code Jan 12, 1952} >> 122: *
        • {@link #LONG} is longer, such as {@code January 12, 1952} or {@code 3:30:32pm} > > Does it make sense to change LONG to "_is even longer_" or "_is longer than MEDIUM_"? > > Still keeps it abstract but clarifies it a little more IMO (and should still hold true regardless of locale) Good point. Replaced as suggested. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16645#discussion_r1393006111 From naoto at openjdk.org Tue Nov 14 17:52:43 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 14 Nov 2023 17:52:43 GMT Subject: RFR: 8319986: Invalid/inconsistent description and example for DateFormat [v3] In-Reply-To: References: Message-ID: > Correcting the explanation of the `DateFormat.SHORT` constant. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Further clarification ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16645/files - new: https://git.openjdk.org/jdk/pull/16645/files/b5c33cc5..47fa6c42 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16645&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16645&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16645.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16645/head:pull/16645 PR: https://git.openjdk.org/jdk/pull/16645 From rriggs at openjdk.org Tue Nov 14 18:17:28 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 14 Nov 2023 18:17:28 GMT Subject: RFR: 8319986: Invalid/inconsistent description and example for DateFormat [v3] In-Reply-To: References: <8GdRmjvKIH0rjG6uP98UpaIGnl1qrYRKu74narYg0c4=.445ac7c3-fe57-41d4-9886-0e53c7e46bbb@github.com> Message-ID: On Tue, 14 Nov 2023 17:14:06 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/text/DateFormat.java line 120: >> >>> 118: * result; from {@link #SHORT} to {@link #MEDIUM} to {@link #LONG} to {@link #FULL}. The exact result depends >>> 119: * on the locale, but generally: >>> 120: *
          • {@link #SHORT} is the shortest and mainly numeric, such as {@code 12.13.52} or {@code 3:30pm} >> >> Not sure if we want to update the descriptions of all options, but if we want to be consistent, here's a suggestion, how about: >> {@link #SHORT} is a concise format using numeric digits, for example, {@code 12.13.52} or {@code 3:30pm} >> {@link #MEDIUM} provides more detail, such as {@code Jan 12, 1952} >> {@link #LONG} is a comprehensive format, such as {@code January 12, 1952} or {@code 3:30:32pm} >> {@link #FULL} provides a complete date representation, such as >> >> "pretty completely" is a bit casual :-) > > Thanks for the feedback, Joe. I think I would rather keep the description somewhat abstract, simply mentioning the formatted output is `SHORT` <= `MEDIUM` <= `LONG` <= `FULL` in length-wise. As it is noted in the previous sentence, it is pretty much locale-dependent. > I simply replaced that casual wording with "the longest" for consistency. Is there any value in mentioning that MEDIUM format typically uses abbreviations. Whereas the LONG and FULL format typically does not use abbreviations. (For months) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16645#discussion_r1393041408 From naoto at openjdk.org Tue Nov 14 19:32:57 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 14 Nov 2023 19:32:57 GMT Subject: RFR: 8319986: Invalid/inconsistent description and example for DateFormat [v4] In-Reply-To: References: Message-ID: > Correcting the explanation of the `DateFormat.SHORT` constant. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: abbreviated/full clarification ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16645/files - new: https://git.openjdk.org/jdk/pull/16645/files/47fa6c42..523fcf30 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16645&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16645&range=02-03 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16645.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16645/head:pull/16645 PR: https://git.openjdk.org/jdk/pull/16645 From naoto at openjdk.org Tue Nov 14 19:32:58 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 14 Nov 2023 19:32:58 GMT Subject: RFR: 8319986: Invalid/inconsistent description and example for DateFormat [v4] In-Reply-To: References: <8GdRmjvKIH0rjG6uP98UpaIGnl1qrYRKu74narYg0c4=.445ac7c3-fe57-41d4-9886-0e53c7e46bbb@github.com> Message-ID: On Tue, 14 Nov 2023 18:14:45 GMT, Roger Riggs wrote: >> Thanks for the feedback, Joe. I think I would rather keep the description somewhat abstract, simply mentioning the formatted output is `SHORT` <= `MEDIUM` <= `LONG` <= `FULL` in length-wise. As it is noted in the previous sentence, it is pretty much locale-dependent. >> I simply replaced that casual wording with "the longest" for consistency. > > Is there any value in mentioning that MEDIUM format typically uses abbreviations. > Whereas the LONG and FULL format typically does not use abbreviations. (For months) Added a sentence explaining it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16645#discussion_r1393160341 From joehw at openjdk.org Tue Nov 14 20:00:31 2023 From: joehw at openjdk.org (Joe Wang) Date: Tue, 14 Nov 2023 20:00:31 GMT Subject: RFR: 8319986: Invalid/inconsistent description and example for DateFormat [v4] In-Reply-To: References: Message-ID: On Tue, 14 Nov 2023 19:32:57 GMT, Naoto Sato wrote: >> Correcting the explanation of the `DateFormat.SHORT` constant. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > abbreviated/full clarification Marked as reviewed by joehw (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16645#pullrequestreview-1730654925 From rriggs at openjdk.org Tue Nov 14 20:28:31 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 14 Nov 2023 20:28:31 GMT Subject: RFR: 8319986: Invalid/inconsistent description and example for DateFormat [v4] In-Reply-To: References: Message-ID: On Tue, 14 Nov 2023 19:32:57 GMT, Naoto Sato wrote: >> Correcting the explanation of the `DateFormat.SHORT` constant. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > abbreviated/full clarification Marked as reviewed by rriggs (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16645#pullrequestreview-1730712231 From jlu at openjdk.org Tue Nov 14 20:55:30 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 14 Nov 2023 20:55:30 GMT Subject: RFR: 8319986: Invalid/inconsistent description and example for DateFormat [v4] In-Reply-To: References: Message-ID: <_2yP9Kn5CcxLi7wh5eQcvUnnl-f1VrWsnYWOVnDy99I=.9b362752-02ee-48fc-aa4e-5bb4fa4f8e19@github.com> On Tue, 14 Nov 2023 19:32:57 GMT, Naoto Sato wrote: >> Correcting the explanation of the `DateFormat.SHORT` constant. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > abbreviated/full clarification Marked as reviewed by jlu (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16645#pullrequestreview-1730767526 From iris at openjdk.org Tue Nov 14 20:59:31 2023 From: iris at openjdk.org (Iris Clark) Date: Tue, 14 Nov 2023 20:59:31 GMT Subject: RFR: 8319986: Invalid/inconsistent description and example for DateFormat [v4] In-Reply-To: References: Message-ID: On Tue, 14 Nov 2023 19:32:57 GMT, Naoto Sato wrote: >> Correcting the explanation of the `DateFormat.SHORT` constant. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > abbreviated/full clarification Marked as reviewed by iris (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16645#pullrequestreview-1730777438 From lancea at openjdk.org Tue Nov 14 21:13:31 2023 From: lancea at openjdk.org (Lance Andersen) Date: Tue, 14 Nov 2023 21:13:31 GMT Subject: RFR: 8319986: Invalid/inconsistent description and example for DateFormat [v4] In-Reply-To: References: Message-ID: On Tue, 14 Nov 2023 19:32:57 GMT, Naoto Sato wrote: >> Correcting the explanation of the `DateFormat.SHORT` constant. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > abbreviated/full clarification Marked as reviewed by lancea (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16645#pullrequestreview-1730811132 From jlu at openjdk.org Tue Nov 14 23:40:38 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 14 Nov 2023 23:40:38 GMT Subject: Integrated: JDK-8319628: DateFormat does not mention IllegalArgumentException for invalid style args In-Reply-To: References: Message-ID: On Sun, 12 Nov 2023 21:39:29 GMT, Justin Lu wrote: > Please review this PR and [CSR](https://bugs.openjdk.org/browse/JDK-8319868) which makes IllegalArgumentExceptions apparent for the _j.text.DateFormat_ static factory methods that have the _style_ parameter. This pull request has now been integrated. Changeset: d5abe496 Author: Justin Lu URL: https://git.openjdk.org/jdk/commit/d5abe49670d81b9c4749ce777ed6bf2886228f2f Stats: 6 lines in 1 file changed: 2 ins; 0 del; 4 mod 8319628: DateFormat does not mention IllegalArgumentException for invalid style args Reviewed-by: naoto ------------- PR: https://git.openjdk.org/jdk/pull/16624 From naoto at openjdk.org Wed Nov 15 18:54:41 2023 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 15 Nov 2023 18:54:41 GMT Subject: Integrated: 8319986: Invalid/inconsistent description and example for DateFormat In-Reply-To: References: Message-ID: On Mon, 13 Nov 2023 23:35:11 GMT, Naoto Sato wrote: > Correcting the explanation of the `DateFormat.SHORT` constant. This pull request has now been integrated. Changeset: 891d8cfa Author: Naoto Sato URL: https://git.openjdk.org/jdk/commit/891d8cfaf2fc0636bfe8f864cd010fb71266d723 Stats: 5 lines in 1 file changed: 2 ins; 0 del; 3 mod 8319986: Invalid/inconsistent description and example for DateFormat Reviewed-by: joehw, rriggs, jlu, iris, lancea ------------- PR: https://git.openjdk.org/jdk/pull/16645 From aturbanov at openjdk.org Thu Nov 16 08:56:09 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Thu, 16 Nov 2023 08:56:09 GMT Subject: RFR: 8316557: Make fields final in 'sun.util' package [v2] In-Reply-To: References: Message-ID: On Mon, 13 Nov 2023 11:40:27 GMT, Per Minborg wrote: >> Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: >> >> 8316557: Make fields final in 'sun.util' package >> >> rename 'firstDay' to 'firstDays' to match 'minDays' naming > > src/java.base/share/classes/sun/util/cldr/CLDRCalendarDataProviderImpl.java line 48: > >> 46: public class CLDRCalendarDataProviderImpl extends CalendarDataProviderImpl { >> 47: >> 48: private static final Map firstDay = new ConcurrentHashMap<>(); > > We might rename these fields to FIRST_DAY etc. Hm. Usually CAPS naming is used only on immutable constants, but here we have mutable field. (See google style guide for example - https://google.github.io/styleguide/javaguide.html#s5.2.4-constant-names). I like old naming approach. > src/java.base/share/classes/sun/util/locale/LocaleObjectCache.java line 102: > >> 100: } >> 101: >> 102: private static class CacheEntry extends SoftReference { > > The class itself might be `final` I think making classes `final` is out of scope of this PR. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15736#discussion_r1395350055 PR Review Comment: https://git.openjdk.org/jdk/pull/15736#discussion_r1395351993 From aturbanov at openjdk.org Thu Nov 16 08:56:05 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Thu, 16 Nov 2023 08:56:05 GMT Subject: RFR: 8316557: Make fields final in 'sun.util' package [v2] In-Reply-To: References: Message-ID: > A few classes in `sun.util` package have non-final fields which could easily be marked `final`. Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8316557: Make fields final in 'sun.util' package rename 'firstDay' to 'firstDays' to match 'minDays' naming ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15736/files - new: https://git.openjdk.org/jdk/pull/15736/files/26d00dcb..5db74105 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15736&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15736&range=00-01 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15736.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15736/head:pull/15736 PR: https://git.openjdk.org/jdk/pull/15736 From naoto at openjdk.org Thu Nov 16 17:11:36 2023 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 16 Nov 2023 17:11:36 GMT Subject: RFR: 8316557: Make fields final in 'sun.util' package [v2] In-Reply-To: References: Message-ID: On Thu, 16 Nov 2023 08:56:05 GMT, Andrey Turbanov wrote: >> A few classes in `sun.util` package have non-final fields which could easily be marked `final`. > > Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: > > 8316557: Make fields final in 'sun.util' package > > rename 'firstDay' to 'firstDays' to match 'minDays' naming Changes requested by naoto (Reviewer). src/java.base/share/classes/sun/util/cldr/CLDRCalendarDataProviderImpl.java line 48: > 46: public class CLDRCalendarDataProviderImpl extends CalendarDataProviderImpl { > 47: > 48: private static final Map firstDays = new ConcurrentHashMap<>(); I don't think this is correct. "First Day" is the first day of the week and should not be plural. ------------- PR Review: https://git.openjdk.org/jdk/pull/15736#pullrequestreview-1734986993 PR Review Comment: https://git.openjdk.org/jdk/pull/15736#discussion_r1396065609 From aturbanov at openjdk.org Thu Nov 16 18:11:48 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Thu, 16 Nov 2023 18:11:48 GMT Subject: RFR: 8316557: Make fields final in 'sun.util' package [v3] In-Reply-To: References: Message-ID: <6BYQo_0wJ_3VbwbNNkRrbyAjXTa1lTKyp8Gbbwhospc=.b98239a4-c940-463b-bdd2-972837123bf9@github.com> > A few classes in `sun.util` package have non-final fields which could easily be marked `final`. Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8316557: Make fields final in 'sun.util' package "First Day" is the first day of the week and should not be plural ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15736/files - new: https://git.openjdk.org/jdk/pull/15736/files/5db74105..2c9b4edc Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15736&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15736&range=01-02 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15736.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15736/head:pull/15736 PR: https://git.openjdk.org/jdk/pull/15736 From jlaskey at openjdk.org Thu Nov 16 19:09:57 2023 From: jlaskey at openjdk.org (Jim Laskey) Date: Thu, 16 Nov 2023 19:09:57 GMT Subject: RFR: JDK-8315457 Implementation of String Templates (Second Preview) [v7] In-Reply-To: References: Message-ID: > Update String Templates for a second preview. With the addition of > > - Expression type and throws are determined from the `process` method of the processor type and not the processor type. > > - Qualified `STR` and `RAW` are treated the same as unqualified `STR` and `RAW` . > > - Raw (generic) process types are no longer an error. Jim Laskey 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 ten additional commits since the last revision: - Merge remote-tracking branch 'upstream/master' into 8315457 - Merge remote-tracking branch 'upstream/master' into 8315457 - Remove preview from JavaLangAccess - Merge remote-tracking branch 'upstream/master' into 8315457 - Cache process method type in JCStringTemplate - Revert source - Revert @since 22 - Accept qualified STR and RAW - String Templates (second preview) ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16202/files - new: https://git.openjdk.org/jdk/pull/16202/files/c616f48e..c798e310 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16202&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16202&range=05-06 Stats: 624014 lines in 1051 files changed: 85405 ins; 477079 del; 61530 mod Patch: https://git.openjdk.org/jdk/pull/16202.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16202/head:pull/16202 PR: https://git.openjdk.org/jdk/pull/16202 From duke at openjdk.org Fri Nov 17 01:56:41 2023 From: duke at openjdk.org (Shaojin Wen) Date: Fri, 17 Nov 2023 01:56:41 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v6] In-Reply-To: References: Message-ID: On Thu, 9 Nov 2023 17:15:02 GMT, Naoto Sato wrote: >> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: >> >> Use minus sign from cached DecimalFormatSymbols and improved testcase > > Looks like your fix causes a regression test failure in test/jdk/java/time/test/java/util/TestFormatter.java > > ----------System.out:(1097/72894)---------- > test test.java.util.TestFormatter.test("en_US"): success > test test.java.util.TestFormatter.test("th_TH"): success > ChronoZonedDateTimeImpl(Japanese) actual: D:[04/19/05] F:[2023-04-19] > FAILED; expected: D:[04/19/05] F:[0005-04-19] > java.lang.RuntimeException > at test.java.util.TestFormatter.test(TestFormatter.java:198) > at test.java.util.TestFormatter.testDate(TestFormatter.java:216) > at test.java.util.TestFormatter.test(TestFormatter.java:114) > at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) > at java.base/java.lang.reflect.Method.invoke(Method.java:580) > at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132) > at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599) > at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174) > at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46) > at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822) > at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147) > at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146) > at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128) > at java.base/java.util.ArrayList.forEach(ArrayList.java:1597) > at org.testng.TestRunner.privateRun(TestRunner.java:764) > at org.testng.TestRunner.run(TestRunner.java:585) > at org.testng.SuiteRunner.runTest(SuiteRunner.java:384) > at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378) > at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337) > at org.testng.SuiteRunner.run(SuiteRunner.java:286) > at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53) > at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96) > at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218) > at org.testng.TestNG.runSuitesLocally(TestNG.java:1140) > at org.testng.TestNG.runSuites(TestNG.java:1069) > at org.testng.TestNG.run(TestNG.java:1037) > at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:102) > at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:58) > at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) > at java.base/java.lang.reflect.Method.invoke(Method.java:580) > at com... @naotoj @RogerRiggs Can it be integrated? ------------- PR Comment: https://git.openjdk.org/jdk/pull/16033#issuecomment-1815623419 From pminborg at openjdk.org Fri Nov 17 08:15:38 2023 From: pminborg at openjdk.org (Per Minborg) Date: Fri, 17 Nov 2023 08:15:38 GMT Subject: RFR: 8316557: Make fields final in 'sun.util' package [v2] In-Reply-To: References: Message-ID: On Thu, 16 Nov 2023 17:08:58 GMT, Naoto Sato wrote: >> Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: >> >> 8316557: Make fields final in 'sun.util' package >> >> rename 'firstDay' to 'firstDays' to match 'minDays' naming > > src/java.base/share/classes/sun/util/cldr/CLDRCalendarDataProviderImpl.java line 48: > >> 46: public class CLDRCalendarDataProviderImpl extends CalendarDataProviderImpl { >> 47: >> 48: private static final Map firstDays = new ConcurrentHashMap<>(); > > I don't think this is correct. "First Day" is the first day of the week and should not be plural. The map contains several entries so I think the plural form is appropriate here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15736#discussion_r1396844057 From aturbanov at openjdk.org Fri Nov 17 08:41:35 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Fri, 17 Nov 2023 08:41:35 GMT Subject: RFR: 8316557: Make fields final in 'sun.util' package [v2] In-Reply-To: References: Message-ID: On Fri, 17 Nov 2023 08:13:05 GMT, Per Minborg wrote: >> src/java.base/share/classes/sun/util/cldr/CLDRCalendarDataProviderImpl.java line 48: >> >>> 46: public class CLDRCalendarDataProviderImpl extends CalendarDataProviderImpl { >>> 47: >>> 48: private static final Map firstDays = new ConcurrentHashMap<>(); >> >> I don't think this is correct. "First Day" is the first day of the week and should not be plural. > > The map contains several entries so I think the plural form is appropriate here. Current naming highlights the difference in values in this maps: `FIRST_DAY_OF_WEEK` vs `MINIMAL_DAYS_IN_FIRST_WEEK`. I like this approach. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15736#discussion_r1396868339 From jlu at openjdk.org Fri Nov 17 09:32:53 2023 From: jlu at openjdk.org (Justin Lu) Date: Fri, 17 Nov 2023 09:32:53 GMT Subject: RFR: JDK-8319569: Several java/util tests should be updated to accept VM flags. Message-ID: Please review this PR which allows these _j.util_ tests to launch new JVM processes with VM flags, This is primarily done using by switching to `ProcessTools::createTestJavaProcessBuilder`. _PropertiesTest.sh_ was updated with `@requires vm.flagless`. ------------- Commit messages: - init Changes: https://git.openjdk.org/jdk/pull/16705/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16705&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8319569 Stats: 183 lines in 12 files changed: 25 ins; 41 del; 117 mod Patch: https://git.openjdk.org/jdk/pull/16705.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16705/head:pull/16705 PR: https://git.openjdk.org/jdk/pull/16705 From jlaskey at openjdk.org Fri Nov 17 12:56:43 2023 From: jlaskey at openjdk.org (Jim Laskey) Date: Fri, 17 Nov 2023 12:56:43 GMT Subject: Integrated: JDK-8315457 Implement JEP 459: String Templates (Second Preview) In-Reply-To: References: Message-ID: On Mon, 16 Oct 2023 13:41:55 GMT, Jim Laskey wrote: > Update String Templates for a second preview. With the addition of > > - Expression type and throws are determined from the `process` method of the processor type and not the processor type. > > - Qualified `STR` and `RAW` are treated the same as unqualified `STR` and `RAW` . > > - Raw (generic) process types are no longer an error. This pull request has now been integrated. Changeset: 9902d2eb Author: Jim Laskey URL: https://git.openjdk.org/jdk/commit/9902d2eb177072c108933056cba544cc5a34bb54 Stats: 69 lines in 16 files changed: 19 ins; 35 del; 15 mod 8315457: Implement JEP 459: String Templates (Second Preview) Reviewed-by: jlahoda, alanb, vromero ------------- PR: https://git.openjdk.org/jdk/pull/16202 From naoto at openjdk.org Fri Nov 17 18:07:32 2023 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 17 Nov 2023 18:07:32 GMT Subject: RFR: 8316557: Make fields final in 'sun.util' package [v2] In-Reply-To: References: Message-ID: On Fri, 17 Nov 2023 08:38:37 GMT, Andrey Turbanov wrote: >> The map contains several entries so I think the plural form is appropriate here. > > Current naming highlights the difference in values in this maps: `FIRST_DAY_OF_WEEK` vs `MINIMAL_DAYS_IN_FIRST_WEEK`. > I like this approach. Maybe `firstDayMap`/`minDaysMap` would clarify more, but either way is fine with me ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15736#discussion_r1397697691 From naoto at openjdk.org Fri Nov 17 19:49:33 2023 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 17 Nov 2023 19:49:33 GMT Subject: RFR: JDK-8319569: Several java/util tests should be updated to accept VM flags. In-Reply-To: References: Message-ID: On Fri, 17 Nov 2023 09:25:40 GMT, Justin Lu wrote: > Please review this PR which allows these _j.util_ tests to launch new JVM processes with VM flags, > > This is primarily done using by switching to `ProcessTools::createTestJavaProcessBuilder`. > > _PropertiesTest.sh_ was updated with `@requires vm.flagless`. test/jdk/java/util/Currency/PropertiesTest.sh line 30: > 28: # @summary tests the capability of replacing the currency data with user > 29: # specified currency properties file > 30: # @requires vm.flagless Does this actually do anything? Since it is a shell script, it does not call any `ProcessBuilder` methods. In fact, the script includes `${TESTVMOPTS}` on launching the test java process correctly. test/jdk/java/util/logging/LoggingDeadlock2.java line 167: > 165: > 166: private static final List javaChildArgs = Arrays.asList( > 167: "-classpath", classpath, "LoggingDeadlock2$JavaChild"); Could use `List.of()` test/jdk/java/util/zip/EntryCount64k.java line 3: > 1: /* > 2: * Copyright (c) 2013 Google Inc. All rights reserved. > 3: * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. Is this OK? The header reads `DO NOT ALTER`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16705#discussion_r1397786626 PR Review Comment: https://git.openjdk.org/jdk/pull/16705#discussion_r1397796561 PR Review Comment: https://git.openjdk.org/jdk/pull/16705#discussion_r1397797865 From jlu at openjdk.org Fri Nov 17 20:20:43 2023 From: jlu at openjdk.org (Justin Lu) Date: Fri, 17 Nov 2023 20:20:43 GMT Subject: RFR: JDK-8319569: Several java/util tests should be updated to accept VM flags. [v2] In-Reply-To: References: Message-ID: <8rH8ig7VH--LUeng8Kxp1tyHaJ09F2clpU22hMkmXJQ=.ccca251a-60cf-49e6-8995-071412195ace@github.com> > Please review this PR which allows these _j.util_ tests to launch new JVM processes with VM flags, > > This is primarily done using by switching to `ProcessTools::createTestJavaProcessBuilder`. > > _PropertiesTest.sh_ was updated with `@requires vm.flagless`. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: reflect review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16705/files - new: https://git.openjdk.org/jdk/pull/16705/files/e6a72c4c..30c735d5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16705&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16705&range=00-01 Stats: 13 lines in 6 files changed: 0 ins; 5 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/16705.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16705/head:pull/16705 PR: https://git.openjdk.org/jdk/pull/16705 From jlu at openjdk.org Fri Nov 17 20:20:47 2023 From: jlu at openjdk.org (Justin Lu) Date: Fri, 17 Nov 2023 20:20:47 GMT Subject: RFR: JDK-8319569: Several java/util tests should be updated to accept VM flags. [v2] In-Reply-To: References: Message-ID: <3eJZlzFtYI1_j5l2ZCccMC-4iXFFBAKZZxRM3SR9YuE=.a5477211-fc86-420c-85b8-750718614b4d@github.com> On Fri, 17 Nov 2023 19:36:21 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional commit since the last revision: >> >> reflect review comments > > test/jdk/java/util/Currency/PropertiesTest.sh line 30: > >> 28: # @summary tests the capability of replacing the currency data with user >> 29: # specified currency properties file >> 30: # @requires vm.flagless > > Does this actually do anything? Since it is a shell script, it does not call any `ProcessBuilder` methods. In fact, the script includes `${TESTVMOPTS}` on launching the test java process correctly. IIUC, using `@requires vm.flagless` simply signifies that any JVMs launched within the test do not support VM flags, (regardless if it was launched from ProcessBuilder). However, it is odd that this test was flagged since it does pass `${TESTVMOPTS}` to `run()` like you stated. Perhaps @lmesnik has further understanding of what to do here? > test/jdk/java/util/logging/LoggingDeadlock2.java line 167: > >> 165: >> 166: private static final List javaChildArgs = Arrays.asList( >> 167: "-classpath", classpath, "LoggingDeadlock2$JavaChild"); > > Could use `List.of()` Fixed here and in other instances. > test/jdk/java/util/zip/EntryCount64k.java line 3: > >> 1: /* >> 2: * Copyright (c) 2013 Google Inc. All rights reserved. >> 3: * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. > > Is this OK? The header reads `DO NOT ALTER`. Yes, I think you're right. I based my decision off https://github.com/openjdk/jdk/pull/15454 But after reading the copyright guidelines, we do not modify third party copyright. It should probably be removed in that test as well. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16705#discussion_r1397843189 PR Review Comment: https://git.openjdk.org/jdk/pull/16705#discussion_r1397843173 PR Review Comment: https://git.openjdk.org/jdk/pull/16705#discussion_r1397843159 From naoto at openjdk.org Fri Nov 17 20:33:32 2023 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 17 Nov 2023 20:33:32 GMT Subject: RFR: 8316557: Make fields final in 'sun.util' package [v3] In-Reply-To: <6BYQo_0wJ_3VbwbNNkRrbyAjXTa1lTKyp8Gbbwhospc=.b98239a4-c940-463b-bdd2-972837123bf9@github.com> References: <6BYQo_0wJ_3VbwbNNkRrbyAjXTa1lTKyp8Gbbwhospc=.b98239a4-c940-463b-bdd2-972837123bf9@github.com> Message-ID: On Thu, 16 Nov 2023 18:11:48 GMT, Andrey Turbanov wrote: >> A few classes in `sun.util` package have non-final fields which could easily be marked `final`. > > Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: > > 8316557: Make fields final in 'sun.util' package > > "First Day" is the first day of the week and should not be plural Marked as reviewed by naoto (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15736#pullrequestreview-1737870814 From naoto at openjdk.org Fri Nov 17 21:17:36 2023 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 17 Nov 2023 21:17:36 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v8] In-Reply-To: References: Message-ID: On Fri, 10 Nov 2023 03:31:26 GMT, Shaojin Wen wrote: >> j.u.Formatter now prints "%tF" (iso standard date) and the result is incorrect when processing year < 0 or year > 9999 > > Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: > > fix format 'ja-JP-u-ca-japanese' ChronoLocalDate I'll take another look at your latest changes and tests. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16033#issuecomment-1817114636 From rriggs at openjdk.org Fri Nov 17 22:19:38 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 17 Nov 2023 22:19:38 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v8] In-Reply-To: References: Message-ID: On Fri, 10 Nov 2023 03:31:26 GMT, Shaojin Wen wrote: >> j.u.Formatter now prints "%tF" (iso standard date) and the result is incorrect when processing year < 0 or year > 9999 > > Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: > > fix format 'ja-JP-u-ca-japanese' ChronoLocalDate src/java.base/share/classes/java/util/Formatter.java line 4507: > 4505: || t instanceof LocalDateTime > 4506: || t instanceof LocalDate) { > 4507: yearField = ChronoField.YEAR; This enumeration of type doesn't seem very principled and may not be correct for an arbitrary Temporal. (But so far, I don't have a better suggestion). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16033#discussion_r1397946102 From naoto at openjdk.org Fri Nov 17 23:01:34 2023 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 17 Nov 2023 23:01:34 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v8] In-Reply-To: References: Message-ID: On Fri, 17 Nov 2023 22:16:36 GMT, Roger Riggs wrote: >> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: >> >> fix format 'ja-JP-u-ca-japanese' ChronoLocalDate > > src/java.base/share/classes/java/util/Formatter.java line 4507: > >> 4505: || t instanceof LocalDateTime >> 4506: || t instanceof LocalDate) { >> 4507: yearField = ChronoField.YEAR; > > This enumeration of type doesn't seem very principled and may not be correct for an arbitrary Temporal. > (But so far, I don't have a better suggestion). Haven't tried, but I think `t.getChronology() instanceof IsoChronology` should work ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16033#discussion_r1397972898 From naoto at openjdk.org Fri Nov 17 23:38:35 2023 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 17 Nov 2023 23:38:35 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v8] In-Reply-To: References: Message-ID: On Fri, 17 Nov 2023 22:58:00 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/util/Formatter.java line 4507: >> >>> 4505: || t instanceof LocalDateTime >>> 4506: || t instanceof LocalDate) { >>> 4507: yearField = ChronoField.YEAR; >> >> This enumeration of type doesn't seem very principled and may not be correct for an arbitrary Temporal. >> (But so far, I don't have a better suggestion). > > Haven't tried, but I think `t.getChronology() instanceof IsoChronology` should work Now I tried and it didn't compile ? It should have been `t.query(TemporalQueries.chronology()) instanceof IsoChronology` ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16033#discussion_r1397992697 From duke at openjdk.org Sat Nov 18 14:13:46 2023 From: duke at openjdk.org (Shaojin Wen) Date: Sat, 18 Nov 2023 14:13:46 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v9] In-Reply-To: References: Message-ID: > j.u.Formatter now prints "%tF" (iso standard date) and the result is incorrect when processing year < 0 or year > 9999 Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: use t.query(TemporalQueries.chronology()) instanceof IsoChronology ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16033/files - new: https://git.openjdk.org/jdk/pull/16033/files/4e518b39..bacb6c2e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16033&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16033&range=07-08 Stats: 8 lines in 1 file changed: 0 ins; 6 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/16033.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16033/head:pull/16033 PR: https://git.openjdk.org/jdk/pull/16033 From rriggs at openjdk.org Sat Nov 18 14:59:33 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Sat, 18 Nov 2023 14:59:33 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v8] In-Reply-To: References: Message-ID: On Fri, 17 Nov 2023 23:35:37 GMT, Naoto Sato wrote: >> Haven't tried, but I think `t.getChronology() instanceof IsoChronology` should work > > Now I tried and it didn't compile ? It should have been `t.query(TemporalQueries.chronology()) instanceof IsoChronology` JapaneseChronology is an IsoChronology so run the test again (before committing) to make sure. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16033#discussion_r1398222416 From duke at openjdk.org Sat Nov 18 17:38:48 2023 From: duke at openjdk.org (Shaojin Wen) Date: Sat, 18 Nov 2023 17:38:48 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v10] In-Reply-To: References: Message-ID: > j.u.Formatter now prints "%tF" (iso standard date) and the result is incorrect when processing year < 0 or year > 9999 Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: add JapaneseChronology testcase ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16033/files - new: https://git.openjdk.org/jdk/pull/16033/files/bacb6c2e..0fa1f882 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16033&range=09 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16033&range=08-09 Stats: 10 lines in 1 file changed: 10 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16033.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16033/head:pull/16033 PR: https://git.openjdk.org/jdk/pull/16033 From naoto at openjdk.org Sun Nov 19 01:54:36 2023 From: naoto at openjdk.org (Naoto Sato) Date: Sun, 19 Nov 2023 01:54:36 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v8] In-Reply-To: References: Message-ID: On Sat, 18 Nov 2023 14:56:47 GMT, Roger Riggs wrote: >> Now I tried and it didn't compile ? It should have been `t.query(TemporalQueries.chronology()) instanceof IsoChronology` > > JapaneseChronology is an IsoChronology so run the test again (before committing) to make sure. `JapaneseChronology` is not extending `IsoChronology`, and that is the gist of the change I suggested. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16033#discussion_r1398306647 From duke at openjdk.org Sun Nov 19 02:22:37 2023 From: duke at openjdk.org (Shaojin Wen) Date: Sun, 19 Nov 2023 02:22:37 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v8] In-Reply-To: References: Message-ID: On Sun, 19 Nov 2023 01:52:13 GMT, Naoto Sato wrote: >> JapaneseChronology is an IsoChronology so run the test again (before committing) to make sure. > > `JapaneseChronology` is not extending `IsoChronology`, and that is the gist of the change I suggested. I added the testcase of IsoChronology and it also passed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16033#discussion_r1398309517 From rriggs at openjdk.org Mon Nov 20 03:24:39 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 20 Nov 2023 03:24:39 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v8] In-Reply-To: References: Message-ID: On Sun, 19 Nov 2023 02:19:52 GMT, Shaojin Wen wrote: >> `JapaneseChronology` is not extending `IsoChronology`, and that is the gist of the change I suggested. > > I added the testcase of IsoChronology and it also passed. The distinction is pretty subtle, I was referring to the `Chronology.isISOBased()` method. (True for JapaneseChronology). IsoChronology is final, so there are no subclasses. This does address the compatibility issue and is an improvement over the original proposal. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16033#discussion_r1398626377 From aturbanov at openjdk.org Mon Nov 20 09:44:43 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Mon, 20 Nov 2023 09:44:43 GMT Subject: Integrated: 8316557: Make fields final in 'sun.util' package In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 08:58:56 GMT, Andrey Turbanov wrote: > A few classes in `sun.util` package have non-final fields which could easily be marked `final`. This pull request has now been integrated. Changeset: 6c5e15c1 Author: Andrey Turbanov URL: https://git.openjdk.org/jdk/commit/6c5e15c1a291ca5ba1e4c3a90351bc71665ce988 Stats: 42 lines in 10 files changed: 2 ins; 13 del; 27 mod 8316557: Make fields final in 'sun.util' package Reviewed-by: pminborg, naoto ------------- PR: https://git.openjdk.org/jdk/pull/15736 From dfuchs at openjdk.org Mon Nov 20 15:30:26 2023 From: dfuchs at openjdk.org (Daniel Fuchs) Date: Mon, 20 Nov 2023 15:30:26 GMT Subject: RFR: JDK-8319569: Several java/util tests should be updated to accept VM flags [v2] In-Reply-To: <8rH8ig7VH--LUeng8Kxp1tyHaJ09F2clpU22hMkmXJQ=.ccca251a-60cf-49e6-8995-071412195ace@github.com> References: <8rH8ig7VH--LUeng8Kxp1tyHaJ09F2clpU22hMkmXJQ=.ccca251a-60cf-49e6-8995-071412195ace@github.com> Message-ID: On Fri, 17 Nov 2023 20:20:43 GMT, Justin Lu wrote: >> Please review this PR which allows these _j.util_ tests to launch new JVM processes with VM flags, >> >> This is primarily done using by switching to `ProcessTools::createTestJavaProcessBuilder`. >> >> _PropertiesTest.sh_ was updated with `@requires vm.flagless`. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > reflect review comments Changes to the logging tests LGTM. Thanks for the update @justin-curtis-lu . ------------- PR Comment: https://git.openjdk.org/jdk/pull/16705#issuecomment-1819284286 From naoto at openjdk.org Mon Nov 20 18:24:45 2023 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 20 Nov 2023 18:24:45 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v10] In-Reply-To: References: Message-ID: On Sat, 18 Nov 2023 17:38:48 GMT, Shaojin Wen wrote: >> j.u.Formatter now prints "%tF" (iso standard date) and the result is incorrect when processing year < 0 or year > 9999 > > Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: > > add JapaneseChronology testcase Looks good. Thanks for fixing the issue. Please change the copyright year from 2022 to 2023 in the test before integrating. ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16033#pullrequestreview-1740431565 From jlu at openjdk.org Mon Nov 20 19:15:18 2023 From: jlu at openjdk.org (Justin Lu) Date: Mon, 20 Nov 2023 19:15:18 GMT Subject: RFR: JDK-8319569: Several java/util tests should be updated to accept VM flags [v3] In-Reply-To: References: Message-ID: > Please review this PR which allows these _j.util_ tests to launch new JVM processes with VM flags, > > This is primarily done using by switching to `ProcessTools::createTestJavaProcessBuilder`. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Pass test.java.opts to PropertiesTest.sh ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16705/files - new: https://git.openjdk.org/jdk/pull/16705/files/30c735d5..cb144025 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16705&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16705&range=01-02 Stats: 6 lines in 1 file changed: 0 ins; 1 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/16705.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16705/head:pull/16705 PR: https://git.openjdk.org/jdk/pull/16705 From jlu at openjdk.org Mon Nov 20 19:15:21 2023 From: jlu at openjdk.org (Justin Lu) Date: Mon, 20 Nov 2023 19:15:21 GMT Subject: RFR: JDK-8319569: Several java/util tests should be updated to accept VM flags [v3] In-Reply-To: <3eJZlzFtYI1_j5l2ZCccMC-4iXFFBAKZZxRM3SR9YuE=.a5477211-fc86-420c-85b8-750718614b4d@github.com> References: <3eJZlzFtYI1_j5l2ZCccMC-4iXFFBAKZZxRM3SR9YuE=.a5477211-fc86-420c-85b8-750718614b4d@github.com> Message-ID: On Fri, 17 Nov 2023 20:17:28 GMT, Justin Lu wrote: >> test/jdk/java/util/Currency/PropertiesTest.sh line 30: >> >>> 28: # @summary tests the capability of replacing the currency data with user >>> 29: # specified currency properties file >>> 30: # @requires vm.flagless >> >> Does this actually do anything? Since it is a shell script, it does not call any `ProcessBuilder` methods. In fact, the script includes `${TESTVMOPTS}` on launching the test java process correctly. > > IIUC, using `@requires vm.flagless` simply signifies that any JVMs launched within the test do not support VM flags, (regardless if it was launched from ProcessBuilder). > > However, it is odd that this test was flagged since it does pass `${TESTVMOPTS}` to `run()` like you stated. > > Perhaps @lmesnik has further understanding of what to do here? _PropertiesTest.sh_ needs to pass both test.vm.opts **and** test.java.opts. Added `${TESTJAVAOPTS}` and unmarked as `@requires vm.flagless` ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16705#discussion_r1399629617 From duke at openjdk.org Mon Nov 20 20:07:25 2023 From: duke at openjdk.org (Shaojin Wen) Date: Mon, 20 Nov 2023 20:07:25 GMT Subject: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v11] In-Reply-To: References: Message-ID: > j.u.Formatter now prints "%tF" (iso standard date) and the result is incorrect when processing year < 0 or year > 9999 Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: update copyright ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16033/files - new: https://git.openjdk.org/jdk/pull/16033/files/0fa1f882..fec8f5e8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16033&range=10 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16033&range=09-10 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16033.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16033/head:pull/16033 PR: https://git.openjdk.org/jdk/pull/16033 From naoto at openjdk.org Mon Nov 20 22:43:08 2023 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 20 Nov 2023 22:43:08 GMT Subject: RFR: JDK-8319569: Several java/util tests should be updated to accept VM flags [v3] In-Reply-To: References: Message-ID: <-6v0PdQaHcIUYQS_usNrlAkFyUcW6mzyIakiGBGthk8=.ddeeb5ab-44bc-42cc-bd60-23337bf2b307@github.com> On Mon, 20 Nov 2023 19:15:18 GMT, Justin Lu wrote: >> Please review this PR which allows these _j.util_ tests to launch new JVM processes with VM flags, >> >> This is primarily done using by switching to `ProcessTools::createTestJavaProcessBuilder`. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Pass test.java.opts to PropertiesTest.sh LGTM. It is out of this fix's scope, but `PropertiesTest.sh` may better be converted into a Java test case. ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16705#pullrequestreview-1740822747 From duke at openjdk.org Tue Nov 21 17:03:24 2023 From: duke at openjdk.org (Shaojin Wen) Date: Tue, 21 Nov 2023 17:03:24 GMT Subject: Integrated: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format In-Reply-To: References: Message-ID: On Tue, 3 Oct 2023 21:37:46 GMT, Shaojin Wen wrote: > j.u.Formatter now prints "%tF" (iso standard date) and the result is incorrect when processing year < 0 or year > 9999 This pull request has now been integrated. Changeset: 61d81d64 Author: Shaojin Wen Committer: Naoto Sato URL: https://git.openjdk.org/jdk/commit/61d81d6496a38e43a6039abc041b67626f06f5c9 Stats: 83 lines in 2 files changed: 81 ins; 0 del; 2 mod 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format Reviewed-by: rriggs, naoto ------------- PR: https://git.openjdk.org/jdk/pull/16033 From lancea at openjdk.org Tue Nov 21 19:53:07 2023 From: lancea at openjdk.org (Lance Andersen) Date: Tue, 21 Nov 2023 19:53:07 GMT Subject: RFR: JDK-8319569: Several java/util tests should be updated to accept VM flags [v3] In-Reply-To: References: Message-ID: On Mon, 20 Nov 2023 19:15:18 GMT, Justin Lu wrote: >> Please review this PR which allows these _j.util_ tests to launch new JVM processes with VM flags, >> >> This is primarily done using by switching to `ProcessTools::createTestJavaProcessBuilder`. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Pass test.java.opts to PropertiesTest.sh Marked as reviewed by lancea (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16705#pullrequestreview-1742959505 From jlu at openjdk.org Thu Nov 23 00:30:16 2023 From: jlu at openjdk.org (Justin Lu) Date: Thu, 23 Nov 2023 00:30:16 GMT Subject: Integrated: JDK-8319569: Several java/util tests should be updated to accept VM flags In-Reply-To: References: Message-ID: On Fri, 17 Nov 2023 09:25:40 GMT, Justin Lu wrote: > Please review this PR which allows these _j.util_ tests to launch new JVM processes with VM flags, > > This is primarily done using by switching to `ProcessTools::createTestJavaProcessBuilder`. This pull request has now been integrated. Changeset: 2bb4b939 Author: Justin Lu URL: https://git.openjdk.org/jdk/commit/2bb4b9398d65e3f37f34e45476c969ff0afb1540 Stats: 185 lines in 12 files changed: 20 ins; 42 del; 123 mod 8319569: Several java/util tests should be updated to accept VM flags Reviewed-by: naoto, lancea ------------- PR: https://git.openjdk.org/jdk/pull/16705 From jlu at openjdk.org Thu Nov 23 00:36:36 2023 From: jlu at openjdk.org (Justin Lu) Date: Thu, 23 Nov 2023 00:36:36 GMT Subject: RFR: JDK-8210410: Refactor java.util.Currency:i18n shell tests to plain java tests Message-ID: Please review this PR which converts the shell test, _java/util/currency/PropertiesTest.sh_ to a normal java test. This test is a test runner that launches test methods from _PropertiesTest.java_. It tests both the ways to supersede the default currencies, that is, either using a custom properties file under the lib directory, or setting the path to a custom properties file via the system property. In addition to the conversion, I have updated the test so that the `PropertiesTest` methods are ran by both the default test JDK and the newly created writable JDK, not just the writable JDK. ------------- Commit messages: - resolve conflicts - init Changes: https://git.openjdk.org/jdk/pull/16787/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16787&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8210410 Stats: 303 lines in 2 files changed: 159 ins; 144 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16787/head:pull/16787 PR: https://git.openjdk.org/jdk/pull/16787 From jlu at openjdk.org Mon Nov 27 19:43:12 2023 From: jlu at openjdk.org (Justin Lu) Date: Mon, 27 Nov 2023 19:43:12 GMT Subject: RFR: JDK-8320714: java/util/Locale/LocaleProvidersRun.java and java/util/ResourceBundle/modules/visibility/VisibilityTest.java timeout after passing Message-ID: Please review this PR which fixes timeouts for the two tests: _java/util/Locale/LocaleProvidersRun.java_ and _java/util/ResourceBundle/modules/visibility/VisibilityTest.java_. These tests were updated to accept VM flags in [JDK-8319569](https://bugs.openjdk.org/browse/JDK-8319569), which is now causing timeouts in tiers 6 and 8. One set of VM flags causes _VisibilityTest.java_ to timeout with a duration of over 2 hours in tier6. Both have been updated to run without VM flags and marked as `vm.flagless`. ------------- Commit messages: - init Changes: https://git.openjdk.org/jdk/pull/16831/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16831&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8320714 Stats: 4 lines in 2 files changed: 2 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/16831.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16831/head:pull/16831 PR: https://git.openjdk.org/jdk/pull/16831 From naoto at openjdk.org Mon Nov 27 20:35:04 2023 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 27 Nov 2023 20:35:04 GMT Subject: RFR: JDK-8320714: java/util/Locale/LocaleProvidersRun.java and java/util/ResourceBundle/modules/visibility/VisibilityTest.java timeout after passing In-Reply-To: References: Message-ID: <6ikNc3VJOr7vqied3hhob7LEfZ6Sz1A_Csiqjr0fT_E=.7b69daed-f970-4b6d-aadd-8f77b699c38f@github.com> On Mon, 27 Nov 2023 19:32:04 GMT, Justin Lu wrote: > Please review this PR which fixes timeouts for the two tests: _java/util/Locale/LocaleProvidersRun.java_ and _java/util/ResourceBundle/modules/visibility/VisibilityTest.java_. > > These tests were updated to accept VM flags in [JDK-8319569](https://bugs.openjdk.org/browse/JDK-8319569), which is now causing timeouts in tiers 6 and 8. One set of VM flags causes _VisibilityTest.java_ to timeout with a duration of over 2 hours in tier6. > > Both have been updated to run without VM flags and marked as `vm.flagless`. Marked as reviewed by naoto (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16831#pullrequestreview-1751305525 From bpb at openjdk.org Mon Nov 27 21:06:06 2023 From: bpb at openjdk.org (Brian Burkhalter) Date: Mon, 27 Nov 2023 21:06:06 GMT Subject: RFR: JDK-8320714: java/util/Locale/LocaleProvidersRun.java and java/util/ResourceBundle/modules/visibility/VisibilityTest.java timeout after passing In-Reply-To: References: Message-ID: On Mon, 27 Nov 2023 19:32:04 GMT, Justin Lu wrote: > Please review this PR which fixes timeouts for the two tests: _java/util/Locale/LocaleProvidersRun.java_ and _java/util/ResourceBundle/modules/visibility/VisibilityTest.java_. > > These tests were updated to accept VM flags in [JDK-8319569](https://bugs.openjdk.org/browse/JDK-8319569), which is now causing timeouts in tiers 6 and 8. One set of VM flags causes _VisibilityTest.java_ to timeout with a duration of over 2 hours in tier6. > > Both have been updated to run without VM flags and marked as `vm.flagless`. Marked as reviewed by bpb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16831#pullrequestreview-1751354324 From jlu at openjdk.org Mon Nov 27 21:12:17 2023 From: jlu at openjdk.org (Justin Lu) Date: Mon, 27 Nov 2023 21:12:17 GMT Subject: RFR: JDK-8320714: java/util/Locale/LocaleProvidersRun.java and java/util/ResourceBundle/modules/visibility/VisibilityTest.java timeout after passing [v2] In-Reply-To: References: Message-ID: > Please review this PR which fixes timeouts for the two tests: _java/util/Locale/LocaleProvidersRun.java_ and _java/util/ResourceBundle/modules/visibility/VisibilityTest.java_. > > These tests were updated to accept VM flags in [JDK-8319569](https://bugs.openjdk.org/browse/JDK-8319569), which is now causing timeouts in tiers 6 and 8. One set of VM flags causes _VisibilityTest.java_ to timeout with a duration of over 2 hours in tier6. > > Both have been updated to run without VM flags and marked as `vm.flagless`. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: clarify comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16831/files - new: https://git.openjdk.org/jdk/pull/16831/files/f58cb4b5..5ecf4285 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16831&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16831&range=00-01 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/16831.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16831/head:pull/16831 PR: https://git.openjdk.org/jdk/pull/16831 From lancea at openjdk.org Mon Nov 27 21:18:05 2023 From: lancea at openjdk.org (Lance Andersen) Date: Mon, 27 Nov 2023 21:18:05 GMT Subject: RFR: JDK-8320714: java/util/Locale/LocaleProvidersRun.java and java/util/ResourceBundle/modules/visibility/VisibilityTest.java timeout after passing [v2] In-Reply-To: References: Message-ID: <0zq6gbSlNZVhlzQtB5zZiigwQOjINBw-ywMtRoHMsGY=.5e219f63-65c4-4467-b8f8-5e4a9b7540a1@github.com> On Mon, 27 Nov 2023 21:12:17 GMT, Justin Lu wrote: >> Please review this PR which fixes timeouts for the two tests: _java/util/Locale/LocaleProvidersRun.java_ and _java/util/ResourceBundle/modules/visibility/VisibilityTest.java_. >> >> These tests were updated to accept VM flags in [JDK-8319569](https://bugs.openjdk.org/browse/JDK-8319569), which is now causing timeouts in tiers 6 and 8. One set of VM flags causes _VisibilityTest.java_ to timeout with a duration of over 2 hours in tier6. >> >> Both have been updated to run without VM flags and marked as `vm.flagless`. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > clarify comments Marked as reviewed by lancea (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16831#pullrequestreview-1751388560 From ihse at openjdk.org Tue Nov 28 17:07:20 2023 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Tue, 28 Nov 2023 17:07:20 GMT Subject: RFR: 8320915: Update copyright year in build files Message-ID: <-4RrV3-LPfsh3BT-qwj3WtF1szg-_6Tt3RxnysPpNeo=.f2b0fee1-7d0c-4c43-bc4f-39ad9fec1150@github.com> Over the year, even though we have tried to be diligent, there have been commits that modify files without updating the copyright year. Here is a mass update of the copyright years in the build system (`make/**`, `.github/**`). Feel free to verify that these files have indeed been modified in 2023 :-), or trust my tools + manual verification. Also, as far as I (and my tools) can tell, this is the only files modified in 2023 that have not had their header updated. ------------- Commit messages: - 8320915: Update copyright year in build files Changes: https://git.openjdk.org/jdk/pull/16858/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16858&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8320915 Stats: 69 lines in 69 files changed: 0 ins; 0 del; 69 mod Patch: https://git.openjdk.org/jdk/pull/16858.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16858/head:pull/16858 PR: https://git.openjdk.org/jdk/pull/16858 From jlu at openjdk.org Tue Nov 28 17:26:13 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 28 Nov 2023 17:26:13 GMT Subject: Integrated: JDK-8320714: java/util/Locale/LocaleProvidersRun.java and java/util/ResourceBundle/modules/visibility/VisibilityTest.java timeout after passing In-Reply-To: References: Message-ID: On Mon, 27 Nov 2023 19:32:04 GMT, Justin Lu wrote: > Please review this PR which fixes timeouts for the two tests: _java/util/Locale/LocaleProvidersRun.java_ and _java/util/ResourceBundle/modules/visibility/VisibilityTest.java_. > > These tests were updated to accept VM flags in [JDK-8319569](https://bugs.openjdk.org/browse/JDK-8319569), which is now causing timeouts in tiers 6 and 8. One set of VM flags causes _VisibilityTest.java_ to timeout with a duration of over 2 hours in tier6. > > Both have been updated to run without VM flags and marked as `vm.flagless`. This pull request has now been integrated. Changeset: 69c0b243 Author: Justin Lu URL: https://git.openjdk.org/jdk/commit/69c0b24386d0bcf2f2d623ccef0192a54753f916 Stats: 6 lines in 2 files changed: 2 ins; 0 del; 4 mod 8320714: java/util/Locale/LocaleProvidersRun.java and java/util/ResourceBundle/modules/visibility/VisibilityTest.java timeout after passing Reviewed-by: naoto, bpb, lancea ------------- PR: https://git.openjdk.org/jdk/pull/16831 From jlu at openjdk.org Tue Nov 28 18:28:37 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 28 Nov 2023 18:28:37 GMT Subject: RFR: JDK-8210410: Refactor java.util.Currency:i18n shell tests to plain java tests [v2] In-Reply-To: References: Message-ID: > Please review this PR which converts the shell test, _java/util/currency/PropertiesTest.sh_ to a normal java test. > > This test is a test runner that launches test methods from _PropertiesTest.java_. It tests both the ways to supersede the default currencies, that is, either using a custom properties file under the lib directory, or setting the path to a custom properties file via the system property. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: cleanup + naming ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16787/files - new: https://git.openjdk.org/jdk/pull/16787/files/780c6fd1..efc6da98 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16787&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16787&range=00-01 Stats: 40 lines in 1 file changed: 8 ins; 10 del; 22 mod Patch: https://git.openjdk.org/jdk/pull/16787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16787/head:pull/16787 PR: https://git.openjdk.org/jdk/pull/16787 From naoto at openjdk.org Tue Nov 28 20:43:06 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 28 Nov 2023 20:43:06 GMT Subject: RFR: JDK-8210410: Refactor java.util.Currency:i18n shell tests to plain java tests [v2] In-Reply-To: References: Message-ID: On Tue, 28 Nov 2023 18:28:37 GMT, Justin Lu wrote: >> Please review this PR which converts the shell test, _java/util/currency/PropertiesTest.sh_ to a normal java test. >> >> This test is a test runner that launches test methods from _PropertiesTest.java_. It tests both the ways to supersede the default currencies, that is, either using a custom properties file under the lib directory, or setting the path to a custom properties file via the system property. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > cleanup + naming Looks good. Please retain the original copyright year (2007) with the refactored launcher file. ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16787#pullrequestreview-1753893945 From jlu at openjdk.org Tue Nov 28 20:52:25 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 28 Nov 2023 20:52:25 GMT Subject: RFR: JDK-8210410: Refactor java.util.Currency:i18n shell tests to plain java tests [v3] In-Reply-To: References: Message-ID: > Please review this PR which converts the shell test, _java/util/currency/PropertiesTest.sh_ to a normal java test. > > This test is a test runner that launches test methods from _PropertiesTest.java_. It tests both the ways to supersede the default currencies, that is, either using a custom properties file under the lib directory, or setting the path to a custom properties file via the system property. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: retain original copyright year ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16787/files - new: https://git.openjdk.org/jdk/pull/16787/files/efc6da98..105a6755 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16787&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16787&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16787/head:pull/16787 PR: https://git.openjdk.org/jdk/pull/16787 From lancea at openjdk.org Tue Nov 28 20:52:25 2023 From: lancea at openjdk.org (Lance Andersen) Date: Tue, 28 Nov 2023 20:52:25 GMT Subject: RFR: JDK-8210410: Refactor java.util.Currency:i18n shell tests to plain java tests [v3] In-Reply-To: References: Message-ID: On Tue, 28 Nov 2023 20:49:38 GMT, Justin Lu wrote: >> Please review this PR which converts the shell test, _java/util/currency/PropertiesTest.sh_ to a normal java test. >> >> This test is a test runner that launches test methods from _PropertiesTest.java_. It tests both the ways to supersede the default currencies, that is, either using a custom properties file under the lib directory, or setting the path to a custom properties file via the system property. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > retain original copyright year Marked as reviewed by lancea (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16787#pullrequestreview-1753905849 From jlu at openjdk.org Wed Nov 29 19:14:20 2023 From: jlu at openjdk.org (Justin Lu) Date: Wed, 29 Nov 2023 19:14:20 GMT Subject: Integrated: JDK-8210410: Refactor java.util.Currency:i18n shell tests to plain java tests In-Reply-To: References: Message-ID: On Thu, 23 Nov 2023 00:26:43 GMT, Justin Lu wrote: > Please review this PR which converts the shell test, _java/util/currency/PropertiesTest.sh_ to a normal java test. > > This test is a test runner that launches test methods from _PropertiesTest.java_. It tests both the ways to supersede the default currencies, that is, either using a custom properties file under the lib directory, or setting the path to a custom properties file via the system property. This pull request has now been integrated. Changeset: 2584bf87 Author: Justin Lu URL: https://git.openjdk.org/jdk/commit/2584bf87aef66744a8e586805735cded0d2f98f1 Stats: 301 lines in 2 files changed: 157 ins; 144 del; 0 mod 8210410: Refactor java.util.Currency:i18n shell tests to plain java tests Reviewed-by: naoto, lancea ------------- PR: https://git.openjdk.org/jdk/pull/16787 From jlu at openjdk.org Wed Nov 29 22:47:21 2023 From: jlu at openjdk.org (Justin Lu) Date: Wed, 29 Nov 2023 22:47:21 GMT Subject: RFR: 6230751: [Fmt-Ch] Recursive MessageFormats in ChoiceFormats ignore indicated subformats Message-ID: <7wIjtUukVVmPac0CLynJTK8zIx7Difi9122zthoFj_w=.8e65ff5d-816b-4383-b833-0df272efaede@github.com> Please review this PR which updates an incorrect code example in _java/text/ChoiceFormat_. ChoiceFormat (and MessageFormat) provide an example of how to produce a pattern that supports singular and plural forms. The ChoiceFormat example is incorrect, as recursive MessageFormats produced by a ChoiceFormat subformat only recognize subformats defined through the MessageFormat pattern syntax, not through the subformats contained within the top level MessageFormat. In the original example, `Format[] testFormats = {fileform, null, NumberFormat.getInstance()};` could have been replaced with `Format[] testFormats = {fileform, null, new ChoiceFormat("0#BROKEN")};` and the original output would have been the same. This PR replaces the example with the one used in MessageFormat, which is correct. This PR also includes a drive-by fix to remove leftover `
            `s from a previous `@snippet` conversion. ------------- Commit messages: - change var name in trailing example - replace '.' with ':' - init Changes: https://git.openjdk.org/jdk/pull/16891/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16891&range=00 Issue: https://bugs.openjdk.org/browse/JDK-6230751 Stats: 55 lines in 2 files changed: 1 ins; 29 del; 25 mod Patch: https://git.openjdk.org/jdk/pull/16891.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16891/head:pull/16891 PR: https://git.openjdk.org/jdk/pull/16891 From naoto at openjdk.org Wed Nov 29 23:37:03 2023 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 29 Nov 2023 23:37:03 GMT Subject: RFR: 6230751: [Fmt-Ch] Recursive MessageFormats in ChoiceFormats ignore indicated subformats In-Reply-To: <7wIjtUukVVmPac0CLynJTK8zIx7Difi9122zthoFj_w=.8e65ff5d-816b-4383-b833-0df272efaede@github.com> References: <7wIjtUukVVmPac0CLynJTK8zIx7Difi9122zthoFj_w=.8e65ff5d-816b-4383-b833-0df272efaede@github.com> Message-ID: On Wed, 29 Nov 2023 22:41:26 GMT, Justin Lu wrote: > Please review this PR which updates an incorrect code example in _java/text/ChoiceFormat_. > > ChoiceFormat (and MessageFormat) provide an example of how to produce a pattern that supports singular and plural forms. The ChoiceFormat example is incorrect, as recursive MessageFormats produced by a ChoiceFormat subformat only recognize subformats defined through the MessageFormat pattern syntax, not through the subformats contained within the top level MessageFormat. > > In the original example, > `Format[] testFormats = {fileform, null, NumberFormat.getInstance()};` could have been replaced with > `Format[] testFormats = {fileform, null, new ChoiceFormat("0#BROKEN")};` and the original output would have been the same. > > This PR replaces the example with the one used in MessageFormat, which is correct. > > This PR also includes a drive-by fix to remove leftover `
            `s from a previous `@snippet` conversion. Do you think it would be helpful if we describe that limitation so that such confusion will not arise? ------------- PR Review: https://git.openjdk.org/jdk/pull/16891#pullrequestreview-1756397913 From jlu at openjdk.org Thu Nov 30 00:23:04 2023 From: jlu at openjdk.org (Justin Lu) Date: Thu, 30 Nov 2023 00:23:04 GMT Subject: RFR: 6230751: [Fmt-Ch] Recursive MessageFormats in ChoiceFormats ignore indicated subformats In-Reply-To: References: <7wIjtUukVVmPac0CLynJTK8zIx7Difi9122zthoFj_w=.8e65ff5d-816b-4383-b833-0df272efaede@github.com> Message-ID: On Wed, 29 Nov 2023 23:34:14 GMT, Naoto Sato wrote: > Do you think it would be helpful if we describe that limitation so that such confusion will not arise? Yes, that's a good point. I didn't initially include one because I wanted to look into [JDK-4270867](https://bugs.openjdk.org/browse/JDK-4270867) (which would be the fix to the limitation) first. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16891#issuecomment-1832905952 From naoto at openjdk.org Thu Nov 30 20:52:10 2023 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 30 Nov 2023 20:52:10 GMT Subject: RFR: 8321059: Unneeded array assignments in MergeCollation and CompactByteArray Message-ID: Removing the unnecessary array assignments. ------------- Commit messages: - initial commit Changes: https://git.openjdk.org/jdk/pull/16912/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16912&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8321059 Stats: 8 lines in 2 files changed: 2 ins; 3 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/16912.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16912/head:pull/16912 PR: https://git.openjdk.org/jdk/pull/16912 From jlu at openjdk.org Thu Nov 30 21:13:06 2023 From: jlu at openjdk.org (Justin Lu) Date: Thu, 30 Nov 2023 21:13:06 GMT Subject: RFR: 8321059: Unneeded array assignments in MergeCollation and CompactByteArray In-Reply-To: References: Message-ID: On Thu, 30 Nov 2023 20:46:12 GMT, Naoto Sato wrote: > Removing the unnecessary array assignments. Looks good ------------- Marked as reviewed by jlu (Committer). PR Review: https://git.openjdk.org/jdk/pull/16912#pullrequestreview-1758458649 From bpb at openjdk.org Thu Nov 30 21:21:12 2023 From: bpb at openjdk.org (Brian Burkhalter) Date: Thu, 30 Nov 2023 21:21:12 GMT Subject: RFR: 8321059: Unneeded array assignments in MergeCollation and CompactByteArray In-Reply-To: References: Message-ID: On Thu, 30 Nov 2023 20:46:12 GMT, Naoto Sato wrote: > Removing the unnecessary array assignments. Looks fine. Is that "XXX" reminder at line 58 in MergeCollation still pertinent or could it be removed? ------------- Marked as reviewed by bpb (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16912#pullrequestreview-1758469599 From duke at openjdk.org Thu Nov 30 21:29:05 2023 From: duke at openjdk.org (Brett Okken) Date: Thu, 30 Nov 2023 21:29:05 GMT Subject: RFR: 8321059: Unneeded array assignments in MergeCollation and CompactByteArray In-Reply-To: References: Message-ID: <6Umy3nxhMKROX_8fgY7AqGqBkvX3EhRBF9tBo6L8BKE=.feac8b48-bc7f-41e9-b6b5-37111e8edbd8@github.com> On Thu, 30 Nov 2023 20:46:12 GMT, Naoto Sato wrote: > Removing the unnecessary array assignments. src/java.base/share/classes/sun/text/CompactByteArray.java line 83: > 81: for (i = 0; i < UNICODECOUNT; ++i) { > 82: values[i] = defaultValue; > 83: } should this be `Arrays.fill(values, defaultValue);` ? https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Arrays.html#fill(byte%5B%5D,byte) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16912#discussion_r1411279673 From naoto at openjdk.org Thu Nov 30 21:51:19 2023 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 30 Nov 2023 21:51:19 GMT Subject: RFR: 8321059: Unneeded array assignments in MergeCollation and CompactByteArray [v2] In-Reply-To: References: Message-ID: > Removing the unnecessary array assignments. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Use Arrays.fill() ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16912/files - new: https://git.openjdk.org/jdk/pull/16912/files/4fd6e61b..b1708ddb Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16912&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16912&range=00-01 Stats: 5 lines in 1 file changed: 2 ins; 2 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16912.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16912/head:pull/16912 PR: https://git.openjdk.org/jdk/pull/16912 From naoto at openjdk.org Thu Nov 30 21:51:21 2023 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 30 Nov 2023 21:51:21 GMT Subject: RFR: 8321059: Unneeded array assignments in MergeCollation and CompactByteArray [v2] In-Reply-To: References: Message-ID: On Thu, 30 Nov 2023 21:17:57 GMT, Brian Burkhalter wrote: > Is that "XXX" reminder at line 58 in MergeCollation still pertinent or could it be removed? Maybe, but not 100% sure, so I just left it. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16912#issuecomment-1834615018 From naoto at openjdk.org Thu Nov 30 21:51:23 2023 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 30 Nov 2023 21:51:23 GMT Subject: RFR: 8321059: Unneeded array assignments in MergeCollation and CompactByteArray [v2] In-Reply-To: <6Umy3nxhMKROX_8fgY7AqGqBkvX3EhRBF9tBo6L8BKE=.feac8b48-bc7f-41e9-b6b5-37111e8edbd8@github.com> References: <6Umy3nxhMKROX_8fgY7AqGqBkvX3EhRBF9tBo6L8BKE=.feac8b48-bc7f-41e9-b6b5-37111e8edbd8@github.com> Message-ID: On Thu, 30 Nov 2023 21:26:20 GMT, Brett Okken wrote: >> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: >> >> Use Arrays.fill() > > src/java.base/share/classes/sun/text/CompactByteArray.java line 83: > >> 81: for (i = 0; i < UNICODECOUNT; ++i) { >> 82: values[i] = defaultValue; >> 83: } > > should this be `Arrays.fill(values, defaultValue);` ? > > https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Arrays.html#fill(byte%5B%5D,byte) Thanks. Modernized. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16912#discussion_r1411299519 From bpb at openjdk.org Thu Nov 30 22:12:06 2023 From: bpb at openjdk.org (Brian Burkhalter) Date: Thu, 30 Nov 2023 22:12:06 GMT Subject: RFR: 8321059: Unneeded array assignments in MergeCollation and CompactByteArray [v2] In-Reply-To: References: Message-ID: <93i4ohpMOEB7bUtMijikxjOKBB2DVRP9Z_rRyFh4YPI=.7077f21c-86a6-488d-87aa-f35d8b00e64b@github.com> On Thu, 30 Nov 2023 21:51:19 GMT, Naoto Sato wrote: >> Removing the unnecessary array assignments. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > Use Arrays.fill() Marked as reviewed by bpb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16912#pullrequestreview-1758547239 From bpb at openjdk.org Thu Nov 30 22:12:08 2023 From: bpb at openjdk.org (Brian Burkhalter) Date: Thu, 30 Nov 2023 22:12:08 GMT Subject: RFR: 8321059: Unneeded array assignments in MergeCollation and CompactByteArray [v2] In-Reply-To: References: Message-ID: On Thu, 30 Nov 2023 21:47:27 GMT, Naoto Sato wrote: > > Is that "XXX" reminder at line 58 in MergeCollation still pertinent or could it be removed? > > Maybe, but not 100% sure, so I just left it. If unsure, better to leave it. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16912#issuecomment-1834640272 From rriggs at openjdk.org Thu Nov 30 22:56:06 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 30 Nov 2023 22:56:06 GMT Subject: RFR: 8321059: Unneeded array assignments in MergeCollation and CompactByteArray [v2] In-Reply-To: References: Message-ID: On Thu, 30 Nov 2023 21:51:19 GMT, Naoto Sato wrote: >> Removing the unnecessary array assignments. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > Use Arrays.fill() LGTM ------------- Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16912#pullrequestreview-1758625426