From serb at openjdk.org Mon Jan 2 07:59:28 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 2 Jan 2023 07:59:28 GMT Subject: RFR: 8299430: Cleanup: delete unnecessary semicolons in java.desktop module Message-ID: Small cleanup, unnecessary semicolons are deleted here and there. ------------- Commit messages: - 8299430: Cleanup: delete unnecessary semicolons in java.desktop module Changes: https://git.openjdk.org/jdk/pull/11807/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11807&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8299430 Stats: 88 lines in 64 files changed: 0 ins; 4 del; 84 mod Patch: https://git.openjdk.org/jdk/pull/11807.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11807/head:pull/11807 PR: https://git.openjdk.org/jdk/pull/11807 From stsypanov at openjdk.org Mon Jan 2 16:24:47 2023 From: stsypanov at openjdk.org (Sergey Tsypanov) Date: Mon, 2 Jan 2023 16:24:47 GMT Subject: RFR: 8299430: Cleanup: delete unnecessary semicolons in java.desktop module In-Reply-To: References: Message-ID: On Mon, 2 Jan 2023 07:20:43 GMT, Sergey Bylokhov wrote: > Small cleanup, unnecessary semicolons are deleted here and there. Marked as reviewed by stsypanov (Author). ------------- PR: https://git.openjdk.org/jdk/pull/11807 From psadhukhan at openjdk.org Tue Jan 3 06:07:38 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 3 Jan 2023 06:07:38 GMT Subject: RFR: 4934362: see also refers to self Message-ID: Some methods and constants has a hyperreference to self in javadoc which is rectified to reference proper methods ------------- Commit messages: - 4934362: see also refers to self Changes: https://git.openjdk.org/jdk/pull/11820/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11820&range=00 Issue: https://bugs.openjdk.org/browse/JDK-4934362 Stats: 26 lines in 10 files changed: 3 ins; 5 del; 18 mod Patch: https://git.openjdk.org/jdk/pull/11820.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11820/head:pull/11820 PR: https://git.openjdk.org/jdk/pull/11820 From aghaisas at openjdk.org Tue Jan 3 11:32:50 2023 From: aghaisas at openjdk.org (Ajit Ghaisas) Date: Tue, 3 Jan 2023 11:32:50 GMT Subject: RFR: 8299430: Cleanup: delete unnecessary semicolons in java.desktop module In-Reply-To: References: Message-ID: On Mon, 2 Jan 2023 07:20:43 GMT, Sergey Bylokhov wrote: > Small cleanup, unnecessary semicolons are deleted here and there. I see that this PR touches only java files. A few native files have these type of typos as well. I think, it is worth cleaning them as well. ------------- PR: https://git.openjdk.org/jdk/pull/11807 From duke at openjdk.org Tue Jan 3 17:48:35 2023 From: duke at openjdk.org (Justin Lu) Date: Tue, 3 Jan 2023 17:48:35 GMT Subject: RFR: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR Message-ID: Regression caused by the fix to [JDK-8296239](https://bugs.openjdk.org/browse/JDK-8296239). The ISO 4217 Amendment 174 Update changes went into effect starting in 2023. _java/text/Format/NumberFormat/CurrencyFormat.java_ fails as _java/text/Format/NumberFormat/CurrencySymbols.properties_ did not have the proper change from the Amendment 174 update as well. Swapping the outdated to **Kn** to **EUR** matches the Amendment 174 update, and fixes the failing test. ------------- Commit messages: - Switch symbol to EUR for hr_HR Changes: https://git.openjdk.org/jdk/pull/11833/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11833&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8299439 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/11833.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11833/head:pull/11833 PR: https://git.openjdk.org/jdk/pull/11833 From alanb at openjdk.org Tue Jan 3 17:53:54 2023 From: alanb at openjdk.org (Alan Bateman) Date: Tue, 3 Jan 2023 17:53:54 GMT Subject: RFR: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR In-Reply-To: References: Message-ID: On Tue, 3 Jan 2023 17:40:42 GMT, Justin Lu wrote: > Regression caused by the fix to [JDK-8296239](https://bugs.openjdk.org/browse/JDK-8296239). The ISO 4217 Amendment 174 Update changes went into effect starting in 2023. > > _java/text/Format/NumberFormat/CurrencyFormat.java_ fails as _java/text/Format/NumberFormat/CurrencySymbols.properties_ did not have the proper change from the Amendment 174 update as well. > > Swapping the outdated to **Kn** to **EUR** matches the Amendment 174 update, and fixes the failing test. You will need to remove the test from test/jdk/ProblemList.txt to get it to run again. ------------- PR: https://git.openjdk.org/jdk/pull/11833 From naoto at openjdk.org Tue Jan 3 17:56:53 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 3 Jan 2023 17:56:53 GMT Subject: RFR: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR In-Reply-To: References: Message-ID: On Tue, 3 Jan 2023 17:40:42 GMT, Justin Lu wrote: > Regression caused by the fix to [JDK-8296239](https://bugs.openjdk.org/browse/JDK-8296239). The ISO 4217 Amendment 174 Update changes went into effect starting in 2023. > > _java/text/Format/NumberFormat/CurrencyFormat.java_ fails as _java/text/Format/NumberFormat/CurrencySymbols.properties_ did not have the proper change from the Amendment 174 update as well. > > Swapping the outdated to **Kn** to **EUR** matches the Amendment 174 update, and fixes the failing test. You could also clean-up older entries that use transition format, i.e., `lt_LT` and `lv_LV`. test/jdk/java/text/Format/NumberFormat/CurrencySymbols.properties line 82: > 80: hi_IN=\u0930\u0942 > 81: hr=\u00A4 > 82: hr_HR=EUR Since this is a table for currency symbols, it has to be EURO SIGN ('\u20AC') ------------- Changes requested by naoto (Reviewer). PR: https://git.openjdk.org/jdk/pull/11833 From duke at openjdk.org Tue Jan 3 20:14:30 2023 From: duke at openjdk.org (Justin Lu) Date: Tue, 3 Jan 2023 20:14:30 GMT Subject: RFR: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR [v2] In-Reply-To: References: Message-ID: > Regression caused by the fix to [JDK-8296239](https://bugs.openjdk.org/browse/JDK-8296239). The ISO 4217 Amendment 174 Update changes went into effect starting in 2023. > > _java/text/Format/NumberFormat/CurrencyFormat.java_ fails as _java/text/Format/NumberFormat/CurrencySymbols.properties_ did not have the proper change from the Amendment 174 update as well. > > Swapping the outdated to **Kn** to **EUR** matches the Amendment 174 update, and fixes the failing test. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Remove from list, fix symbol ------------- Changes: - all: https://git.openjdk.org/jdk/pull/11833/files - new: https://git.openjdk.org/jdk/pull/11833/files/0ada2060..0934f837 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=11833&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11833&range=00-01 Stats: 6 lines in 3 files changed: 1 ins; 2 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/11833.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11833/head:pull/11833 PR: https://git.openjdk.org/jdk/pull/11833 From duke at openjdk.org Tue Jan 3 20:14:30 2023 From: duke at openjdk.org (Justin Lu) Date: Tue, 3 Jan 2023 20:14:30 GMT Subject: RFR: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR [v2] In-Reply-To: References: Message-ID: On Tue, 3 Jan 2023 17:51:26 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove from list, fix symbol > > test/jdk/java/text/Format/NumberFormat/CurrencySymbols.properties line 82: > >> 80: hi_IN=\u0930\u0942 >> 81: hr=\u00A4 >> 82: hr_HR=EUR > > Since this is a table for currency symbols, it has to be EURO SIGN ('\u20AC') Made those changes, thank you ------------- PR: https://git.openjdk.org/jdk/pull/11833 From lancea at openjdk.org Tue Jan 3 20:25:52 2023 From: lancea at openjdk.org (Lance Andersen) Date: Tue, 3 Jan 2023 20:25:52 GMT Subject: RFR: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR [v2] In-Reply-To: References: Message-ID: <8rqhJZeH3p7loHqz4C1XZEo1luuxPgdm0AIa4fuMljE=.a4ad6253-091b-4c5e-b1fa-d5df52398229@github.com> On Tue, 3 Jan 2023 20:14:30 GMT, Justin Lu wrote: >> Regression caused by the fix to [JDK-8296239](https://bugs.openjdk.org/browse/JDK-8296239). The ISO 4217 Amendment 174 Update changes went into effect starting in 2023. >> >> _java/text/Format/NumberFormat/CurrencyFormat.java_ fails as _java/text/Format/NumberFormat/CurrencySymbols.properties_ did not have the proper change from the Amendment 174 update as well. >> >> Swapping the outdated **Kn** to **EUR** matches the Amendment 174 update, and fixes the failing test. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Remove from list, fix symbol Looks OK to me ------------- Marked as reviewed by lancea (Reviewer). PR: https://git.openjdk.org/jdk/pull/11833 From naoto at openjdk.org Tue Jan 3 20:47:50 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 3 Jan 2023 20:47:50 GMT Subject: RFR: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR [v2] In-Reply-To: References: Message-ID: On Tue, 3 Jan 2023 20:14:30 GMT, Justin Lu wrote: >> Regression caused by the fix to [JDK-8296239](https://bugs.openjdk.org/browse/JDK-8296239). The ISO 4217 Amendment 174 Update changes went into effect starting in 2023. >> >> _java/text/Format/NumberFormat/CurrencyFormat.java_ fails as _java/text/Format/NumberFormat/CurrencySymbols.properties_ did not have the proper change from the Amendment 174 update as well. >> >> Swapping the outdated **Kn** to **EUR** matches the Amendment 174 update, and fixes the failing test. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Remove from list, fix symbol Marked as reviewed by naoto (Reviewer). src/jdk.localedata/share/classes/sun/util/resources/ext/CurrencyNames_hr_HR.properties line 38: > 36: # Taligent is a registered trademark of Taligent, Inc. > 37: > 38: EUR=\u20AC Good catch! ------------- PR: https://git.openjdk.org/jdk/pull/11833 From duke at openjdk.org Tue Jan 3 23:11:28 2023 From: duke at openjdk.org (Justin Lu) Date: Tue, 3 Jan 2023 23:11:28 GMT Subject: RFR: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR [v3] In-Reply-To: References: Message-ID: <__H0WPRhVNyv3FKRre4T07IDvun3W9tMCPsr9lCobSU=.7811ee8f-393f-43ee-9ef4-456456a6b26f@github.com> > Regression caused by the fix to [JDK-8296239](https://bugs.openjdk.org/browse/JDK-8296239). The ISO 4217 Amendment 174 Update changes went into effect starting in 2023. > > _java/text/Format/NumberFormat/CurrencyFormat.java_ fails as _java/text/Format/NumberFormat/CurrencySymbols.properties_ did not have the proper change from the Amendment 174 update as well. > > Swapping the outdated **Kn** to **EUR** matches the Amendment 174 update, and fixes the failing test. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Update copyright ------------- Changes: - all: https://git.openjdk.org/jdk/pull/11833/files - new: https://git.openjdk.org/jdk/pull/11833/files/0934f837..d0d075c1 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=11833&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11833&range=01-02 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/11833.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11833/head:pull/11833 PR: https://git.openjdk.org/jdk/pull/11833 From naoto at openjdk.org Tue Jan 3 23:11:29 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 3 Jan 2023 23:11:29 GMT Subject: RFR: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR [v3] In-Reply-To: <__H0WPRhVNyv3FKRre4T07IDvun3W9tMCPsr9lCobSU=.7811ee8f-393f-43ee-9ef4-456456a6b26f@github.com> References: <__H0WPRhVNyv3FKRre4T07IDvun3W9tMCPsr9lCobSU=.7811ee8f-393f-43ee-9ef4-456456a6b26f@github.com> Message-ID: On Tue, 3 Jan 2023 23:06:35 GMT, Justin Lu wrote: >> Regression caused by the fix to [JDK-8296239](https://bugs.openjdk.org/browse/JDK-8296239). The ISO 4217 Amendment 174 Update changes went into effect starting in 2023. >> >> _java/text/Format/NumberFormat/CurrencyFormat.java_ fails as _java/text/Format/NumberFormat/CurrencySymbols.properties_ did not have the proper change from the Amendment 174 update as well. >> >> Swapping the outdated **Kn** to **EUR** matches the Amendment 174 update, and fixes the failing test. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Update copyright Marked as reviewed by naoto (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11833 From jpai at openjdk.org Wed Jan 4 01:31:49 2023 From: jpai at openjdk.org (Jaikiran Pai) Date: Wed, 4 Jan 2023 01:31:49 GMT Subject: RFR: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR [v3] In-Reply-To: <__H0WPRhVNyv3FKRre4T07IDvun3W9tMCPsr9lCobSU=.7811ee8f-393f-43ee-9ef4-456456a6b26f@github.com> References: <__H0WPRhVNyv3FKRre4T07IDvun3W9tMCPsr9lCobSU=.7811ee8f-393f-43ee-9ef4-456456a6b26f@github.com> Message-ID: On Tue, 3 Jan 2023 23:11:28 GMT, Justin Lu wrote: >> Regression caused by the fix to [JDK-8296239](https://bugs.openjdk.org/browse/JDK-8296239). The ISO 4217 Amendment 174 Update changes went into effect starting in 2023. >> >> _java/text/Format/NumberFormat/CurrencyFormat.java_ fails as _java/text/Format/NumberFormat/CurrencySymbols.properties_ did not have the proper change from the Amendment 174 update as well. >> >> Swapping the outdated **Kn** to **EUR** matches the Amendment 174 update, and fixes the failing test. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Update copyright Marked as reviewed by jpai (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11833 From goetz at openjdk.org Wed Jan 4 14:29:30 2023 From: goetz at openjdk.org (Goetz Lindenmaier) Date: Wed, 4 Jan 2023 14:29:30 GMT Subject: RFR: 8299439: [testbug] java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR after 1.1.2023 and 8296239 Message-ID: ?fails for hr_HR after 1.1.2023 and 8296239 Hi, this fixes the issue with the currency test. ------------- Commit messages: - 8299439: [testbug] java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR after 1.1.2023 and 8296239 Changes: https://git.openjdk.org/jdk/pull/11844/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11844&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8299439 Stats: 3 lines in 2 files changed: 0 ins; 2 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/11844.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11844/head:pull/11844 PR: https://git.openjdk.org/jdk/pull/11844 From alanb at openjdk.org Wed Jan 4 14:41:49 2023 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 4 Jan 2023 14:41:49 GMT Subject: RFR: 8299439: [testbug] java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR after 1.1.2023 and 8296239 In-Reply-To: References: Message-ID: On Wed, 4 Jan 2023 14:21:53 GMT, Goetz Lindenmaier wrote: > ?fails for hr_HR after 1.1.2023 and 8296239 > > Hi, > > this fixes the issue with the currency test. Should this be closed as dup of JDK-8299439 ? ------------- PR: https://git.openjdk.org/jdk/pull/11844 From goetz at openjdk.org Wed Jan 4 16:29:58 2023 From: goetz at openjdk.org (Goetz Lindenmaier) Date: Wed, 4 Jan 2023 16:29:58 GMT Subject: RFR: 8299439: [testbug] java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR after 1.1.2023 and 8296239 In-Reply-To: References: Message-ID: On Wed, 4 Jan 2023 14:38:34 GMT, Alan Bateman wrote: >> ?fails for hr_HR after 1.1.2023 and 8296239 >> >> Hi, >> >> this fixes the issue with the currency test. > > Should this be closed as dup of pull/11833 ? @AlanBateman, sorry, I missed that other PR. ------------- PR: https://git.openjdk.org/jdk/pull/11844 From goetz at openjdk.org Wed Jan 4 16:29:59 2023 From: goetz at openjdk.org (Goetz Lindenmaier) Date: Wed, 4 Jan 2023 16:29:59 GMT Subject: Withdrawn: 8299439: [testbug] java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR after 1.1.2023 and 8296239 In-Reply-To: References: Message-ID: <2N0XGWndgxMA6VZ1Yk1wJIoQ4Vu1aRC4kYJunrN6iH8=.d5c3afd3-3e38-436b-9f1e-c3c48e7c94bf@github.com> On Wed, 4 Jan 2023 14:21:53 GMT, Goetz Lindenmaier wrote: > ?fails for hr_HR after 1.1.2023 and 8296239 > > Hi, > > this fixes the issue with the currency test. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/11844 From naoto at openjdk.org Wed Jan 4 20:09:35 2023 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 4 Jan 2023 20:09:35 GMT Subject: RFR: 8299292: Missing elements in aliased String array Message-ID: This is a pre-requisite fix for upgrading CLDR to v43. The upcoming CLDR changed the inheritance mechanism a bit with this change: https://unicode-org.atlassian.net/browse/CLDR-15054 where they removed the duplication of data. This revealed an issue in CLDRConverter buildtool that it was not capable of inheriting the partially populated, aliased elements in an array object. This changeset also removed the unused logging code. ------------- Commit messages: - copyright year - 8299292: Missing elements in aliased String array Changes: https://git.openjdk.org/jdk/pull/11851/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11851&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8299292 Stats: 16 lines in 1 file changed: 6 ins; 4 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/11851.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11851/head:pull/11851 PR: https://git.openjdk.org/jdk/pull/11851 From iris at openjdk.org Wed Jan 4 20:34:50 2023 From: iris at openjdk.org (Iris Clark) Date: Wed, 4 Jan 2023 20:34:50 GMT Subject: RFR: 8299292: Missing elements in aliased String array In-Reply-To: References: Message-ID: On Wed, 4 Jan 2023 19:57:56 GMT, Naoto Sato wrote: > This is a pre-requisite fix for upgrading CLDR to v43. The upcoming CLDR changed the inheritance mechanism a bit with this change: https://unicode-org.atlassian.net/browse/CLDR-15054 where they removed the duplication of data. This revealed an issue in CLDRConverter buildtool that it was not capable of inheriting the partially populated, aliased elements in an array object. This changeset also removed the unused logging code. Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11851 From naoto at openjdk.org Wed Jan 4 21:04:08 2023 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 4 Jan 2023 21:04:08 GMT Subject: RFR: 8299292: Missing elements in aliased String array [v2] In-Reply-To: References: Message-ID: > This is a pre-requisite fix for upgrading CLDR to v43. The upcoming CLDR changed the inheritance mechanism a bit with this change: https://unicode-org.atlassian.net/browse/CLDR-15054 where they removed the duplication of data. This revealed an issue in CLDRConverter buildtool that it was not capable of inheriting the partially populated, aliased elements in an array object. This changeset also removed the unused logging code. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Removed unnecessary variable ------------- Changes: - all: https://git.openjdk.org/jdk/pull/11851/files - new: https://git.openjdk.org/jdk/pull/11851/files/92dff5df..e6ce0791 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=11851&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11851&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/11851.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11851/head:pull/11851 PR: https://git.openjdk.org/jdk/pull/11851 From duke at openjdk.org Wed Jan 4 22:01:55 2023 From: duke at openjdk.org (Justin Lu) Date: Wed, 4 Jan 2023 22:01:55 GMT Subject: Integrated: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR In-Reply-To: References: Message-ID: On Tue, 3 Jan 2023 17:40:42 GMT, Justin Lu wrote: > Regression caused by the fix to [JDK-8296239](https://bugs.openjdk.org/browse/JDK-8296239). The ISO 4217 Amendment 174 Update changes went into effect starting in 2023. > > _java/text/Format/NumberFormat/CurrencyFormat.java_ fails as _java/text/Format/NumberFormat/CurrencySymbols.properties_ did not have the proper change from the Amendment 174 update as well. > > Swapping the outdated **Kn** to **EUR** matches the Amendment 174 update, and fixes the failing test. This pull request has now been integrated. Changeset: 3b374c01 Author: Justin Lu Committer: Naoto Sato URL: https://git.openjdk.org/jdk/commit/3b374c0153950ab193f3a188b57d3404b4ce2fe2 Stats: 8 lines in 3 files changed: 1 ins; 2 del; 5 mod 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR Reviewed-by: naoto, lancea, jpai ------------- PR: https://git.openjdk.org/jdk/pull/11833 From joehw at openjdk.org Wed Jan 4 23:25:48 2023 From: joehw at openjdk.org (Joe Wang) Date: Wed, 4 Jan 2023 23:25:48 GMT Subject: RFR: 8299292: Missing elements in aliased String array [v2] In-Reply-To: References: Message-ID: <6DJRZtp42WHncOzRjdVf74PFqgZr3K3mF3OpcjNoAqA=.386862b7-cac6-46db-a8ac-595da10a947b@github.com> On Wed, 4 Jan 2023 21:04:08 GMT, Naoto Sato wrote: >> This is a pre-requisite fix for upgrading CLDR to v43. The upcoming CLDR changed the inheritance mechanism a bit with this change: https://unicode-org.atlassian.net/browse/CLDR-15054 where they removed the duplication of data. This revealed an issue in CLDRConverter buildtool that it was not capable of inheriting the partially populated, aliased elements in an array object. This changeset also removed the unused logging code. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > Removed unnecessary variable Marked as reviewed by joehw (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11851 From iris at openjdk.org Thu Jan 5 01:26:49 2023 From: iris at openjdk.org (Iris Clark) Date: Thu, 5 Jan 2023 01:26:49 GMT Subject: RFR: 8299292: Missing elements in aliased String array [v2] In-Reply-To: References: Message-ID: On Wed, 4 Jan 2023 21:04:08 GMT, Naoto Sato wrote: >> This is a pre-requisite fix for upgrading CLDR to v43. The upcoming CLDR changed the inheritance mechanism a bit with this change: https://unicode-org.atlassian.net/browse/CLDR-15054 where they removed the duplication of data. This revealed an issue in CLDRConverter buildtool that it was not capable of inheriting the partially populated, aliased elements in an array object. This changeset also removed the unused logging code. > > Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: > > Removed unnecessary variable Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11851 From serb at openjdk.org Thu Jan 5 02:30:14 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 5 Jan 2023 02:30:14 GMT Subject: RFR: 8299430: Cleanup: delete unnecessary semicolons in java.desktop module [v2] In-Reply-To: References: Message-ID: > Small cleanup, unnecessary semicolons are deleted here and there. Sergey Bylokhov has updated the pull request incrementally with one additional commit since the last revision: native on mac ------------- Changes: - all: https://git.openjdk.org/jdk/pull/11807/files - new: https://git.openjdk.org/jdk/pull/11807/files/daeb1e81..fce6bacf Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=11807&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11807&range=00-01 Stats: 15 lines in 12 files changed: 0 ins; 0 del; 15 mod Patch: https://git.openjdk.org/jdk/pull/11807.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11807/head:pull/11807 PR: https://git.openjdk.org/jdk/pull/11807 From serb at openjdk.org Thu Jan 5 03:02:11 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 5 Jan 2023 03:02:11 GMT Subject: RFR: 8299430: Cleanup: delete unnecessary semicolons in java.desktop module [v3] In-Reply-To: References: Message-ID: > Small cleanup, unnecessary semicolons are deleted here and there. Sergey Bylokhov has updated the pull request incrementally with one additional commit since the last revision: native on win ------------- Changes: - all: https://git.openjdk.org/jdk/pull/11807/files - new: https://git.openjdk.org/jdk/pull/11807/files/fce6bacf..dcfc7510 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=11807&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11807&range=01-02 Stats: 20 lines in 16 files changed: 0 ins; 0 del; 20 mod Patch: https://git.openjdk.org/jdk/pull/11807.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11807/head:pull/11807 PR: https://git.openjdk.org/jdk/pull/11807 From duke at openjdk.org Thu Jan 5 03:20:48 2023 From: duke at openjdk.org (SWinxy) Date: Thu, 5 Jan 2023 03:20:48 GMT Subject: RFR: 8299430: Cleanup: delete unnecessary semicolons in java.desktop module [v3] In-Reply-To: References: Message-ID: <29xVKefQ2qWC31ZCb2vjVw9Nx3G-k5Sp9kJezYkcp9o=.e5043d00-61fc-47d2-b32f-f009cbbc37c8@github.com> On Thu, 5 Jan 2023 03:02:11 GMT, Sergey Bylokhov wrote: >> Small cleanup, unnecessary semicolons are deleted here and there. > > Sergey Bylokhov has updated the pull request incrementally with one additional commit since the last revision: > > native on win Marked as reviewed by SWinxy at github.com (no known OpenJDK username). ------------- PR: https://git.openjdk.org/jdk/pull/11807 From serb at openjdk.org Thu Jan 5 03:57:49 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 5 Jan 2023 03:57:49 GMT Subject: RFR: 8299430: Cleanup: delete unnecessary semicolons in java.desktop module In-Reply-To: References: Message-ID: <20wdsZZEBZNO0DR0Etv-JFKhKyzsxY2T5BwIDVG28pw=.bba98282-27df-4c00-aeb1-134644d682b8@github.com> On Tue, 3 Jan 2023 11:30:14 GMT, Ajit Ghaisas wrote: > I see that this PR touches only java files. A few native files have these type of typos as well. I think, it is worth cleaning them as well. "A few" is too optimistic, we have thousand empty statements caused by the semicolons. Most of them caused by using macro, I did not touch that for now and changed only the obvious issues. ------------- PR: https://git.openjdk.org/jdk/pull/11807 From aghaisas at openjdk.org Thu Jan 5 05:42:49 2023 From: aghaisas at openjdk.org (Ajit Ghaisas) Date: Thu, 5 Jan 2023 05:42:49 GMT Subject: RFR: 8299430: Cleanup: delete unnecessary semicolons in java.desktop module [v3] In-Reply-To: References: Message-ID: <7YKJP3-L3DgwxxXi44K329_sO_nDW6TKntqLnFpC5lQ=.b583121b-4419-457f-b173-e17c33c2b6dc@github.com> On Thu, 5 Jan 2023 03:02:11 GMT, Sergey Bylokhov wrote: >> Small cleanup, unnecessary semicolons are deleted here and there. > > Sergey Bylokhov has updated the pull request incrementally with one additional commit since the last revision: > > native on win Marked as reviewed by aghaisas (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11807 From iris at openjdk.org Thu Jan 5 07:39:49 2023 From: iris at openjdk.org (Iris Clark) Date: Thu, 5 Jan 2023 07:39:49 GMT Subject: RFR: 8299430: Cleanup: delete unnecessary semicolons in java.desktop module [v3] In-Reply-To: References: Message-ID: On Thu, 5 Jan 2023 03:02:11 GMT, Sergey Bylokhov wrote: >> Small cleanup, unnecessary semicolons are deleted here and there. > > Sergey Bylokhov has updated the pull request incrementally with one additional commit since the last revision: > > native on win Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11807 From serb at openjdk.org Thu Jan 5 08:50:55 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 5 Jan 2023 08:50:55 GMT Subject: Integrated: 8299430: Cleanup: delete unnecessary semicolons in java.desktop module In-Reply-To: References: Message-ID: <7WZak26CQILl0kyTKi_wvX5HFmcYl9rf2n4rgK7GtMY=.543f19ff-69dc-4e17-9bd2-81647e4e798b@github.com> On Mon, 2 Jan 2023 07:20:43 GMT, Sergey Bylokhov wrote: > Small cleanup, unnecessary semicolons are deleted here and there. This pull request has now been integrated. Changeset: e7361cb7 Author: Sergey Bylokhov URL: https://git.openjdk.org/jdk/commit/e7361cb746cf00984dd5193ec8a8cc90e1e5a39b Stats: 123 lines in 92 files changed: 0 ins; 4 del; 119 mod 8299430: Cleanup: delete unnecessary semicolons in java.desktop module Reviewed-by: stsypanov, aghaisas, iris ------------- PR: https://git.openjdk.org/jdk/pull/11807 From naoto at openjdk.org Thu Jan 5 17:52:56 2023 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 5 Jan 2023 17:52:56 GMT Subject: Integrated: 8299292: Missing elements in aliased String array In-Reply-To: References: Message-ID: On Wed, 4 Jan 2023 19:57:56 GMT, Naoto Sato wrote: > This is a pre-requisite fix for upgrading CLDR to v43. The upcoming CLDR changed the inheritance mechanism a bit with this change: https://unicode-org.atlassian.net/browse/CLDR-15054 where they removed the duplication of data. This revealed an issue in CLDRConverter buildtool that it was not capable of inheriting the partially populated, aliased elements in an array object. This changeset also removed the unused logging code. This pull request has now been integrated. Changeset: a49ccb95 Author: Naoto Sato URL: https://git.openjdk.org/jdk/commit/a49ccb959b7e50ee67b1ab4feca47c34bdbc14fe Stats: 16 lines in 1 file changed: 5 ins; 4 del; 7 mod 8299292: Missing elements in aliased String array Reviewed-by: iris, joehw ------------- PR: https://git.openjdk.org/jdk/pull/11851 From prr at openjdk.org Thu Jan 5 20:22:50 2023 From: prr at openjdk.org (Phil Race) Date: Thu, 5 Jan 2023 20:22:50 GMT Subject: RFR: 4934362: see also refers to self In-Reply-To: References: Message-ID: On Tue, 3 Jan 2023 06:00:37 GMT, Prasanta Sadhukhan wrote: > Some methods and constants has a hyperreference to self in javadoc which is rectified to reference proper methods Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11820 From duke at openjdk.org Thu Jan 5 22:20:32 2023 From: duke at openjdk.org (Justin Lu) Date: Thu, 5 Jan 2023 22:20:32 GMT Subject: RFR: 8299617: CurrencySymbols.properties is missing the copyright notice Message-ID: <3P2LV_PvCy1tn3ALX_uNgNGUvtNM2Xs672NJJpW66cQ=.9f817221-c95a-49ed-b360-3861f6a7950d@github.com> Added the missing copyright header ------------- Commit messages: - Fix date, remove classpath - Add copyright header Changes: https://git.openjdk.org/jdk/pull/11854/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11854&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8299617 Stats: 23 lines in 1 file changed: 23 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/11854.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11854/head:pull/11854 PR: https://git.openjdk.org/jdk/pull/11854 From naoto at openjdk.org Thu Jan 5 22:20:36 2023 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 5 Jan 2023 22:20:36 GMT Subject: RFR: 8299617: CurrencySymbols.properties is missing the copyright notice In-Reply-To: <3P2LV_PvCy1tn3ALX_uNgNGUvtNM2Xs672NJJpW66cQ=.9f817221-c95a-49ed-b360-3861f6a7950d@github.com> References: <3P2LV_PvCy1tn3ALX_uNgNGUvtNM2Xs672NJJpW66cQ=.9f817221-c95a-49ed-b360-3861f6a7950d@github.com> Message-ID: On Wed, 4 Jan 2023 21:48:26 GMT, Justin Lu wrote: > Added the missing copyright header Changes requested by naoto (Reviewer). test/jdk/java/text/Format/NumberFormat/CurrencySymbols.properties line 2: > 1: # > 2: # Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. This file is not new, so I'd use `2001` as the year created, which is borrowed from the test body `CurrencyFormat.java`. test/jdk/java/text/Format/NumberFormat/CurrencySymbols.properties line 9: > 7: # published by the Free Software Foundation. Oracle designates this > 8: # particular file as subject to the "Classpath" exception as provided > 9: # by Oracle in the LICENSE file that accompanied this code. Classpath exception is not applicable to tests. ------------- PR: https://git.openjdk.org/jdk/pull/11854 From duke at openjdk.org Thu Jan 5 22:20:37 2023 From: duke at openjdk.org (Justin Lu) Date: Thu, 5 Jan 2023 22:20:37 GMT Subject: RFR: 8299617: CurrencySymbols.properties is missing the copyright notice In-Reply-To: References: <3P2LV_PvCy1tn3ALX_uNgNGUvtNM2Xs672NJJpW66cQ=.9f817221-c95a-49ed-b360-3861f6a7950d@github.com> Message-ID: On Wed, 4 Jan 2023 23:02:40 GMT, Naoto Sato wrote: >> Added the missing copyright header > > test/jdk/java/text/Format/NumberFormat/CurrencySymbols.properties line 9: > >> 7: # published by the Free Software Foundation. Oracle designates this >> 8: # particular file as subject to the "Classpath" exception as provided >> 9: # by Oracle in the LICENSE file that accompanied this code. > > Classpath exception is not applicable to tests. Did not know that, thank you. Made the fixes for this and your previous comment. ------------- PR: https://git.openjdk.org/jdk/pull/11854 From iris at openjdk.org Thu Jan 5 22:52:57 2023 From: iris at openjdk.org (Iris Clark) Date: Thu, 5 Jan 2023 22:52:57 GMT Subject: RFR: 8299617: CurrencySymbols.properties is missing the copyright notice In-Reply-To: <3P2LV_PvCy1tn3ALX_uNgNGUvtNM2Xs672NJJpW66cQ=.9f817221-c95a-49ed-b360-3861f6a7950d@github.com> References: <3P2LV_PvCy1tn3ALX_uNgNGUvtNM2Xs672NJJpW66cQ=.9f817221-c95a-49ed-b360-3861f6a7950d@github.com> Message-ID: On Wed, 4 Jan 2023 21:48:26 GMT, Justin Lu wrote: > Added the missing copyright header Provided GPL license appear to match the standard template available here: https://github.com/openjdk/jdk/blob/master/make/data/license-templates/gpl-header ------------- Marked as reviewed by iris (Reviewer). PR: https://git.openjdk.org/jdk/pull/11854 From naoto at openjdk.org Fri Jan 6 00:13:50 2023 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 6 Jan 2023 00:13:50 GMT Subject: RFR: 8299617: CurrencySymbols.properties is missing the copyright notice In-Reply-To: <3P2LV_PvCy1tn3ALX_uNgNGUvtNM2Xs672NJJpW66cQ=.9f817221-c95a-49ed-b360-3861f6a7950d@github.com> References: <3P2LV_PvCy1tn3ALX_uNgNGUvtNM2Xs672NJJpW66cQ=.9f817221-c95a-49ed-b360-3861f6a7950d@github.com> Message-ID: On Wed, 4 Jan 2023 21:48:26 GMT, Justin Lu wrote: > Added the missing copyright header Marked as reviewed by naoto (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11854 From jpai at openjdk.org Fri Jan 6 00:47:48 2023 From: jpai at openjdk.org (Jaikiran Pai) Date: Fri, 6 Jan 2023 00:47:48 GMT Subject: RFR: 8299617: CurrencySymbols.properties is missing the copyright notice In-Reply-To: <3P2LV_PvCy1tn3ALX_uNgNGUvtNM2Xs672NJJpW66cQ=.9f817221-c95a-49ed-b360-3861f6a7950d@github.com> References: <3P2LV_PvCy1tn3ALX_uNgNGUvtNM2Xs672NJJpW66cQ=.9f817221-c95a-49ed-b360-3861f6a7950d@github.com> Message-ID: On Wed, 4 Jan 2023 21:48:26 GMT, Justin Lu wrote: > Added the missing copyright header Marked as reviewed by jpai (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11854 From duke at openjdk.org Fri Jan 6 02:45:18 2023 From: duke at openjdk.org (Archie L. Cobbs) Date: Fri, 6 Jan 2023 02:45:18 GMT Subject: RFR: 8015831: Add lint check for calling overridable methods from a constructor Message-ID: This PR adds a new lint warning category `this-escape`. It also adds `@SuppressWarnings` annotations as needed to the JDK itself to allow the JDK to continue to compile with `-Xlint:all`. A 'this' escape warning is generated for a constructor `A()` in a class `A` when the compiler detects that the following situation is _in theory possible:_ * Some subclass `B extends A` exists, and `B` is defined in a separate source file (i.e., compilation unit) * Some constructor `B()` of `B` invokes `A()` as its superclass constructor * During the execution of `A()`, some non-static method of `B.foo()` could get invoked, perhaps indirectly In the above scenario, `B.foo()` would execute before `A()` has returned and before `B()` has performed any initialization. To the extent `B.foo()` accesses any fields of `B` - all of which are still uninitialized - it is likely to function incorrectly. Note, when determining if a 'this' escape is possible, the compiler makes no assumptions about code outside of the current compilation unit. It doesn't look outside of the current source file to see what might actually happen when a method is invoked. It does follow method and constructors within the current compilation unit, and applies a simplified union-of-all-possible-branches data flow analysis to see where 'this' could end up. >From my review, virtually all of the warnings generated in the various JDK modules are valid warnings in the sense that a 'this' escape, as defined above, is really and truly possible. However, that doesn't imply that any bugs were found within the JDK - only that the possibility of a certain type of bug exists if certain superclass constructors are used by someone, somewhere, someday. For several "popular" classes, this PR also adds `@implNote`'s to the offending constructors so that subclass implementors are made aware of the threat. For one example, `TreeMap(Map)` invokes `putAll()` and `put()`. More details and a couple of motivating examples are given in an included [doc file](https://github.com/archiecobbs/jdk/blob/ThisEscape/src/java.base/share/classes/java/lang/doc-files/ThisEscape.html) that these `@implNote`'s link to. See also the recent thread on `amber-dev` for some background. Ideally, over time the owners of the various modules would review their `@SuppressWarnings("this-escape")` annotations and determine which other constructors also warranted such an `@implNote`. Because of all the`@SuppressWarnings` annotations, this PR touches a bunch of different JDK modules. My apologies for that. Adding these annotations was determined to be the more conservative approach, as compared to just excepting `this-escape` from various module builds globally. **Patch Navigation Guide** * Non-trivial compiler changes: * `src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java` * `src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java` * `src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java` * `src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeInfo.java` * `src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java` * `src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties` * `src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties` * Javadoc additions of `@implNote`: * `src/java.base/share/classes/java/io/PipedReader.java` * `src/java.base/share/classes/java/io/PipedWriter.java` * `src/java.base/share/classes/java/lang/Throwable.java` * `src/java.base/share/classes/java/util/ArrayDeque.java` * `src/java.base/share/classes/java/util/EnumMap.java` * `src/java.base/share/classes/java/util/HashSet.java` * `src/java.base/share/classes/java/util/Hashtable.java` * `src/java.base/share/classes/java/util/LinkedList.java` * `src/java.base/share/classes/java/util/TreeMap.java` * `src/java.base/share/classes/java/util/TreeSet.java` * New unit tests * `test/langtools/tools/javac/warnings/ThisEscape/*.java` * **Everything else** is just adding `@SuppressWarnings("this-escape")` ------------- Commit messages: - Remove trailing whitespace. - Some documentation tweaks. - Treat method references like the equivalent lambda. - Fix bug where initializers could generate duplicate warnings. - Javadoc fix. - Add ThisEscape.html doc note and link the new @implNote's to it. - Add more @SuppressWarnings("this-escape") annotations. - Add more @SuppressWarnings("this-escape") annotations. - Add more @SuppressWarnings("this-escape") annotations. - Add more @SuppressWarnings("this-escape") annotations. - ... and 38 more: https://git.openjdk.org/jdk/compare/c6588d5b...9c162283 Changes: https://git.openjdk.org/jdk/pull/11874/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11874&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8015831 Stats: 4326 lines in 1285 files changed: 4259 ins; 3 del; 64 mod Patch: https://git.openjdk.org/jdk/pull/11874.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11874/head:pull/11874 PR: https://git.openjdk.org/jdk/pull/11874 From dholmes at openjdk.org Fri Jan 6 04:51:00 2023 From: dholmes at openjdk.org (David Holmes) Date: Fri, 6 Jan 2023 04:51:00 GMT Subject: RFR: 8015831: Add lint check for calling overridable methods from a constructor In-Reply-To: References: Message-ID: On Fri, 6 Jan 2023 02:20:53 GMT, Archie L. Cobbs wrote: > This PR adds a new lint warning category `this-escape`. > > It also adds `@SuppressWarnings` annotations as needed to the JDK itself to allow the JDK to continue to compile with `-Xlint:all`. > > A 'this' escape warning is generated for a constructor `A()` in a class `A` when the compiler detects that the following situation is _in theory possible:_ > * Some subclass `B extends A` exists, and `B` is defined in a separate source file (i.e., compilation unit) > * Some constructor `B()` of `B` invokes `A()` as its superclass constructor > * During the execution of `A()`, some non-static method of `B.foo()` could get invoked, perhaps indirectly > > In the above scenario, `B.foo()` would execute before `A()` has returned and before `B()` has performed any initialization. To the extent `B.foo()` accesses any fields of `B` - all of which are still uninitialized - it is likely to function incorrectly. > > Note, when determining if a 'this' escape is possible, the compiler makes no assumptions about code outside of the current compilation unit. It doesn't look outside of the current source file to see what might actually happen when a method is invoked. It does follow method and constructors within the current compilation unit, and applies a simplified union-of-all-possible-branches data flow analysis to see where 'this' could end up. > > From my review, virtually all of the warnings generated in the various JDK modules are valid warnings in the sense that a 'this' escape, as defined above, is really and truly possible. However, that doesn't imply that any bugs were found within the JDK - only that the possibility of a certain type of bug exists if certain superclass constructors are used by someone, somewhere, someday. > > For several "popular" classes, this PR also adds `@implNote`'s to the offending constructors so that subclass implementors are made aware of the threat. For one example, `TreeMap(Map)` invokes `putAll()` and `put()`. > > More details and a couple of motivating examples are given in an included [doc file](https://github.com/archiecobbs/jdk/blob/ThisEscape/src/java.base/share/classes/java/lang/doc-files/ThisEscape.html) that these `@implNote`'s link to. See also the recent thread on `amber-dev` for some background. > > Ideally, over time the owners of the various modules would review their `@SuppressWarnings("this-escape")` annotations and determine which other constructors also warranted such an `@implNote`. > > Because of all the`@SuppressWarnings` annotations, this PR touches a bunch of different JDK modules. My apologies for that. Adding these annotations was determined to be the more conservative approach, as compared to just excepting `this-escape` from various module builds globally. > > **Patch Navigation Guide** > > * Non-trivial compiler changes: > * `src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java` > * `src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java` > * `src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java` > * `src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeInfo.java` > * `src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java` > * `src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties` > * `src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties` > > * Javadoc additions of `@implNote`: > > * `src/java.base/share/classes/java/io/PipedReader.java` > * `src/java.base/share/classes/java/io/PipedWriter.java` > * `src/java.base/share/classes/java/lang/Throwable.java` > * `src/java.base/share/classes/java/util/ArrayDeque.java` > * `src/java.base/share/classes/java/util/EnumMap.java` > * `src/java.base/share/classes/java/util/HashSet.java` > * `src/java.base/share/classes/java/util/Hashtable.java` > * `src/java.base/share/classes/java/util/LinkedList.java` > * `src/java.base/share/classes/java/util/TreeMap.java` > * `src/java.base/share/classes/java/util/TreeSet.java` > > * New unit tests > * `test/langtools/tools/javac/warnings/ThisEscape/*.java` > > * **Everything else** is just adding `@SuppressWarnings("this-escape")` Hi Archie, The associated JBS issue has been dormant for 6+ years and this is a very intrusive change affecting many, many files. Has the resurrection of this project previously been discussed somewhere? ------------- PR: https://git.openjdk.org/jdk/pull/11874 From serb at openjdk.org Fri Jan 6 05:15:10 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 6 Jan 2023 05:15:10 GMT Subject: RFR: 4934362: see also refers to self In-Reply-To: References: Message-ID: On Tue, 3 Jan 2023 06:00:37 GMT, Prasanta Sadhukhan wrote: > Some methods and constants has a hyperreference to self in javadoc which is rectified to reference proper methods src/java.desktop/share/classes/java/awt/Component.java line 2268: > 2266: * of this component > 2267: * @throws NullPointerException if {@code d} is {@code null} > 2268: * @see #getSize The old ref seems to be a shurtcut to the `setSize(int, int)` take a look to the current spec https://docs.oracle.com/en/java/javase/19/docs/api/java.desktop/java/awt/Component.html#setSize(java.awt.Dimension) ------------- PR: https://git.openjdk.org/jdk/pull/11820 From psadhukhan at openjdk.org Fri Jan 6 05:25:29 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 6 Jan 2023 05:25:29 GMT Subject: RFR: 4934362: see also refers to self [v2] In-Reply-To: References: Message-ID: > Some methods and constants has a hyperreference to self in javadoc which is rectified to reference proper methods Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Rectified link ------------- Changes: - all: https://git.openjdk.org/jdk/pull/11820/files - new: https://git.openjdk.org/jdk/pull/11820/files/5c9bd461..cac52f91 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=11820&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11820&range=00-01 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/11820.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11820/head:pull/11820 PR: https://git.openjdk.org/jdk/pull/11820 From serb at openjdk.org Fri Jan 6 05:35:50 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 6 Jan 2023 05:35:50 GMT Subject: RFR: 4934362: see also refers to self [v2] In-Reply-To: References: Message-ID: On Fri, 6 Jan 2023 05:25:29 GMT, Prasanta Sadhukhan wrote: >> Some methods and constants has a hyperreference to self in javadoc which is rectified to reference proper methods > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Rectified link src/java.desktop/share/classes/java/awt/MediaTracker.java line 529: > 527: * have been aborted, or have encountered > 528: * an error; {@code false} otherwise > 529: * @see java.awt.MediaTracker#checkID(int, boolean, boolean) int, boolean, boolean is a private method, it should probably refer the checkID(int) ------------- PR: https://git.openjdk.org/jdk/pull/11820 From psadhukhan at openjdk.org Fri Jan 6 05:57:08 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 6 Jan 2023 05:57:08 GMT Subject: RFR: 4934362: see also refers to self [v3] In-Reply-To: References: Message-ID: > Some methods and constants has a hyperreference to self in javadoc which is rectified to reference proper methods Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Rectified link ------------- Changes: - all: https://git.openjdk.org/jdk/pull/11820/files - new: https://git.openjdk.org/jdk/pull/11820/files/cac52f91..bfa5497c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=11820&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11820&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/11820.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11820/head:pull/11820 PR: https://git.openjdk.org/jdk/pull/11820 From alanb at openjdk.org Fri Jan 6 07:53:54 2023 From: alanb at openjdk.org (Alan Bateman) Date: Fri, 6 Jan 2023 07:53:54 GMT Subject: RFR: 8015831: Add lint check for calling overridable methods from a constructor In-Reply-To: References: Message-ID: On Fri, 6 Jan 2023 02:20:53 GMT, Archie L. Cobbs wrote: > This PR adds a new lint warning category `this-escape`. > > It also adds `@SuppressWarnings` annotations as needed to the JDK itself to allow the JDK to continue to compile with `-Xlint:all`. > > A 'this' escape warning is generated for a constructor `A()` in a class `A` when the compiler detects that the following situation is _in theory possible:_ > * Some subclass `B extends A` exists, and `B` is defined in a separate source file (i.e., compilation unit) > * Some constructor `B()` of `B` invokes `A()` as its superclass constructor > * During the execution of `A()`, some non-static method of `B.foo()` could get invoked, perhaps indirectly > > In the above scenario, `B.foo()` would execute before `A()` has returned and before `B()` has performed any initialization. To the extent `B.foo()` accesses any fields of `B` - all of which are still uninitialized - it is likely to function incorrectly. > > Note, when determining if a 'this' escape is possible, the compiler makes no assumptions about code outside of the current compilation unit. It doesn't look outside of the current source file to see what might actually happen when a method is invoked. It does follow method and constructors within the current compilation unit, and applies a simplified union-of-all-possible-branches data flow analysis to see where 'this' could end up. > > From my review, virtually all of the warnings generated in the various JDK modules are valid warnings in the sense that a 'this' escape, as defined above, is really and truly possible. However, that doesn't imply that any bugs were found within the JDK - only that the possibility of a certain type of bug exists if certain superclass constructors are used by someone, somewhere, someday. > > For several "popular" classes, this PR also adds `@implNote`'s to the offending constructors so that subclass implementors are made aware of the threat. For one example, `TreeMap(Map)` invokes `putAll()` and `put()`. > > More details and a couple of motivating examples are given in an included [doc file](https://github.com/archiecobbs/jdk/blob/ThisEscape/src/java.base/share/classes/java/lang/doc-files/ThisEscape.html) that these `@implNote`'s link to. See also the recent thread on `amber-dev` for some background. > > Ideally, over time the owners of the various modules would review their `@SuppressWarnings("this-escape")` annotations and determine which other constructors also warranted such an `@implNote`. > > Because of all the`@SuppressWarnings` annotations, this PR touches a bunch of different JDK modules. My apologies for that. Adding these annotations was determined to be the more conservative approach, as compared to just excepting `this-escape` from various module builds globally. > > **Patch Navigation Guide** > > * Non-trivial compiler changes: > * `src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java` > * `src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java` > * `src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java` > * `src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeInfo.java` > * `src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java` > * `src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties` > * `src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties` > > * Javadoc additions of `@implNote`: > > * `src/java.base/share/classes/java/io/PipedReader.java` > * `src/java.base/share/classes/java/io/PipedWriter.java` > * `src/java.base/share/classes/java/lang/Throwable.java` > * `src/java.base/share/classes/java/util/ArrayDeque.java` > * `src/java.base/share/classes/java/util/EnumMap.java` > * `src/java.base/share/classes/java/util/HashSet.java` > * `src/java.base/share/classes/java/util/Hashtable.java` > * `src/java.base/share/classes/java/util/LinkedList.java` > * `src/java.base/share/classes/java/util/TreeMap.java` > * `src/java.base/share/classes/java/util/TreeSet.java` > > * New unit tests > * `test/langtools/tools/javac/warnings/ThisEscape/*.java` > > * **Everything else** is just adding `@SuppressWarnings("this-escape")` This looks like a very useful lint warning to have but this PR is unwieldy. If you haven't done so already then you probably should socialize on compiler-dev and get agreement on the semantics and other details. I think you will also need to separate the addition of the lint warning from the changes to the wider JDK. It might be okay to add the feature but have it disabled for the JDK build initially. ------------- PR: https://git.openjdk.org/jdk/pull/11874 From duke at openjdk.org Fri Jan 6 14:51:54 2023 From: duke at openjdk.org (Archie L. Cobbs) Date: Fri, 6 Jan 2023 14:51:54 GMT Subject: RFR: 8015831: Add lint check for calling overridable methods from a constructor In-Reply-To: References: Message-ID: On Fri, 6 Jan 2023 04:48:27 GMT, David Holmes wrote: > The associated JBS issue has been dormant for 6+ years and this is a very intrusive change affecting many, many files. Has the resurrection of this project previously been discussed somewhere? Hi @dholmes-ora, The work to add this warning has been guided by @briangoetz in discussions on the amber-dev mailing list. See that thread for how we came up with the current design, underlying motivation, etc. Regarding intrusiveness (assuming you're referring simply to the number of files touched), as mentioned this was one of two options. The other option would be to patch to about ~30 `Java.gmk` files in `make/modules` to exclude `this-escape` from `-Xlint` during the various module builds. Going this route is fine with me, but it has the downside that any new code being developed would not benefit from the new warning. This was in fact my original approach (and it was a lot easier :) but Brian rightly pointed out that adding `@SuppressWarnings` annotations was the the safer (i.e, more conservative) approach. > If you haven't done so already then you probably should socialize on compiler-dev and get agreement on the semantics and other details. Hi @AlanBateman, As mentioned this has been under discussion on amber-dev for a while. Happy to continue that discussion here as well. > I think you will also need to separate the addition of the lint warning from the changes to the wider JDK. It might be okay to add the feature but have it disabled for the JDK build initially. Sounds reasonable... so I take it you would also be in favor of patching `make/modules` instead of adding `@SuppressWarnings` annotations everywhere... is that correct? If this is generally agreed as a better route then let me know and I'll update the patch. Thanks for both of your comments. ------------- PR: https://git.openjdk.org/jdk/pull/11874 From alanb at openjdk.org Fri Jan 6 15:41:16 2023 From: alanb at openjdk.org (Alan Bateman) Date: Fri, 6 Jan 2023 15:41:16 GMT Subject: RFR: 8015831: Add lint check for calling overridable methods from a constructor In-Reply-To: References: Message-ID: On Fri, 6 Jan 2023 14:49:16 GMT, Archie L. Cobbs wrote: > Sounds reasonable... so I take it you would also be in favor of patching `make/modules` instead of adding `@SuppressWarnings` annotations everywhere... is that correct? > > If this is generally agreed as a better route then let me know and I'll update the patch. Yes, I think that would be better. It would remove most of the noise, 1200+ files, and 10+ mailing lists from this PR. I assume there will be at least some iteration on compiler-dev about the details and changes to javac. Once you get to the JDK changes then I suspect that some areas may want to fix issues rather than adding SW. Sadly, I see a few examples in your list where there have been attempts to avoid leaking "this" but where we backed away out of concern that 3rd party code was extending some class and overriding a method known to be invoked by the constructor. Also we have places that register themselves to cleaners. I suspect some of the suggestions to document leaking this in implNotes will need discussion too because they amount to documenting "hooks" that people will rely on, e.g. documenting in ArrayDeque that its constructor invokes addList could be read as an invite to override it. ------------- PR: https://git.openjdk.org/jdk/pull/11874 From mcimadamore at openjdk.org Fri Jan 6 15:57:50 2023 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Fri, 6 Jan 2023 15:57:50 GMT Subject: RFR: 8015831: Add lint check for calling overridable methods from a constructor In-Reply-To: References: Message-ID: On Fri, 6 Jan 2023 15:38:31 GMT, Alan Bateman wrote: >>> The associated JBS issue has been dormant for 6+ years and this is a very intrusive change affecting many, many files. Has the resurrection of this project previously been discussed somewhere? >> >> Hi @dholmes-ora, >> >> The work to add this warning has been guided by @briangoetz in discussions on the amber-dev mailing list. See that thread for how we came up with the current design, underlying motivation, etc. >> >> Regarding intrusiveness (assuming you're referring simply to the number of files touched), as mentioned this was one of two options. The other option would be to patch to about ~30 `Java.gmk` files in `make/modules` to exclude `this-escape` from `-Xlint` during the various module builds. >> >> Going this route is fine with me, but it has the downside that any new code being developed would not benefit from the new warning. This was in fact my original approach (and it was a lot easier :) but Brian rightly pointed out that adding `@SuppressWarnings` annotations was the the safer (i.e, more conservative) approach. >> >>> If you haven't done so already then you probably should socialize on compiler-dev and get agreement on the semantics and other details. >> >> Hi @AlanBateman, >> >> As mentioned this has been under discussion on amber-dev for a while. Happy to continue that discussion here as well. >> >>> I think you will also need to separate the addition of the lint warning from the changes to the wider JDK. It might be okay to add the feature but have it disabled for the JDK build initially. >> >> Sounds reasonable... so I take it you would also be in favor of patching `make/modules` instead of adding `@SuppressWarnings` annotations everywhere... is that correct? >> >> If this is generally agreed as a better route then let me know and I'll update the patch. >> >> Thanks for both of your comments. > >> Sounds reasonable... so I take it you would also be in favor of patching `make/modules` instead of adding `@SuppressWarnings` annotations everywhere... is that correct? >> >> If this is generally agreed as a better route then let me know and I'll update the patch. > > Yes, I think that would be better. It would remove most of the noise, 1200+ files, and 10+ mailing lists from this PR. I assume there will be at least some iteration on compiler-dev about the details and changes to javac. Once you get to the JDK changes then I suspect that some areas may want to fix issues rather than adding SW. Sadly, I see a few examples in your list where there have been attempts to avoid leaking "this" but where we backed away out of concern that 3rd party code was extending some class and overriding a method known to be invoked by the constructor. Also we have places that register themselves to cleaners. I suspect some of the suggestions to document leaking this in implNotes will need discussion too because they amount to documenting "hooks" that people will rely on, e.g. documenting in ArrayDeque that its constructor invokes addList could be read as an invite to override it. I agree with @AlanBateman. When we introduced similar warnings in the past, we have enabled support in javac (with some test) in a separate PR, and then followed up with small dedicated PR for each of the various areas (enabling new warnings one by one). See this great umbrella JBS issue (created by @asotona) which has details on all the issues that were filed when we added an extra Lint warning for lossy conversions: https://bugs.openjdk.org/browse/JDK-8286374 They all refer to this: https://bugs.openjdk.org/browse/JDK-8244681 Which was submitted as a separate javac-only PR: https://github.com/openjdk/jdk/pull/8599 ------------- PR: https://git.openjdk.org/jdk/pull/11874 From duke at openjdk.org Fri Jan 6 17:51:09 2023 From: duke at openjdk.org (Justin Lu) Date: Fri, 6 Jan 2023 17:51:09 GMT Subject: RFR: 8299500: Usage of constructors of primitive wrapper classes should be avoided in java.text API docs Message-ID: <5beb38afAjMVpmWkhEizo6dwAqadjESW5pYiwCg5JxU=.4296244c-e0d6-4c83-9c28-7641a988f07b@github.com> Removed constructors of primitive wrapper classes (deprecated for removal) for the following - _java.text.ChoiceFormat_ - _java.text.MessageFormat_ Replaced with .valueOf() method ------------- Commit messages: - Fix ChoiceFormat - Fix MessageFormat Changes: https://git.openjdk.org/jdk/pull/11884/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11884&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8299500 Stats: 7 lines in 2 files changed: 0 ins; 0 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/11884.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11884/head:pull/11884 PR: https://git.openjdk.org/jdk/pull/11884 From naoto at openjdk.org Fri Jan 6 18:39:59 2023 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 6 Jan 2023 18:39:59 GMT Subject: RFR: 8299500: Usage of constructors of primitive wrapper classes should be avoided in java.text API docs In-Reply-To: <5beb38afAjMVpmWkhEizo6dwAqadjESW5pYiwCg5JxU=.4296244c-e0d6-4c83-9c28-7641a988f07b@github.com> References: <5beb38afAjMVpmWkhEizo6dwAqadjESW5pYiwCg5JxU=.4296244c-e0d6-4c83-9c28-7641a988f07b@github.com> Message-ID: On Fri, 6 Jan 2023 17:42:53 GMT, Justin Lu wrote: > Removed constructors of primitive wrapper classes (deprecated for removal) for the following > - _java.text.ChoiceFormat_ > - _java.text.MessageFormat_ > > Replaced with .valueOf() method LGTM src/java.base/share/classes/java/text/MessageFormat.java line 313: > 311: * String result = mf.format( objs ); > 312: * // result now equals "3.14, 3.1" > 313: * objs = null; Although this is not related to this fix, this line `objs = null` is not needed (and is confusing as an example snippet). I'd remove this. ------------- Marked as reviewed by naoto (Reviewer). PR: https://git.openjdk.org/jdk/pull/11884 From duke at openjdk.org Fri Jan 6 18:51:13 2023 From: duke at openjdk.org (Justin Lu) Date: Fri, 6 Jan 2023 18:51:13 GMT Subject: RFR: 8299500: Usage of constructors of primitive wrapper classes should be avoided in java.text API docs [v2] In-Reply-To: References: <5beb38afAjMVpmWkhEizo6dwAqadjESW5pYiwCg5JxU=.4296244c-e0d6-4c83-9c28-7641a988f07b@github.com> Message-ID: <_mekbW1uR6F5k3_CrWFZiIpp_hN-rHW6t39mAQ1A4fA=.0e09cd1c-402e-479c-b292-559c66798069@github.com> On Fri, 6 Jan 2023 18:36:08 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove objs=null > > src/java.base/share/classes/java/text/MessageFormat.java line 313: > >> 311: * String result = mf.format( objs ); >> 312: * // result now equals "3.14, 3.1" >> 313: * objs = null; > > Although this is not related to this fix, this line `objs = null` is not needed (and is confusing as an example snippet). I'd remove this. Makes sense, just got rid of it ------------- PR: https://git.openjdk.org/jdk/pull/11884 From duke at openjdk.org Fri Jan 6 18:51:12 2023 From: duke at openjdk.org (Justin Lu) Date: Fri, 6 Jan 2023 18:51:12 GMT Subject: RFR: 8299500: Usage of constructors of primitive wrapper classes should be avoided in java.text API docs [v2] In-Reply-To: <5beb38afAjMVpmWkhEizo6dwAqadjESW5pYiwCg5JxU=.4296244c-e0d6-4c83-9c28-7641a988f07b@github.com> References: <5beb38afAjMVpmWkhEizo6dwAqadjESW5pYiwCg5JxU=.4296244c-e0d6-4c83-9c28-7641a988f07b@github.com> Message-ID: > Removed constructors of primitive wrapper classes (deprecated for removal) for the following > - _java.text.ChoiceFormat_ > - _java.text.MessageFormat_ > > Replaced with .valueOf() method Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Remove objs=null ------------- Changes: - all: https://git.openjdk.org/jdk/pull/11884/files - new: https://git.openjdk.org/jdk/pull/11884/files/d6332659..cf833aee Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=11884&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11884&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/11884.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11884/head:pull/11884 PR: https://git.openjdk.org/jdk/pull/11884 From lancea at openjdk.org Fri Jan 6 19:13:55 2023 From: lancea at openjdk.org (Lance Andersen) Date: Fri, 6 Jan 2023 19:13:55 GMT Subject: RFR: 8299500: Usage of constructors of primitive wrapper classes should be avoided in java.text API docs [v2] In-Reply-To: References: <5beb38afAjMVpmWkhEizo6dwAqadjESW5pYiwCg5JxU=.4296244c-e0d6-4c83-9c28-7641a988f07b@github.com> Message-ID: On Fri, 6 Jan 2023 18:51:12 GMT, Justin Lu wrote: >> Removed constructors of primitive wrapper classes (deprecated for removal) for the following >> - _java.text.ChoiceFormat_ >> - _java.text.MessageFormat_ >> >> Replaced with .valueOf() method > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Remove objs=null Looks fine Justin, thanks for doing this. At some point we should convert the examples to be a snippet which we can do at a later time ------------- Marked as reviewed by lancea (Reviewer). PR: https://git.openjdk.org/jdk/pull/11884 From duke at openjdk.org Fri Jan 6 19:22:51 2023 From: duke at openjdk.org (Justin Lu) Date: Fri, 6 Jan 2023 19:22:51 GMT Subject: RFR: 8299500: Usage of constructors of primitive wrapper classes should be avoided in java.text API docs [v2] In-Reply-To: References: <5beb38afAjMVpmWkhEizo6dwAqadjESW5pYiwCg5JxU=.4296244c-e0d6-4c83-9c28-7641a988f07b@github.com> Message-ID: On Fri, 6 Jan 2023 19:10:57 GMT, Lance Andersen wrote: > Looks fine Justin, thanks for doing this. > > At some point we should convert the examples to be a snippet which we can do at a later time Sounds good ? ------------- PR: https://git.openjdk.org/jdk/pull/11884 From duke at openjdk.org Fri Jan 6 23:13:09 2023 From: duke at openjdk.org (Archie L. Cobbs) Date: Fri, 6 Jan 2023 23:13:09 GMT Subject: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v2] In-Reply-To: References: Message-ID: > This PR adds a new lint warning category `this-escape`. > > It also adds `@SuppressWarnings` annotations as needed to the JDK itself to allow the JDK to continue to compile with `-Xlint:all`. > > A 'this' escape warning is generated for a constructor `A()` in a class `A` when the compiler detects that the following situation is _in theory possible:_ > * Some subclass `B extends A` exists, and `B` is defined in a separate source file (i.e., compilation unit) > * Some constructor `B()` of `B` invokes `A()` as its superclass constructor > * During the execution of `A()`, some non-static method of `B.foo()` could get invoked, perhaps indirectly > > In the above scenario, `B.foo()` would execute before `A()` has returned and before `B()` has performed any initialization. To the extent `B.foo()` accesses any fields of `B` - all of which are still uninitialized - it is likely to function incorrectly. > > Note, when determining if a 'this' escape is possible, the compiler makes no assumptions about code outside of the current compilation unit. It doesn't look outside of the current source file to see what might actually happen when a method is invoked. It does follow method and constructors within the current compilation unit, and applies a simplified union-of-all-possible-branches data flow analysis to see where 'this' could end up. > > From my review, virtually all of the warnings generated in the various JDK modules are valid warnings in the sense that a 'this' escape, as defined above, is really and truly possible. However, that doesn't imply that any bugs were found within the JDK - only that the possibility of a certain type of bug exists if certain superclass constructors are used by someone, somewhere, someday. > > For several "popular" classes, this PR also adds `@implNote`'s to the offending constructors so that subclass implementors are made aware of the threat. For one example, `TreeMap(Map)` invokes `putAll()` and `put()`. > > More details and a couple of motivating examples are given in an included [doc file](https://github.com/archiecobbs/jdk/blob/ThisEscape/src/java.base/share/classes/java/lang/doc-files/ThisEscape.html) that these `@implNote`'s link to. See also the recent thread on `amber-dev` for some background. > > Ideally, over time the owners of the various modules would review their `@SuppressWarnings("this-escape")` annotations and determine which other constructors also warranted such an `@implNote`. > > Because of all the`@SuppressWarnings` annotations, this PR touches a bunch of different JDK modules. My apologies for that. Adding these annotations was determined to be the more conservative approach, as compared to just excepting `this-escape` from various module builds globally. > > **Patch Navigation Guide** > > * Non-trivial compiler changes: > * `src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java` > * `src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java` > * `src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java` > * `src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeInfo.java` > * `src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java` > * `src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties` > * `src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties` > > * Javadoc additions of `@implNote`: > > * `src/java.base/share/classes/java/io/PipedReader.java` > * `src/java.base/share/classes/java/io/PipedWriter.java` > * `src/java.base/share/classes/java/lang/Throwable.java` > * `src/java.base/share/classes/java/util/ArrayDeque.java` > * `src/java.base/share/classes/java/util/EnumMap.java` > * `src/java.base/share/classes/java/util/HashSet.java` > * `src/java.base/share/classes/java/util/Hashtable.java` > * `src/java.base/share/classes/java/util/LinkedList.java` > * `src/java.base/share/classes/java/util/TreeMap.java` > * `src/java.base/share/classes/java/util/TreeSet.java` > > * New unit tests > * `test/langtools/tools/javac/warnings/ThisEscape/*.java` > > * **Everything else** is just adding `@SuppressWarnings("this-escape")` Archie L. Cobbs has updated the pull request incrementally with two additional commits since the last revision: - Update copyright year for newly added files to 2023. - Suppress "this-escape" warnings using build flags instead of @SuppressAnnotations annotations. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/11874/files - new: https://git.openjdk.org/jdk/pull/11874/files/9c162283..f667cd56 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=11874&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11874&range=00-01 Stats: 1935 lines in 1303 files changed: 60 ins; 1770 del; 105 mod Patch: https://git.openjdk.org/jdk/pull/11874.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11874/head:pull/11874 PR: https://git.openjdk.org/jdk/pull/11874 From duke at openjdk.org Fri Jan 6 23:13:09 2023 From: duke at openjdk.org (Archie L. Cobbs) Date: Fri, 6 Jan 2023 23:13:09 GMT Subject: RFR: 8015831: Add lint check for calling overridable methods from a constructor In-Reply-To: References: Message-ID: On Fri, 6 Jan 2023 15:38:31 GMT, Alan Bateman wrote: >>> The associated JBS issue has been dormant for 6+ years and this is a very intrusive change affecting many, many files. Has the resurrection of this project previously been discussed somewhere? >> >> Hi @dholmes-ora, >> >> The work to add this warning has been guided by @briangoetz in discussions on the amber-dev mailing list. See that thread for how we came up with the current design, underlying motivation, etc. >> >> Regarding intrusiveness (assuming you're referring simply to the number of files touched), as mentioned this was one of two options. The other option would be to patch to about ~30 `Java.gmk` files in `make/modules` to exclude `this-escape` from `-Xlint` during the various module builds. >> >> Going this route is fine with me, but it has the downside that any new code being developed would not benefit from the new warning. This was in fact my original approach (and it was a lot easier :) but Brian rightly pointed out that adding `@SuppressWarnings` annotations was the the safer (i.e, more conservative) approach. >> >>> If you haven't done so already then you probably should socialize on compiler-dev and get agreement on the semantics and other details. >> >> Hi @AlanBateman, >> >> As mentioned this has been under discussion on amber-dev for a while. Happy to continue that discussion here as well. >> >>> I think you will also need to separate the addition of the lint warning from the changes to the wider JDK. It might be okay to add the feature but have it disabled for the JDK build initially. >> >> Sounds reasonable... so I take it you would also be in favor of patching `make/modules` instead of adding `@SuppressWarnings` annotations everywhere... is that correct? >> >> If this is generally agreed as a better route then let me know and I'll update the patch. >> >> Thanks for both of your comments. > >> Sounds reasonable... so I take it you would also be in favor of patching `make/modules` instead of adding `@SuppressWarnings` annotations everywhere... is that correct? >> >> If this is generally agreed as a better route then let me know and I'll update the patch. > > Yes, I think that would be better. It would remove most of the noise, 1200+ files, and 10+ mailing lists from this PR. I assume there will be at least some iteration on compiler-dev about the details and changes to javac. Once you get to the JDK changes then I suspect that some areas may want to fix issues rather than adding SW. Sadly, I see a few examples in your list where there have been attempts to avoid leaking "this" but where we backed away out of concern that 3rd party code was extending some class and overriding a method known to be invoked by the constructor. Also we have places that register themselves to cleaners. I suspect some of the suggestions to document leaking this in implNotes will need discussion too because they amount to documenting "hooks" that people will rely on, e.g. documenting in ArrayDeque that its constructor invokes addList could be read as an invite to override it. Hi @AlanBateman, OK that sounds like a plan. I've pushed a new commit to the `ThisEscape` branch that removes all the`@SuppressWarnings` annotations and replaces them with adjustments to build flags. I've moved the `@SuppressWarnings` annotations onto a new branch `ThisEscapeAnnotations`. This is just for future reference in case somebody wants to add them back someday and doesn't want to start from scratch. > I suspect some of the suggestions to document leaking this in implNotes will need discussion too because they amount to documenting "hooks" that people will rely on, e.g. documenting in ArrayDeque that its constructor invokes addList could be read as an invite to override it. Hmm. Hasn't that horse already left the barn? You kind of implied that when you said: > I see a few examples in your list where there have been attempts to avoid leaking "this" but where we backed away out of concern that 3rd party code was extending some class and overriding a method known to be invoked by the constructor. In other words, it doesn't sound like changing the behavior of these constructors is viable option at this point. And if that's the case, we might as well document and warn about the current behavior. Of course I'd love to be wrong... in which case, we can fix these constructors. Or, the third option - just do nothing yet. That would mean removing the warnings, which is fine. But then the `ThisEscape.html` document is orphaned. What should we do with it? I can remove it, just leave it there, or put it somewhere else (where?). It seems like having some documentation of the meaning of "this escape" would be helpful, because it's a subtle concept and there are multiple ways to define "escape". Thanks. @mcimadamore thanks for the bugs suggestion, I'll put that on the to-do list. ------------- PR: https://git.openjdk.org/jdk/pull/11874 From duke at openjdk.org Sat Jan 7 01:33:49 2023 From: duke at openjdk.org (Justin Lu) Date: Sat, 7 Jan 2023 01:33:49 GMT Subject: RFR: 6381945: (cal) Japanese calendar unit test system should avoid multiple static imports Message-ID: Within _test/jdk/java/util/Calendar/CalendarTestScripts/Symbol.java_ GregorianCalendar alone handles all the necessary imports, Calendar is not needed ------------- Commit messages: - Update copyright - Remove redundant import Changes: https://git.openjdk.org/jdk/pull/11855/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11855&range=00 Issue: https://bugs.openjdk.org/browse/JDK-6381945 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/11855.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11855/head:pull/11855 PR: https://git.openjdk.org/jdk/pull/11855 From duke at openjdk.org Sat Jan 7 02:22:58 2023 From: duke at openjdk.org (Justin Lu) Date: Sat, 7 Jan 2023 02:22:58 GMT Subject: Integrated: 8299617: CurrencySymbols.properties is missing the copyright notice In-Reply-To: <3P2LV_PvCy1tn3ALX_uNgNGUvtNM2Xs672NJJpW66cQ=.9f817221-c95a-49ed-b360-3861f6a7950d@github.com> References: <3P2LV_PvCy1tn3ALX_uNgNGUvtNM2Xs672NJJpW66cQ=.9f817221-c95a-49ed-b360-3861f6a7950d@github.com> Message-ID: <86dv7_OPtewpfAouqsztfIezb0l0Uga2NSY8yz72vmg=.5dde40e6-35ff-412a-9ab4-c8224a462490@github.com> On Wed, 4 Jan 2023 21:48:26 GMT, Justin Lu wrote: > Added the missing copyright header This pull request has now been integrated. Changeset: d5b80abc Author: Justin Lu Committer: Jaikiran Pai URL: https://git.openjdk.org/jdk/commit/d5b80abcbfff57c7728d3e42a696a762f08bc7ad Stats: 23 lines in 1 file changed: 23 ins; 0 del; 0 mod 8299617: CurrencySymbols.properties is missing the copyright notice Reviewed-by: naoto, iris, jpai ------------- PR: https://git.openjdk.org/jdk/pull/11854 From serb at openjdk.org Sat Jan 7 07:45:54 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Sat, 7 Jan 2023 07:45:54 GMT Subject: RFR: 4934362: see also refers to self [v3] In-Reply-To: References: Message-ID: On Fri, 6 Jan 2023 05:57:08 GMT, Prasanta Sadhukhan wrote: >> Some methods and constants has a hyperreference to self in javadoc which is rectified to reference proper methods > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Rectified link src/java.desktop/share/classes/javax/swing/JComboBox.java line 158: > 156: * or override. Use the accessor methods instead. > 157: * > 158: * @see #isEditable probably it was planned to point to the isEditable method? ------------- PR: https://git.openjdk.org/jdk/pull/11820 From lancea at openjdk.org Sat Jan 7 11:27:50 2023 From: lancea at openjdk.org (Lance Andersen) Date: Sat, 7 Jan 2023 11:27:50 GMT Subject: RFR: 6381945: (cal) Japanese calendar unit test system should avoid multiple static imports In-Reply-To: References: Message-ID: On Wed, 4 Jan 2023 21:49:18 GMT, Justin Lu wrote: > Within _test/jdk/java/util/Calendar/CalendarTestScripts/Symbol.java_ > > GregorianCalendar alone handles all the necessary imports, Calendar is not needed Marked as reviewed by lancea (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11855 From duke at openjdk.org Sat Jan 7 16:24:56 2023 From: duke at openjdk.org (ExE Boss) Date: Sat, 7 Jan 2023 16:24:56 GMT Subject: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v2] In-Reply-To: References: Message-ID: On Fri, 6 Jan 2023 23:13:09 GMT, Archie L. Cobbs wrote: >> This PR adds a new lint warning category `this-escape`. >> >> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to allow the JDK to continue to compile with `-Xlint:all`. >> >> A 'this' escape warning is generated for a constructor `A()` in a class `A` when the compiler detects that the following situation is _in theory possible:_ >> * Some subclass `B extends A` exists, and `B` is defined in a separate source file (i.e., compilation unit) >> * Some constructor `B()` of `B` invokes `A()` as its superclass constructor >> * During the execution of `A()`, some non-static method of `B.foo()` could get invoked, perhaps indirectly >> >> In the above scenario, `B.foo()` would execute before `A()` has returned and before `B()` has performed any initialization. To the extent `B.foo()` accesses any fields of `B` - all of which are still uninitialized - it is likely to function incorrectly. >> >> Note, when determining if a 'this' escape is possible, the compiler makes no assumptions about code outside of the current compilation unit. It doesn't look outside of the current source file to see what might actually happen when a method is invoked. It does follow method and constructors within the current compilation unit, and applies a simplified union-of-all-possible-branches data flow analysis to see where 'this' could end up. >> >> From my review, virtually all of the warnings generated in the various JDK modules are valid warnings in the sense that a 'this' escape, as defined above, is really and truly possible. However, that doesn't imply that any bugs were found within the JDK - only that the possibility of a certain type of bug exists if certain superclass constructors are used by someone, somewhere, someday. >> >> For several "popular" classes, this PR also adds `@implNote`'s to the offending constructors so that subclass implementors are made aware of the threat. For one example, `TreeMap(Map)` invokes `putAll()` and `put()`. >> >> More details and a couple of motivating examples are given in an included [doc file](https://github.com/archiecobbs/jdk/blob/ThisEscape/src/java.base/share/classes/java/lang/doc-files/ThisEscape.html) that these `@implNote`'s link to. See also the recent thread on `amber-dev` for some background. >> >> Ideally, over time the owners of the various modules would review their `@SuppressWarnings("this-escape")` annotations and determine which other constructors also warranted such an `@implNote`. >> >> Because of all the`@SuppressWarnings` annotations, this PR touches a bunch of different JDK modules. My apologies for that. Adding these annotations was determined to be the more conservative approach, as compared to just excepting `this-escape` from various module builds globally. >> >> **Patch Navigation Guide** >> >> * Non-trivial compiler changes: >> * `src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java` >> * `src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java` >> * `src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java` >> * `src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeInfo.java` >> * `src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java` >> * `src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties` >> * `src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties` >> >> * Javadoc additions of `@implNote`: >> >> * `src/java.base/share/classes/java/io/PipedReader.java` >> * `src/java.base/share/classes/java/io/PipedWriter.java` >> * `src/java.base/share/classes/java/lang/Throwable.java` >> * `src/java.base/share/classes/java/util/ArrayDeque.java` >> * `src/java.base/share/classes/java/util/EnumMap.java` >> * `src/java.base/share/classes/java/util/HashSet.java` >> * `src/java.base/share/classes/java/util/Hashtable.java` >> * `src/java.base/share/classes/java/util/LinkedList.java` >> * `src/java.base/share/classes/java/util/TreeMap.java` >> * `src/java.base/share/classes/java/util/TreeSet.java` >> >> * New unit tests >> * `test/langtools/tools/javac/warnings/ThisEscape/*.java` >> >> * **Everything else** is just adding `@SuppressWarnings("this-escape")` > > Archie L. Cobbs has updated the pull request incrementally with two additional commits since the last revision: > > - Update copyright year for newly added files to 2023. > - Suppress "this-escape" warnings using build flags instead of @SuppressAnnotations annotations. src/java.base/share/classes/java/lang/AssertionError.java line 75: > 73: */ > 74: @SuppressWarnings("this-escape") > 75: public AssertionError(Object detailMessage) { The?Javadoc of?this?constructor should?probably?mention that?it?calls `initCause(?)` when?`detailMessage` is?a?`Throwable`. src/java.base/share/classes/java/lang/BootstrapMethodError.java line 77: > 75: * Constructs a {@code BootstrapMethodError} with the specified > 76: * cause. > 77: * Suggestion: * * @implNote This constructor invokes {@link #initCause initCause()}; see * This Escape. * src/java.base/share/classes/java/lang/ExceptionInInitializerError.java line 54: > 52: * throwable object. > 53: * A detail message is a String that describes this particular exception. > 54: */ Suggestion: * * @implNote This constructor invokes {@link #initCause initCause()}; see * This Escape. */ ------------- PR: https://git.openjdk.org/jdk/pull/11874 From psadhukhan at openjdk.org Mon Jan 9 03:57:17 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 9 Jan 2023 03:57:17 GMT Subject: RFR: 4934362: see also refers to self [v4] In-Reply-To: References: Message-ID: > Some methods and constants has a hyperreference to self in javadoc which is rectified to reference proper methods Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Point to isEditable method ------------- Changes: - all: https://git.openjdk.org/jdk/pull/11820/files - new: https://git.openjdk.org/jdk/pull/11820/files/bfa5497c..8e6465a8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=11820&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11820&range=02-03 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/11820.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11820/head:pull/11820 PR: https://git.openjdk.org/jdk/pull/11820 From iris at openjdk.org Mon Jan 9 07:14:51 2023 From: iris at openjdk.org (Iris Clark) Date: Mon, 9 Jan 2023 07:14:51 GMT Subject: RFR: 6381945: (cal) Japanese calendar unit test system should avoid multiple static imports In-Reply-To: References: Message-ID: On Wed, 4 Jan 2023 21:49:18 GMT, Justin Lu wrote: > Within _test/jdk/java/util/Calendar/CalendarTestScripts/Symbol.java_ > > GregorianCalendar alone handles all the necessary imports, Calendar is not needed Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11855 From naoto at openjdk.org Mon Jan 9 16:14:02 2023 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 9 Jan 2023 16:14:02 GMT Subject: RFR: 6381945: (cal) Japanese calendar unit test system should avoid multiple static imports In-Reply-To: References: Message-ID: On Wed, 4 Jan 2023 21:49:18 GMT, Justin Lu wrote: > Within _test/jdk/java/util/Calendar/CalendarTestScripts/Symbol.java_ > > GregorianCalendar alone handles all the necessary imports, Calendar is not needed Marked as reviewed by naoto (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11855 From itakiguchi at openjdk.org Mon Jan 9 17:36:00 2023 From: itakiguchi at openjdk.org (Ichiroh Takiguchi) Date: Mon, 9 Jan 2023 17:36:00 GMT Subject: RFR: 8299811: SHIFT_JIS compatible charsets should be in java.base module on Linux platform Message-ID: On Japanese environment, following SHIFT_JIS compatible charsets are there: * PCK (x-PCK) * MS932 (windows-31j) * IBM943C (x-IBM943C) According to make/data/charsetmapping/charsets, PCK and MS932 are independent charset and have no dependencies on others. On RHEL8, SHIFT_JIS encoding is supported $ env LANG=ja_JP.sjis locale charmap SHIFT_JIS According to make/data/charsetmapping/stdcs-linux, SJIS (SHIFT_JIS) is in there, also MS932 and PCK are there. This means these are in java.base module on Linux platform. But IBM943C is not in stdcs-linux. I think IBM943C also should be in java.base module because of compatibility. ------------- Commit messages: - 8299811: SHIFT_JIS compatible charsets should be in java.base module on Linux platform Changes: https://git.openjdk.org/jdk/pull/11908/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11908&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8299811 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/11908.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11908/head:pull/11908 PR: https://git.openjdk.org/jdk/pull/11908 From duke at openjdk.org Mon Jan 9 17:46:59 2023 From: duke at openjdk.org (Justin Lu) Date: Mon, 9 Jan 2023 17:46:59 GMT Subject: Integrated: 8299500: Usage of constructors of primitive wrapper classes should be avoided in java.text API docs In-Reply-To: <5beb38afAjMVpmWkhEizo6dwAqadjESW5pYiwCg5JxU=.4296244c-e0d6-4c83-9c28-7641a988f07b@github.com> References: <5beb38afAjMVpmWkhEizo6dwAqadjESW5pYiwCg5JxU=.4296244c-e0d6-4c83-9c28-7641a988f07b@github.com> Message-ID: On Fri, 6 Jan 2023 17:42:53 GMT, Justin Lu wrote: > Removed constructors of primitive wrapper classes (deprecated for removal) for the following > - _java.text.ChoiceFormat_ > - _java.text.MessageFormat_ > > Replaced with .valueOf() method This pull request has now been integrated. Changeset: cd10c727 Author: Justin Lu Committer: Naoto Sato URL: https://git.openjdk.org/jdk/commit/cd10c7278d8fcf7ce6713a3ee688bb1e10c024f6 Stats: 8 lines in 2 files changed: 0 ins; 1 del; 7 mod 8299500: Usage of constructors of primitive wrapper classes should be avoided in java.text API docs Reviewed-by: naoto, lancea ------------- PR: https://git.openjdk.org/jdk/pull/11884 From duke at openjdk.org Mon Jan 9 22:13:57 2023 From: duke at openjdk.org (Justin Lu) Date: Mon, 9 Jan 2023 22:13:57 GMT Subject: Integrated: 6381945: (cal) Japanese calendar unit test system should avoid multiple static imports In-Reply-To: References: Message-ID: <8ApzF3tkVBLvB79FhBYPCKuD2bwxns6ofVnI9yVCRWE=.34c386ef-0b74-48c4-bf78-1a7d73c63178@github.com> On Wed, 4 Jan 2023 21:49:18 GMT, Justin Lu wrote: > Within _test/jdk/java/util/Calendar/CalendarTestScripts/Symbol.java_ > > GregorianCalendar alone handles all the necessary imports, Calendar is not needed This pull request has now been integrated. Changeset: f79b3d42 Author: Justin Lu Committer: Naoto Sato URL: https://git.openjdk.org/jdk/commit/f79b3d42f07b703f0e3b9fc67c92dee260b0e602 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod 6381945: (cal) Japanese calendar unit test system should avoid multiple static imports Reviewed-by: lancea, iris, naoto ------------- PR: https://git.openjdk.org/jdk/pull/11855 From naoto at openjdk.org Mon Jan 9 22:24:50 2023 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 9 Jan 2023 22:24:50 GMT Subject: RFR: 8299811: SHIFT_JIS compatible charsets should be in java.base module on Linux platform In-Reply-To: References: Message-ID: <7o5AUD83by86Gr49iAHKhIC_Bi8aQ2hSnSbIy3POyMs=.d56595ef-8564-46f0-bd82-1caca215cfbe@github.com> On Mon, 9 Jan 2023 17:28:20 GMT, Ichiroh Takiguchi wrote: > On Japanese environment, following SHIFT_JIS compatible charsets are there: > * PCK (x-PCK) > * MS932 (windows-31j) > * IBM943C (x-IBM943C) > > According to make/data/charsetmapping/charsets, > PCK and MS932 are independent charset and have no dependencies on others. > > On RHEL8, SHIFT_JIS encoding is supported > > $ env LANG=ja_JP.sjis locale charmap > SHIFT_JIS > > According to make/data/charsetmapping/stdcs-linux, > SJIS (SHIFT_JIS) is in there, also MS932 and PCK are there. > This means these are in java.base module on Linux platform. > But IBM943C is not in stdcs-linux. > I think IBM943C also should be in java.base module because of compatibility. I think the general consensus is to keep the `java.base` module minimal. IIRC, the reason we have `PCK` charsets in Un*x platforms was that it was required to boot Solaris in Japanese env (sorry if I am wrong). So I would remove it from `java.base` if possible. Thus moving those IBM* encodings that are equivalent to SJIS into `java.base` is something I would not want to do. It is definitely not a compatibility issue. ------------- PR: https://git.openjdk.org/jdk/pull/11908 From serb at openjdk.org Tue Jan 10 07:29:51 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Tue, 10 Jan 2023 07:29:51 GMT Subject: RFR: 4934362: see also refers to self [v4] In-Reply-To: References: Message-ID: On Mon, 9 Jan 2023 03:57:17 GMT, Prasanta Sadhukhan wrote: >> Some methods and constants has a hyperreference to self in javadoc which is rectified to reference proper methods > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Point to isEditable method Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11820 From itakiguchi at openjdk.org Tue Jan 10 15:20:58 2023 From: itakiguchi at openjdk.org (Ichiroh Takiguchi) Date: Tue, 10 Jan 2023 15:20:58 GMT Subject: RFR: 8299811: SHIFT_JIS compatible charsets should be in java.base module on Linux platform In-Reply-To: <7o5AUD83by86Gr49iAHKhIC_Bi8aQ2hSnSbIy3POyMs=.d56595ef-8564-46f0-bd82-1caca215cfbe@github.com> References: <7o5AUD83by86Gr49iAHKhIC_Bi8aQ2hSnSbIy3POyMs=.d56595ef-8564-46f0-bd82-1caca215cfbe@github.com> Message-ID: <__DZNMEEF1wZ5A4K3Mu1q7KtjgdKkFlAcVdxcha_7no=.8ea964e2-9d8b-45a7-a2d7-d7d63c895148@github.com> On Mon, 9 Jan 2023 22:20:57 GMT, Naoto Sato wrote: >> On Japanese environment, following SHIFT_JIS compatible charsets are there: >> * PCK (x-PCK) >> * MS932 (windows-31j) >> * IBM943C (x-IBM943C) >> >> According to make/data/charsetmapping/charsets, >> PCK and MS932 are independent charset and have no dependencies on others. >> >> On RHEL8, SHIFT_JIS encoding is supported >> >> $ env LANG=ja_JP.sjis locale charmap >> SHIFT_JIS >> >> According to make/data/charsetmapping/stdcs-linux, >> SJIS (SHIFT_JIS) is in there, also MS932 and PCK are there. >> This means these are in java.base module on Linux platform. >> But IBM943C is not in stdcs-linux. >> I think IBM943C also should be in java.base module because of compatibility. > > I think the general consensus is to keep the `java.base` module minimal. IIRC, the reason we have `PCK` charsets in Un*x platforms was that it was required to boot Solaris in Japanese env (sorry if I am wrong). So I would remove it from `java.base` if possible. Thus moving those IBM* encodings that are equivalent to SJIS into `java.base` is something I would not want to do. It is definitely not a compatibility issue. Hello @naotoj . Sorry, "compatibility" may not be valid wording. Now Linux is one of native application migration platform from *nix platform. Since SJIS charset does not have enough supported characters on Japanese environment. PCK and Cp943C charsets may be covered on this situation. ------------- PR: https://git.openjdk.org/jdk/pull/11908 From naoto at openjdk.org Tue Jan 10 17:27:08 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 10 Jan 2023 17:27:08 GMT Subject: RFR: 8299571: ZoneRulesProvider.registerProvider() can leave inconsistent state on failure Message-ID: Fixing the subject method to recover gracefully on a failed `ZoneRulesProvider` registration. ------------- Commit messages: - Added a test - 8299571: ZoneRulesProvider.registerProvider() can leave inconsistent state on failure Changes: https://git.openjdk.org/jdk/pull/11928/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11928&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8299571 Stats: 99 lines in 2 files changed: 98 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/11928.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11928/head:pull/11928 PR: https://git.openjdk.org/jdk/pull/11928 From iris at openjdk.org Tue Jan 10 21:34:19 2023 From: iris at openjdk.org (Iris Clark) Date: Tue, 10 Jan 2023 21:34:19 GMT Subject: RFR: 8299571: ZoneRulesProvider.registerProvider() can leave inconsistent state on failure In-Reply-To: References: Message-ID: On Tue, 10 Jan 2023 17:17:41 GMT, Naoto Sato wrote: > Fixing the subject method to recover gracefully on a failed `ZoneRulesProvider` registration. Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11928 From rriggs at openjdk.org Tue Jan 10 22:00:15 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 10 Jan 2023 22:00:15 GMT Subject: RFR: 8299571: ZoneRulesProvider.registerProvider() can leave inconsistent state on failure In-Reply-To: References: Message-ID: On Tue, 10 Jan 2023 17:17:41 GMT, Naoto Sato wrote: > Fixing the subject method to recover gracefully on a failed `ZoneRulesProvider` registration. LGTM ------------- Marked as reviewed by rriggs (Reviewer). PR: https://git.openjdk.org/jdk/pull/11928 From joehw at openjdk.org Tue Jan 10 23:05:13 2023 From: joehw at openjdk.org (Joe Wang) Date: Tue, 10 Jan 2023 23:05:13 GMT Subject: RFR: 8299571: ZoneRulesProvider.registerProvider() can leave inconsistent state on failure In-Reply-To: References: Message-ID: On Tue, 10 Jan 2023 17:17:41 GMT, Naoto Sato wrote: > Fixing the subject method to recover gracefully on a failed `ZoneRulesProvider` registration. Marked as reviewed by joehw (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11928 From clanger at openjdk.org Wed Jan 11 09:33:06 2023 From: clanger at openjdk.org (Christoph Langer) Date: Wed, 11 Jan 2023 09:33:06 GMT Subject: [jdk20] RFR: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR Message-ID: Hi all, This pull request contains a backport of [JDK-8299439](https://bugs.openjdk.org/browse/JDK-8299439), commit [3b374c01](https://github.com/openjdk/jdk/commit/3b374c0153950ab193f3a188b57d3404b4ce2fe2) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Justin Lu on 4 Jan 2023 and was reviewed by Naoto Sato, Lance Andersen and Jaikiran Pai. Thanks! ------------- Commit messages: - Backport 3b374c0153950ab193f3a188b57d3404b4ce2fe2 Changes: https://git.openjdk.org/jdk20/pull/96/files Webrev: https://webrevs.openjdk.org/?repo=jdk20&pr=96&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8299439 Stats: 8 lines in 3 files changed: 1 ins; 2 del; 5 mod Patch: https://git.openjdk.org/jdk20/pull/96.diff Fetch: git fetch https://git.openjdk.org/jdk20 pull/96/head:pull/96 PR: https://git.openjdk.org/jdk20/pull/96 From rgiulietti at openjdk.org Wed Jan 11 10:55:00 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Wed, 11 Jan 2023 10:55:00 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point Message-ID: This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. ------------- Commit messages: - 8299677: Formatter.format might take a long time to format an integer or floating-point Changes: https://git.openjdk.org/jdk/pull/11939/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11939&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8299677 Stats: 5 lines in 1 file changed: 0 ins; 1 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/11939.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11939/head:pull/11939 PR: https://git.openjdk.org/jdk/pull/11939 From alanb at openjdk.org Wed Jan 11 11:57:14 2023 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 11 Jan 2023 11:57:14 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point In-Reply-To: References: Message-ID: On Wed, 11 Jan 2023 10:47:03 GMT, Raffaello Giulietti wrote: > This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. I assume this issue has been there for a long time, just not noticed because it would be unusual to specify a width of this magnitude. The switch to using repeat + one insert looks good. Are you okay for tests in this area? ------------- PR: https://git.openjdk.org/jdk/pull/11939 From rgiulietti at openjdk.org Wed Jan 11 12:48:12 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Wed, 11 Jan 2023 12:48:12 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point In-Reply-To: References: Message-ID: <8CjFyxeUQH4-ZzXeur5dwY514tnr-3Qy79pc4GqotZ0=.ba1ade73-85b1-4da7-8b93-5e88a8fb4075@github.com> On Wed, 11 Jan 2023 11:53:58 GMT, Alan Bateman wrote: >> This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. > > I assume this issue has been there for a long time, just not noticed because it would be unusual to specify a width of this magnitude. The switch to using repeat + one insert looks good. Are you okay for tests in this area? @AlanBateman This is not a functional bug, only an enhancement to overcome the long times for large, unrealistic widths. Consequently, I have no specific tests that measure the timing against some hard-coded limits, if I understand you correctly. ------------- PR: https://git.openjdk.org/jdk/pull/11939 From jlaskey at openjdk.org Wed Jan 11 12:54:12 2023 From: jlaskey at openjdk.org (Jim Laskey) Date: Wed, 11 Jan 2023 12:54:12 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point In-Reply-To: References: Message-ID: On Wed, 11 Jan 2023 10:47:03 GMT, Raffaello Giulietti wrote: > This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. Just as a note, I've been thinking about adding a `repeat(String src, int count)` method to AbstractStringBuffer for quite some. I've held off because I would add a `fillWith(T[] dst, T[] src, int start, int end)` methods to `java.util.Arrays` first. I think both sets of methods would be generally useful based on use patterns in the JDK but for time and motivation. ------------- PR: https://git.openjdk.org/jdk/pull/11939 From alanb at openjdk.org Wed Jan 11 13:46:11 2023 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 11 Jan 2023 13:46:11 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point In-Reply-To: References: Message-ID: On Wed, 11 Jan 2023 11:53:58 GMT, Alan Bateman wrote: >> This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. > > I assume this issue has been there for a long time, just not noticed because it would be unusual to specify a width of this magnitude. The switch to using repeat + one insert looks good. Are you okay for tests in this area? > @AlanBateman This is not a functional bug, only an enhancement to overcome the long times for large, unrealistic widths. > Consequently, I have no specific tests that measure the timing against some hard-coded limits, if I understand you correctly. My question wasn't phrased very well, I was really just asking if we have good test coverage for width in the format specifier so that it would catch any regressions from changes to this code. ------------- PR: https://git.openjdk.org/jdk/pull/11939 From jlaskey at openjdk.org Wed Jan 11 13:57:29 2023 From: jlaskey at openjdk.org (Jim Laskey) Date: Wed, 11 Jan 2023 13:57:29 GMT Subject: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v33] In-Reply-To: References: Message-ID: > Enhance the Java programming language with string templates, which are similar to string literals but contain embedded expressions. A string template is interpreted at run time by replacing each expression with the result of evaluating that expression, possibly after further validation and transformation. This is a [preview language feature and API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 48 commits: - Merge branch 'master' into 8285932 - Merge branch 'master' into 8285932 - FormatProcessor changes - Update @since - Requested changes #12 - Seal Digits - Requested changes #11 - Typo - Requested changes #10 - Requested changes #9 - ... and 38 more: https://git.openjdk.org/jdk/compare/87238470...098467f0 ------------- Changes: https://git.openjdk.org/jdk/pull/10889/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10889&range=32 Stats: 9519 lines in 81 files changed: 9356 ins; 28 del; 135 mod Patch: https://git.openjdk.org/jdk/pull/10889.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10889/head:pull/10889 PR: https://git.openjdk.org/jdk/pull/10889 From jlaskey at openjdk.org Wed Jan 11 14:07:53 2023 From: jlaskey at openjdk.org (Jim Laskey) Date: Wed, 11 Jan 2023 14:07:53 GMT Subject: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v34] In-Reply-To: References: Message-ID: > Enhance the Java programming language with string templates, which are similar to string literals but contain embedded expressions. A string template is interpreted at run time by replacing each expression with the result of evaluating that expression, possibly after further validation and transformation. This is a [preview language feature and API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Update to JDK 21 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/10889/files - new: https://git.openjdk.org/jdk/pull/10889/files/098467f0..57638f97 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=10889&range=33 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10889&range=32-33 Stats: 7 lines in 7 files changed: 0 ins; 0 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/10889.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10889/head:pull/10889 PR: https://git.openjdk.org/jdk/pull/10889 From rgiulietti at openjdk.org Wed Jan 11 15:18:11 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Wed, 11 Jan 2023 15:18:11 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point In-Reply-To: References: Message-ID: On Wed, 11 Jan 2023 10:47:03 GMT, Raffaello Giulietti wrote: > This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. Since specific tests for padding seem lacking, I'll add some as part of this PR. Please expect another commit before marking as reviewed. ------------- PR: https://git.openjdk.org/jdk/pull/11939 From naoto at openjdk.org Wed Jan 11 17:04:24 2023 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 11 Jan 2023 17:04:24 GMT Subject: [jdk20] RFR: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR In-Reply-To: References: Message-ID: On Wed, 11 Jan 2023 09:21:18 GMT, Christoph Langer wrote: > Hi all, > > This pull request contains a backport of [JDK-8299439](https://bugs.openjdk.org/browse/JDK-8299439), commit [3b374c01](https://github.com/openjdk/jdk/commit/3b374c0153950ab193f3a188b57d3404b4ce2fe2) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit being backported was authored by Justin Lu on 4 Jan 2023 and was reviewed by Naoto Sato, Lance Andersen and Jaikiran Pai. > > Thanks! Looks good. ------------- Marked as reviewed by naoto (Reviewer). PR: https://git.openjdk.org/jdk20/pull/96 From naoto at openjdk.org Wed Jan 11 17:05:25 2023 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 11 Jan 2023 17:05:25 GMT Subject: Integrated: 8299571: ZoneRulesProvider.registerProvider() can leave inconsistent state on failure In-Reply-To: References: Message-ID: On Tue, 10 Jan 2023 17:17:41 GMT, Naoto Sato wrote: > Fixing the subject method to recover gracefully on a failed `ZoneRulesProvider` registration. This pull request has now been integrated. Changeset: c7716a01 Author: Naoto Sato URL: https://git.openjdk.org/jdk/commit/c7716a0101d337ec75ffdbcc3d18058a03c2373f Stats: 99 lines in 2 files changed: 98 ins; 0 del; 1 mod 8299571: ZoneRulesProvider.registerProvider() can leave inconsistent state on failure Reviewed-by: iris, rriggs, joehw ------------- PR: https://git.openjdk.org/jdk/pull/11928 From rgiulietti at openjdk.org Wed Jan 11 19:11:29 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Wed, 11 Jan 2023 19:11:29 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point [v2] In-Reply-To: References: Message-ID: > This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8299677: Formatter.format might take a long time to format an integer or floating-point ------------- Changes: - all: https://git.openjdk.org/jdk/pull/11939/files - new: https://git.openjdk.org/jdk/pull/11939/files/26e05ca5..e5418829 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=11939&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11939&range=00-01 Stats: 250 lines in 1 file changed: 250 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/11939.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11939/head:pull/11939 PR: https://git.openjdk.org/jdk/pull/11939 From rgiulietti at openjdk.org Wed Jan 11 19:11:29 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Wed, 11 Jan 2023 19:11:29 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point In-Reply-To: References: Message-ID: On Wed, 11 Jan 2023 10:47:03 GMT, Raffaello Giulietti wrote: > This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. Added straightforward tests for padding. ------------- PR: https://git.openjdk.org/jdk/pull/11939 From rgiulietti at openjdk.org Wed Jan 11 19:29:52 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Wed, 11 Jan 2023 19:29:52 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point [v3] In-Reply-To: References: Message-ID: > This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8299677: Formatter.format might take a long time to format an integer or floating-point ------------- Changes: - all: https://git.openjdk.org/jdk/pull/11939/files - new: https://git.openjdk.org/jdk/pull/11939/files/e5418829..8c3e3856 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=11939&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11939&range=01-02 Stats: 113 lines in 1 file changed: 112 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/11939.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11939/head:pull/11939 PR: https://git.openjdk.org/jdk/pull/11939 From rgiulietti at openjdk.org Wed Jan 11 19:34:39 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Wed, 11 Jan 2023 19:34:39 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point [v4] In-Reply-To: References: Message-ID: <9qfrsqAY_WqyeNZzIPRbZ1ZAzIwBeZTYBG3gsimTUJQ=.8fbba88e-3a88-44f7-82ec-e1f02f84301f@github.com> > This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8299677: Formatter.format might take a long time to format an integer or floating-point ------------- Changes: - all: https://git.openjdk.org/jdk/pull/11939/files - new: https://git.openjdk.org/jdk/pull/11939/files/8c3e3856..275582a9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=11939&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11939&range=02-03 Stats: 9 lines in 1 file changed: 0 ins; 0 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/11939.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11939/head:pull/11939 PR: https://git.openjdk.org/jdk/pull/11939 From clanger at openjdk.org Thu Jan 12 08:03:23 2023 From: clanger at openjdk.org (Christoph Langer) Date: Thu, 12 Jan 2023 08:03:23 GMT Subject: [jdk20] RFR: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR In-Reply-To: References: Message-ID: On Wed, 11 Jan 2023 17:01:26 GMT, Naoto Sato wrote: >> Hi all, >> >> This pull request contains a backport of [JDK-8299439](https://bugs.openjdk.org/browse/JDK-8299439), commit [3b374c01](https://github.com/openjdk/jdk/commit/3b374c0153950ab193f3a188b57d3404b4ce2fe2) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. >> >> The commit being backported was authored by Justin Lu on 4 Jan 2023 and was reviewed by Naoto Sato, Lance Andersen and Jaikiran Pai. >> >> Thanks! > > Looks good. Thanks for confirming, @naotoj ------------- PR: https://git.openjdk.org/jdk20/pull/96 From clanger at openjdk.org Thu Jan 12 08:06:20 2023 From: clanger at openjdk.org (Christoph Langer) Date: Thu, 12 Jan 2023 08:06:20 GMT Subject: [jdk20] Integrated: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR In-Reply-To: References: Message-ID: On Wed, 11 Jan 2023 09:21:18 GMT, Christoph Langer wrote: > Hi all, > > This pull request contains a backport of [JDK-8299439](https://bugs.openjdk.org/browse/JDK-8299439), commit [3b374c01](https://github.com/openjdk/jdk/commit/3b374c0153950ab193f3a188b57d3404b4ce2fe2) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit being backported was authored by Justin Lu on 4 Jan 2023 and was reviewed by Naoto Sato, Lance Andersen and Jaikiran Pai. > > Thanks! This pull request has now been integrated. Changeset: 752a3701 Author: Christoph Langer URL: https://git.openjdk.org/jdk20/commit/752a37016f49ef8f2405dd74f96f58f80d606cd3 Stats: 8 lines in 3 files changed: 1 ins; 2 del; 5 mod 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR Reviewed-by: naoto Backport-of: 3b374c0153950ab193f3a188b57d3404b4ce2fe2 ------------- PR: https://git.openjdk.org/jdk20/pull/96 From stsypanov at openjdk.org Thu Jan 12 11:43:15 2023 From: stsypanov at openjdk.org (Sergey Tsypanov) Date: Thu, 12 Jan 2023 11:43:15 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point [v4] In-Reply-To: <9qfrsqAY_WqyeNZzIPRbZ1ZAzIwBeZTYBG3gsimTUJQ=.8fbba88e-3a88-44f7-82ec-e1f02f84301f@github.com> References: <9qfrsqAY_WqyeNZzIPRbZ1ZAzIwBeZTYBG3gsimTUJQ=.8fbba88e-3a88-44f7-82ec-e1f02f84301f@github.com> Message-ID: On Wed, 11 Jan 2023 19:34:39 GMT, Raffaello Giulietti wrote: >> This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. > > Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: > > 8299677: Formatter.format might take a long time to format an integer or floating-point src/java.base/share/classes/java/util/Formatter.java line 4600: > 4598: // apply zero padding > 4599: if (width > sb.length() && Flags.contains(f, Flags.ZERO_PAD)) { > 4600: String zeros = Character.toString(zero).repeat(width - sb.length()); `Character.toString(zero)` could be replaced with `String.valueOf(zero)` saving one more method call ------------- PR: https://git.openjdk.org/jdk/pull/11939 From alanb at openjdk.org Thu Jan 12 12:02:16 2023 From: alanb at openjdk.org (Alan Bateman) Date: Thu, 12 Jan 2023 12:02:16 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point [v4] In-Reply-To: <9qfrsqAY_WqyeNZzIPRbZ1ZAzIwBeZTYBG3gsimTUJQ=.8fbba88e-3a88-44f7-82ec-e1f02f84301f@github.com> References: <9qfrsqAY_WqyeNZzIPRbZ1ZAzIwBeZTYBG3gsimTUJQ=.8fbba88e-3a88-44f7-82ec-e1f02f84301f@github.com> Message-ID: On Wed, 11 Jan 2023 19:34:39 GMT, Raffaello Giulietti wrote: >> This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. > > Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: > > 8299677: Formatter.format might take a long time to format an integer or floating-point Thanks for expanding the tests for this. test/jdk/java/util/Formatter/Padding.java line 26: > 24: /* > 25: * @test > 26: * @run junit Padding Probably should add a @summary tag to this, maybe a @bug too (I think JDK-4906370 added Formatter in Java 5). ------------- Marked as reviewed by alanb (Reviewer). PR: https://git.openjdk.org/jdk/pull/11939 From lancea at openjdk.org Thu Jan 12 12:25:15 2023 From: lancea at openjdk.org (Lance Andersen) Date: Thu, 12 Jan 2023 12:25:15 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point [v4] In-Reply-To: <9qfrsqAY_WqyeNZzIPRbZ1ZAzIwBeZTYBG3gsimTUJQ=.8fbba88e-3a88-44f7-82ec-e1f02f84301f@github.com> References: <9qfrsqAY_WqyeNZzIPRbZ1ZAzIwBeZTYBG3gsimTUJQ=.8fbba88e-3a88-44f7-82ec-e1f02f84301f@github.com> Message-ID: On Wed, 11 Jan 2023 19:34:39 GMT, Raffaello Giulietti wrote: >> This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. > > Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: > > 8299677: Formatter.format might take a long time to format an integer or floating-point Overall this looks OK. Please add either a general comment describing what we are trying to test or a comment for each test method. As we add new tests, adding comments for additional clarity will benefit future maintainers ------------- PR: https://git.openjdk.org/jdk/pull/11939 From lancea at openjdk.org Thu Jan 12 12:37:23 2023 From: lancea at openjdk.org (Lance Andersen) Date: Thu, 12 Jan 2023 12:37:23 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point [v4] In-Reply-To: <9qfrsqAY_WqyeNZzIPRbZ1ZAzIwBeZTYBG3gsimTUJQ=.8fbba88e-3a88-44f7-82ec-e1f02f84301f@github.com> References: <9qfrsqAY_WqyeNZzIPRbZ1ZAzIwBeZTYBG3gsimTUJQ=.8fbba88e-3a88-44f7-82ec-e1f02f84301f@github.com> Message-ID: On Wed, 11 Jan 2023 19:34:39 GMT, Raffaello Giulietti wrote: >> This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. > > Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: > > 8299677: Formatter.format might take a long time to format an integer or floating-point test/jdk/java/util/Formatter/Padding.java line 39: > 37: class BlankPaddingInt { > 38: > 39: @Test Any thought given to using `@MethodSource:` in order to specify a DataProvider? The benefit would be you could catch each failure vs having to address or comment out the assertEquals that is failing ------------- PR: https://git.openjdk.org/jdk/pull/11939 From rgiulietti at openjdk.org Thu Jan 12 15:31:03 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Thu, 12 Jan 2023 15:31:03 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point [v5] In-Reply-To: References: Message-ID: > This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8299677: Formatter.format might take a long time to format an integer or floating-point ------------- Changes: - all: https://git.openjdk.org/jdk/pull/11939/files - new: https://git.openjdk.org/jdk/pull/11939/files/275582a9..56c8f550 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=11939&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11939&range=03-04 Stats: 382 lines in 2 files changed: 57 ins; 106 del; 219 mod Patch: https://git.openjdk.org/jdk/pull/11939.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11939/head:pull/11939 PR: https://git.openjdk.org/jdk/pull/11939 From rgiulietti at openjdk.org Thu Jan 12 15:32:21 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Thu, 12 Jan 2023 15:32:21 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point [v4] In-Reply-To: <9qfrsqAY_WqyeNZzIPRbZ1ZAzIwBeZTYBG3gsimTUJQ=.8fbba88e-3a88-44f7-82ec-e1f02f84301f@github.com> References: <9qfrsqAY_WqyeNZzIPRbZ1ZAzIwBeZTYBG3gsimTUJQ=.8fbba88e-3a88-44f7-82ec-e1f02f84301f@github.com> Message-ID: On Wed, 11 Jan 2023 19:34:39 GMT, Raffaello Giulietti wrote: >> This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. > > Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: > > 8299677: Formatter.format might take a long time to format an integer or floating-point All concerns were addressed, I hope. ------------- PR: https://git.openjdk.org/jdk/pull/11939 From stsypanov at openjdk.org Thu Jan 12 16:28:13 2023 From: stsypanov at openjdk.org (Sergey Tsypanov) Date: Thu, 12 Jan 2023 16:28:13 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point [v5] In-Reply-To: References: Message-ID: On Thu, 12 Jan 2023 15:31:03 GMT, Raffaello Giulietti wrote: >> This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. > > Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: > > 8299677: Formatter.format might take a long time to format an integer or floating-point Marked as reviewed by stsypanov (Author). ------------- PR: https://git.openjdk.org/jdk/pull/11939 From darcy at openjdk.org Thu Jan 12 19:08:18 2023 From: darcy at openjdk.org (Joe Darcy) Date: Thu, 12 Jan 2023 19:08:18 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point [v5] In-Reply-To: References: Message-ID: On Thu, 12 Jan 2023 15:31:03 GMT, Raffaello Giulietti wrote: >> This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. > > Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: > > 8299677: Formatter.format might take a long time to format an integer or floating-point Marked as reviewed by darcy (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11939 From rgiulietti at openjdk.org Thu Jan 12 19:24:26 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Thu, 12 Jan 2023 19:24:26 GMT Subject: Integrated: 8299677: Formatter.format might take a long time to format an integer or floating-point In-Reply-To: References: Message-ID: On Wed, 11 Jan 2023 10:47:03 GMT, Raffaello Giulietti wrote: > This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. This pull request has now been integrated. Changeset: 33412c10 Author: Raffaello Giulietti URL: https://git.openjdk.org/jdk/commit/33412c102ce799ff2de3512df77e6e07d76acd36 Stats: 318 lines in 2 files changed: 313 ins; 1 del; 4 mod 8299677: Formatter.format might take a long time to format an integer or floating-point Reviewed-by: alanb, stsypanov, darcy ------------- PR: https://git.openjdk.org/jdk/pull/11939 From duke at openjdk.org Fri Jan 13 04:03:25 2023 From: duke at openjdk.org (Justin Lu) Date: Fri, 13 Jan 2023 04:03:25 GMT Subject: RFR: 8300077: Refactor code examples to use @snippet in java.text.ChoiceFormat Message-ID: This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.ChoiceFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/ChoiceFormat.html). Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. ------------- Commit messages: - Use snippets Changes: https://git.openjdk.org/jdk/pull/11981/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11981&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8300077 Stats: 6 lines in 1 file changed: 0 ins; 0 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/11981.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11981/head:pull/11981 PR: https://git.openjdk.org/jdk/pull/11981 From lancea at openjdk.org Fri Jan 13 11:04:18 2023 From: lancea at openjdk.org (Lance Andersen) Date: Fri, 13 Jan 2023 11:04:18 GMT Subject: RFR: 8300077: Refactor code examples to use @snippet in java.text.ChoiceFormat In-Reply-To: References: Message-ID: <1XWPxLF9LGdfBlAAscA0OuBfdcqOvCRn_hv8qOG0C8g=.2ddb4a2e-7c24-40db-8b1c-acaa20187aaa@github.com> On Thu, 12 Jan 2023 22:31:24 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.ChoiceFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/ChoiceFormat.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. Marked as reviewed by lancea (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11981 From iris at openjdk.org Fri Jan 13 17:05:24 2023 From: iris at openjdk.org (Iris Clark) Date: Fri, 13 Jan 2023 17:05:24 GMT Subject: RFR: 8300077: Refactor code examples to use @snippet in java.text.ChoiceFormat In-Reply-To: References: Message-ID: On Thu, 12 Jan 2023 22:31:24 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.ChoiceFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/ChoiceFormat.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11981 From naoto at openjdk.org Fri Jan 13 17:51:19 2023 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 13 Jan 2023 17:51:19 GMT Subject: RFR: 8300077: Refactor code examples to use @snippet in java.text.ChoiceFormat In-Reply-To: References: Message-ID: On Thu, 12 Jan 2023 22:31:24 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.ChoiceFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/ChoiceFormat.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. Marked as reviewed by naoto (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11981 From darcy at openjdk.org Fri Jan 13 21:52:55 2023 From: darcy at openjdk.org (Joe Darcy) Date: Fri, 13 Jan 2023 21:52:55 GMT Subject: RFR: JDK-8300133: Use generalized see and link tags in core libs Message-ID: With generalized see and link tags that can refer to anchors (JDK-8200337), the see and link tags in core libraries should be updated to use this feature when possible. This PR covers such updates for java.base. ------------- Commit messages: - JDK-8300133: Use generalized see and link tags in core libs Changes: https://git.openjdk.org/jdk/pull/12000/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12000&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8300133 Stats: 107 lines in 10 files changed: 0 ins; 19 del; 88 mod Patch: https://git.openjdk.org/jdk/pull/12000.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12000/head:pull/12000 PR: https://git.openjdk.org/jdk/pull/12000 From jlu at openjdk.org Fri Jan 13 21:58:03 2023 From: jlu at openjdk.org (Justin Lu) Date: Fri, 13 Jan 2023 21:58:03 GMT Subject: RFR: 8300093: Refactor code examples to use @snippet in java.text.MessageFormat Message-ID: <1TQpjbUcl5hz7RVNrXF1AXvc98ooTMP1iA3LxiRmEho=.bb28548d-77d2-4399-ae77-43a45066497f@github.com> This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.MessageFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/class-use/MessageFormat.html). Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. ------------- Commit messages: - Switch code blocks with snippet Changes: https://git.openjdk.org/jdk/pull/12001/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12001&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8300093 Stats: 24 lines in 1 file changed: 12 ins; 0 del; 12 mod Patch: https://git.openjdk.org/jdk/pull/12001.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12001/head:pull/12001 PR: https://git.openjdk.org/jdk/pull/12001 From jlu at openjdk.org Fri Jan 13 22:02:23 2023 From: jlu at openjdk.org (Justin Lu) Date: Fri, 13 Jan 2023 22:02:23 GMT Subject: [jdk20] RFR: 8299500: Usage of constructors of primitive wrapper classes should be avoided in java.text API docs Message-ID: This pull request contains a backport of commit [cd10c727](https://github.com/openjdk/jdk/commit/cd10c7278d8fcf7ce6713a3ee688bb1e10c024f6) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Justin Lu on 9 Jan 2023 and was reviewed by Naoto Sato and Lance Andersen. Thanks! ------------- Commit messages: - Backport cd10c7278d8fcf7ce6713a3ee688bb1e10c024f6 Changes: https://git.openjdk.org/jdk20/pull/106/files Webrev: https://webrevs.openjdk.org/?repo=jdk20&pr=106&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8299500 Stats: 8 lines in 2 files changed: 0 ins; 1 del; 7 mod Patch: https://git.openjdk.org/jdk20/pull/106.diff Fetch: git fetch https://git.openjdk.org/jdk20 pull/106/head:pull/106 PR: https://git.openjdk.org/jdk20/pull/106 From iris at openjdk.org Fri Jan 13 22:11:00 2023 From: iris at openjdk.org (Iris Clark) Date: Fri, 13 Jan 2023 22:11:00 GMT Subject: RFR: 8300093: Refactor code examples to use @snippet in java.text.MessageFormat In-Reply-To: <1TQpjbUcl5hz7RVNrXF1AXvc98ooTMP1iA3LxiRmEho=.bb28548d-77d2-4399-ae77-43a45066497f@github.com> References: <1TQpjbUcl5hz7RVNrXF1AXvc98ooTMP1iA3LxiRmEho=.bb28548d-77d2-4399-ae77-43a45066497f@github.com> Message-ID: On Fri, 13 Jan 2023 21:47:40 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.MessageFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/class-use/MessageFormat.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/12001 From iris at openjdk.org Fri Jan 13 22:15:07 2023 From: iris at openjdk.org (Iris Clark) Date: Fri, 13 Jan 2023 22:15:07 GMT Subject: [jdk20] RFR: 8299500: Usage of constructors of primitive wrapper classes should be avoided in java.text API docs In-Reply-To: References: Message-ID: On Fri, 13 Jan 2023 21:53:50 GMT, Justin Lu wrote: > This pull request contains a backport of commit [cd10c727](https://github.com/openjdk/jdk/commit/cd10c7278d8fcf7ce6713a3ee688bb1e10c024f6) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit being backported was authored by Justin Lu on 9 Jan 2023 and was reviewed by Naoto Sato and Lance Andersen. > > Thanks! Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.org/jdk20/pull/106 From jjg at openjdk.org Fri Jan 13 22:33:13 2023 From: jjg at openjdk.org (Jonathan Gibbons) Date: Fri, 13 Jan 2023 22:33:13 GMT Subject: RFR: JDK-8300133: Use generalized see and link tags in core libs In-Reply-To: References: Message-ID: On Fri, 13 Jan 2023 21:30:06 GMT, Joe Darcy wrote: > With generalized see and link tags that can refer to anchors (JDK-8200337), the see and link tags in core libraries should be updated to use this feature when possible. This PR covers such updates for java.base. Nice to see all those ` RFR: JDK-8300133: Use generalized see and link tags in core libs In-Reply-To: References: Message-ID: On Fri, 13 Jan 2023 21:30:06 GMT, Joe Darcy wrote: > With generalized see and link tags that can refer to anchors (JDK-8200337), the see and link tags in core libraries should be updated to use this feature when possible. This PR covers such updates for java.base. src/java.base/share/classes/java/util/ResourceBundle.java line 270: > 268: * are packaged in a JAR file. Resource bundle only JAR file can be readily > 269: * deployed as an {@linkplain java.lang.module.ModuleFinder##automatic-modules > 270: * automatic module1}. For example, if the JAR file contains the Typo: extra `1` ------------- PR: https://git.openjdk.org/jdk/pull/12000 From mchung at openjdk.org Fri Jan 13 22:46:10 2023 From: mchung at openjdk.org (Mandy Chung) Date: Fri, 13 Jan 2023 22:46:10 GMT Subject: RFR: JDK-8300133: Use generalized see and link tags in core libs In-Reply-To: References: Message-ID: On Fri, 13 Jan 2023 21:30:06 GMT, Joe Darcy wrote: > With generalized see and link tags that can refer to anchors (JDK-8200337), the see and link tags in core libraries should be updated to use this feature when possible. This PR covers such updates for java.base. src/java.base/share/classes/java/util/ResourceBundle.java line 270: > 268: * are packaged in a JAR file. Resource bundle only JAR file can be readily > 269: * deployed as an {@linkplain java.lang.module.ModuleFinder##automatic-modules > 270: * automatic module1}. For example, if the JAR file contains the typo : `module1`? ------------- PR: https://git.openjdk.org/jdk/pull/12000 From darcy at openjdk.org Fri Jan 13 22:54:47 2023 From: darcy at openjdk.org (Joe Darcy) Date: Fri, 13 Jan 2023 22:54:47 GMT Subject: RFR: JDK-8300133: Use generalized see and link tags in core libs [v2] In-Reply-To: References: Message-ID: > With generalized see and link tags that can refer to anchors (JDK-8200337), the see and link tags in core libraries should be updated to use this feature when possible. This PR covers such updates for java.base. Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: Fix typo found in code review. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/12000/files - new: https://git.openjdk.org/jdk/pull/12000/files/aa623f2a..0e4d4e4b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=12000&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12000&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/12000.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12000/head:pull/12000 PR: https://git.openjdk.org/jdk/pull/12000 From mchung at openjdk.org Fri Jan 13 22:54:47 2023 From: mchung at openjdk.org (Mandy Chung) Date: Fri, 13 Jan 2023 22:54:47 GMT Subject: RFR: JDK-8300133: Use generalized see and link tags in core libs [v2] In-Reply-To: References: Message-ID: <1y-NxkBIqDQ4RlBuXC7czlGB-jsPd3m8jNrPD9-wzUk=.9eb0f9d7-a9cc-4791-88c8-b3253ea97607@github.com> On Fri, 13 Jan 2023 22:50:53 GMT, Joe Darcy wrote: >> With generalized see and link tags that can refer to anchors (JDK-8200337), the see and link tags in core libraries should be updated to use this feature when possible. This PR covers such updates for java.base. > > Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: > > Fix typo found in code review. Marked as reviewed by mchung (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/12000 From naoto at openjdk.org Fri Jan 13 22:54:47 2023 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 13 Jan 2023 22:54:47 GMT Subject: RFR: JDK-8300133: Use generalized see and link tags in core libs [v2] In-Reply-To: References: Message-ID: <0TIQXjqLz5hGjV--Pr4KjUIloBfbXIRlXf5j9EK4TnA=.970794a6-fc1e-4b6b-a82a-9e886abd0111@github.com> On Fri, 13 Jan 2023 22:50:53 GMT, Joe Darcy wrote: >> With generalized see and link tags that can refer to anchors (JDK-8200337), the see and link tags in core libraries should be updated to use this feature when possible. This PR covers such updates for java.base. > > Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: > > Fix typo found in code review. Changes in `ResoruceBundle` look good. ------------- Marked as reviewed by naoto (Reviewer). PR: https://git.openjdk.org/jdk/pull/12000 From darcy at openjdk.org Fri Jan 13 22:54:48 2023 From: darcy at openjdk.org (Joe Darcy) Date: Fri, 13 Jan 2023 22:54:48 GMT Subject: RFR: JDK-8300133: Use generalized see and link tags in core libs [v2] In-Reply-To: References: Message-ID: On Fri, 13 Jan 2023 22:38:32 GMT, Naoto Sato wrote: >> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: >> >> Fix typo found in code review. > > src/java.base/share/classes/java/util/ResourceBundle.java line 270: > >> 268: * are packaged in a JAR file. Resource bundle only JAR file can be readily >> 269: * deployed as an {@linkplain java.lang.module.ModuleFinder##automatic-modules >> 270: * automatic module1}. For example, if the JAR file contains the > > Typo: extra `1` Doh! Thanks; fixed in next push. ------------- PR: https://git.openjdk.org/jdk/pull/12000 From jlu at openjdk.org Fri Jan 13 23:20:11 2023 From: jlu at openjdk.org (Justin Lu) Date: Fri, 13 Jan 2023 23:20:11 GMT Subject: [jdk20] Integrated: 8299500: Usage of constructors of primitive wrapper classes should be avoided in java.text API docs In-Reply-To: References: Message-ID: On Fri, 13 Jan 2023 21:53:50 GMT, Justin Lu wrote: > This pull request contains a backport of commit [cd10c727](https://github.com/openjdk/jdk/commit/cd10c7278d8fcf7ce6713a3ee688bb1e10c024f6) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit being backported was authored by Justin Lu on 9 Jan 2023 and was reviewed by Naoto Sato and Lance Andersen. > > Thanks! This pull request has now been integrated. Changeset: 98eae6da Author: Justin Lu Committer: Naoto Sato URL: https://git.openjdk.org/jdk20/commit/98eae6dade075c6e58ad0379d0b3b38b75836994 Stats: 8 lines in 2 files changed: 0 ins; 1 del; 7 mod 8299500: Usage of constructors of primitive wrapper classes should be avoided in java.text API docs Reviewed-by: iris Backport-of: cd10c7278d8fcf7ce6713a3ee688bb1e10c024f6 ------------- PR: https://git.openjdk.org/jdk20/pull/106 From dfuchs at openjdk.org Mon Jan 16 15:14:11 2023 From: dfuchs at openjdk.org (Daniel Fuchs) Date: Mon, 16 Jan 2023 15:14:11 GMT Subject: RFR: JDK-8300133: Use generalized see and link tags in core libs [v2] In-Reply-To: References: Message-ID: On Fri, 13 Jan 2023 22:54:47 GMT, Joe Darcy wrote: >> With generalized see and link tags that can refer to anchors (JDK-8200337), the see and link tags in core libraries should be updated to use this feature when possible. This PR covers such updates for java.base. > > Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: > > Fix typo found in code review. src/java.base/share/classes/java/lang/CharSequence.java line 76: > 74: * > 75: *

If the {@code char} value specified by the index is a > 76: * {@linkplain Character##unicode surrogate}, the surrogate value I didn't know about the `##` trick. Is that a new feature to target an HTML anchor? ------------- PR: https://git.openjdk.org/jdk/pull/12000 From ihse at openjdk.org Mon Jan 16 16:50:06 2023 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Mon, 16 Jan 2023 16:50:06 GMT Subject: RFR: 8298047: Remove all non-significant trailing whitespace from properties files [v2] In-Reply-To: References: Message-ID: > [JDK-8295729](https://bugs.openjdk.org/browse/JDK-8295729) was created in an attempt to remove all trailing whitespace from properties files, and enable a jcheck verification that they did not come back, similar to other source code. It turned out that this was not so simple, however, since trailing whitespace in values is actually significant in properties files. > > To address this, I have opened four bugs on different component teams to either remove the trailing significant whitespace (if it is there erroneously), or convert it to the unicode sequence `\u0020`: [JDK-8298042](https://bugs.openjdk.org/browse/JDK-8298042), [JDK-8298044](https://bugs.openjdk.org/browse/JDK-8298044), [JDK-8298045](https://bugs.openjdk.org/browse/JDK-8298045) and [JDK-8298046](https://bugs.openjdk.org/browse/JDK-8298046). > > That leaves all the other trailing spaces, in blank lines and in the end of comments. These serve no purpose and should just be removed, and is what this issue concerns. > > When this and the four "significant whitespace" bugs are all finally integrated, we can finally turn on the verification in jcheck for properties files as well. > > The changes in this PR is based on [JDK-8295729](https://bugs.openjdk.org/browse/JDK-8295729), in #10792. I have restored all the "delete trailing whitespace" changes, except for those with significance. These changes were in turned created by running `find . -type f -iname "*.properties" | xargs gsed -i -e 's/[ \t]*$//'`. Magnus Ihse Bursie has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: - Merge branch 'master' into properties-eol-clean-safe - 8298047: Remove all non-significant trailing whitespace from properties files ------------- Changes: https://git.openjdk.org/jdk/pull/11491/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11491&range=01 Stats: 693 lines in 264 files changed: 0 ins; 0 del; 693 mod Patch: https://git.openjdk.org/jdk/pull/11491.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11491/head:pull/11491 PR: https://git.openjdk.org/jdk/pull/11491 From ihse at openjdk.org Mon Jan 16 16:52:12 2023 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Mon, 16 Jan 2023 16:52:12 GMT Subject: RFR: 8298047: Remove all non-significant trailing whitespace from properties files In-Reply-To: References: Message-ID: <_jLR_ky5hw9zllvt1MZyi3KWmGOefoRazd7sjzoUivo=.e0bc2d7a-05ad-4417-bc34-369c67c3bf5a@github.com> On Fri, 2 Dec 2022 17:06:23 GMT, Magnus Ihse Bursie wrote: > [JDK-8295729](https://bugs.openjdk.org/browse/JDK-8295729) was created in an attempt to remove all trailing whitespace from properties files, and enable a jcheck verification that they did not come back, similar to other source code. It turned out that this was not so simple, however, since trailing whitespace in values is actually significant in properties files. > > To address this, I have opened four bugs on different component teams to either remove the trailing significant whitespace (if it is there erroneously), or convert it to the unicode sequence `\u0020`: [JDK-8298042](https://bugs.openjdk.org/browse/JDK-8298042), [JDK-8298044](https://bugs.openjdk.org/browse/JDK-8298044), [JDK-8298045](https://bugs.openjdk.org/browse/JDK-8298045) and [JDK-8298046](https://bugs.openjdk.org/browse/JDK-8298046). > > That leaves all the other trailing spaces, in blank lines and in the end of comments. These serve no purpose and should just be removed, and is what this issue concerns. > > When this and the four "significant whitespace" bugs are all finally integrated, we can finally turn on the verification in jcheck for properties files as well. > > The changes in this PR is based on [JDK-8295729](https://bugs.openjdk.org/browse/JDK-8295729), in #10792. I have restored all the "delete trailing whitespace" changes, except for those with significance. These changes were in turned created by running `find . -type f -iname "*.properties" | xargs gsed -i -e 's/[ \t]*$//'`. I know this is boring stuff, but please can I get some more reviews on this? Sergey has reviewed the client parts. It's just removing trailing whitespaces. You should be able to just quickly scroll through this and confirm that this is indeed the case. If someone can take pity on me and just quickly check the non-client parts, I'd be very grateful. ------------- PR: https://git.openjdk.org/jdk/pull/11491 From duke at openjdk.org Mon Jan 16 17:24:17 2023 From: duke at openjdk.org (balcanuc) Date: Mon, 16 Jan 2023 17:24:17 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point [v5] In-Reply-To: References: Message-ID: On Thu, 12 Jan 2023 15:31:03 GMT, Raffaello Giulietti wrote: >> This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. > > Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: > > 8299677: Formatter.format might take a long time to format an integer or floating-point in which JDK versions will the bug-fix back ported? As it is, it is impossible to be back ported to JDK8 ------------- PR: https://git.openjdk.org/jdk/pull/11939 From duke at openjdk.org Mon Jan 16 17:24:20 2023 From: duke at openjdk.org (balcanuc) Date: Mon, 16 Jan 2023 17:24:20 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point [v4] In-Reply-To: References: <9qfrsqAY_WqyeNZzIPRbZ1ZAzIwBeZTYBG3gsimTUJQ=.8fbba88e-3a88-44f7-82ec-e1f02f84301f@github.com> Message-ID: On Thu, 12 Jan 2023 11:40:32 GMT, Sergey Tsypanov wrote: >> Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: >> >> 8299677: Formatter.format might take a long time to format an integer or floating-point > > src/java.base/share/classes/java/util/Formatter.java line 4600: > >> 4598: // apply zero padding >> 4599: if (width > sb.length() && Flags.contains(f, Flags.ZERO_PAD)) { >> 4600: String zeros = Character.toString(zero).repeat(width - sb.length()); > > `Character.toString(zero)` could be replaced directly with `String.valueOf(zero)` saving one more method call is the bug going to be backported to JDK8? Due to the use of 'repeat' this seems to not be possible. ------------- PR: https://git.openjdk.org/jdk/pull/11939 From rriggs at openjdk.org Mon Jan 16 17:25:12 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 16 Jan 2023 17:25:12 GMT Subject: RFR: 8298047: Remove all non-significant trailing whitespace from properties files [v2] In-Reply-To: References: Message-ID: On Mon, 16 Jan 2023 16:50:06 GMT, Magnus Ihse Bursie wrote: >> [JDK-8295729](https://bugs.openjdk.org/browse/JDK-8295729) was created in an attempt to remove all trailing whitespace from properties files, and enable a jcheck verification that they did not come back, similar to other source code. It turned out that this was not so simple, however, since trailing whitespace in values is actually significant in properties files. >> >> To address this, I have opened four bugs on different component teams to either remove the trailing significant whitespace (if it is there erroneously), or convert it to the unicode sequence `\u0020`: [JDK-8298042](https://bugs.openjdk.org/browse/JDK-8298042), [JDK-8298044](https://bugs.openjdk.org/browse/JDK-8298044), [JDK-8298045](https://bugs.openjdk.org/browse/JDK-8298045) and [JDK-8298046](https://bugs.openjdk.org/browse/JDK-8298046). >> >> That leaves all the other trailing spaces, in blank lines and in the end of comments. These serve no purpose and should just be removed, and is what this issue concerns. >> >> When this and the four "significant whitespace" bugs are all finally integrated, we can finally turn on the verification in jcheck for properties files as well. >> >> The changes in this PR is based on [JDK-8295729](https://bugs.openjdk.org/browse/JDK-8295729), in #10792. I have restored all the "delete trailing whitespace" changes, except for those with significance. These changes were in turned created by running `find . -type f -iname "*.properties" | xargs gsed -i -e 's/[ \t]*$//'`. > > Magnus Ihse Bursie has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: > > - Merge branch 'master' into properties-eol-clean-safe > - 8298047: Remove all non-significant trailing whitespace from properties files The non-client parts look fine. ------------- Marked as reviewed by rriggs (Reviewer). PR: https://git.openjdk.org/jdk/pull/11491 From dfuchs at openjdk.org Mon Jan 16 17:33:10 2023 From: dfuchs at openjdk.org (Daniel Fuchs) Date: Mon, 16 Jan 2023 17:33:10 GMT Subject: RFR: JDK-8300133: Use generalized see and link tags in core libs [v2] In-Reply-To: References: Message-ID: On Fri, 13 Jan 2023 22:54:47 GMT, Joe Darcy wrote: >> With generalized see and link tags that can refer to anchors (JDK-8200337), the see and link tags in core libraries should be updated to use this feature when possible. This PR covers such updates for java.base. > > Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: > > Fix typo found in code review. Changes to InetAddressResolverProvider.java look good. ------------- PR: https://git.openjdk.org/jdk/pull/12000 From rriggs at openjdk.org Mon Jan 16 17:33:12 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 16 Jan 2023 17:33:12 GMT Subject: RFR: JDK-8300133: Use generalized see and link tags in core libs [v2] In-Reply-To: References: Message-ID: On Mon, 16 Jan 2023 15:06:25 GMT, Daniel Fuchs wrote: >> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: >> >> Fix typo found in code review. > > src/java.base/share/classes/java/lang/CharSequence.java line 76: > >> 74: * >> 75: *

If the {@code char} value specified by the index is a >> 76: * {@linkplain Character##unicode surrogate}, the surrogate value > > I didn't know about the `##` trick. Is that a new feature to target an HTML anchor? The CSR has a concise description: [JDK-8294195](https://bugs.openjdk.org/browse/JDK-8294195) Generalize see and link tags for user-defined anchors ------------- PR: https://git.openjdk.org/jdk/pull/12000 From rgiulietti at openjdk.org Mon Jan 16 17:53:19 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Mon, 16 Jan 2023 17:53:19 GMT Subject: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point [v5] In-Reply-To: References: Message-ID: On Mon, 16 Jan 2023 17:13:52 GMT, balcanuc wrote: >> Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: >> >> 8299677: Formatter.format might take a long time to format an integer or floating-point > > in which JDK versions will the bug-fix back ported? As it is, it is impossible to be back ported to JDK8 @balcanuc Backporting is done in other, separate projects. Whether changes in mainline are backported, and how, is publicly discussed in the respective mailing lists. In particular, for JDK 8 Updates you might want to have a look at [this mailing list](https://mail.openjdk.org/mailman/listinfo/jdk8u-dev) and the [this git repo](https://github.com/openjdk/jdk8u-dev). If you feel this change is relevant to JDK 8, you are welcome to discuss a solution that does not rely on `repeat()` on that mailing list, and then [contribute](https://openjdk.org/contribute/) your code to the [JDK 8 Update project](https://openjdk.org/projects/jdk8u/). ------------- PR: https://git.openjdk.org/jdk/pull/11939 From ihse at openjdk.org Mon Jan 16 18:57:21 2023 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Mon, 16 Jan 2023 18:57:21 GMT Subject: RFR: 8298047: Remove all non-significant trailing whitespace from properties files [v2] In-Reply-To: References: Message-ID: On Mon, 16 Jan 2023 17:22:36 GMT, Roger Riggs wrote: >> Magnus Ihse Bursie has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: >> >> - Merge branch 'master' into properties-eol-clean-safe >> - 8298047: Remove all non-significant trailing whitespace from properties files > > The non-client parts look fine. @RogerRiggs Thanks! ------------- PR: https://git.openjdk.org/jdk/pull/11491 From ihse at openjdk.org Mon Jan 16 18:57:22 2023 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Mon, 16 Jan 2023 18:57:22 GMT Subject: Integrated: 8298047: Remove all non-significant trailing whitespace from properties files In-Reply-To: References: Message-ID: On Fri, 2 Dec 2022 17:06:23 GMT, Magnus Ihse Bursie wrote: > [JDK-8295729](https://bugs.openjdk.org/browse/JDK-8295729) was created in an attempt to remove all trailing whitespace from properties files, and enable a jcheck verification that they did not come back, similar to other source code. It turned out that this was not so simple, however, since trailing whitespace in values is actually significant in properties files. > > To address this, I have opened four bugs on different component teams to either remove the trailing significant whitespace (if it is there erroneously), or convert it to the unicode sequence `\u0020`: [JDK-8298042](https://bugs.openjdk.org/browse/JDK-8298042), [JDK-8298044](https://bugs.openjdk.org/browse/JDK-8298044), [JDK-8298045](https://bugs.openjdk.org/browse/JDK-8298045) and [JDK-8298046](https://bugs.openjdk.org/browse/JDK-8298046). > > That leaves all the other trailing spaces, in blank lines and in the end of comments. These serve no purpose and should just be removed, and is what this issue concerns. > > When this and the four "significant whitespace" bugs are all finally integrated, we can finally turn on the verification in jcheck for properties files as well. > > The changes in this PR is based on [JDK-8295729](https://bugs.openjdk.org/browse/JDK-8295729), in #10792. I have restored all the "delete trailing whitespace" changes, except for those with significance. These changes were in turned created by running `find . -type f -iname "*.properties" | xargs gsed -i -e 's/[ \t]*$//'`. This pull request has now been integrated. Changeset: 4073b685 Author: Magnus Ihse Bursie URL: https://git.openjdk.org/jdk/commit/4073b68565f9d5283be96ee6b75bab686f076bea Stats: 693 lines in 264 files changed: 0 ins; 0 del; 693 mod 8298047: Remove all non-significant trailing whitespace from properties files Reviewed-by: serb, rriggs ------------- PR: https://git.openjdk.org/jdk/pull/11491 From vsitnikov at openjdk.org Tue Jan 17 11:47:26 2023 From: vsitnikov at openjdk.org (Vladimir Sitnikov) Date: Tue, 17 Jan 2023 11:47:26 GMT Subject: RFR: 8298047: Remove all non-significant trailing whitespace from properties files [v2] In-Reply-To: References: Message-ID: On Mon, 16 Jan 2023 18:52:24 GMT, Magnus Ihse Bursie wrote: >> The non-client parts look fine. > > @RogerRiggs Thanks! @magicus , have you considered adding `.editorconfig` file (see https://editorconfig.org/ ) so it configures developers' editors to trim the whitespace? Of course, `.editorconfig` does not enforce the policy, however, it would make it easier for those who use editors that support `.editorconfig`. For instance, IntelliJ editors support it by default. ------------- PR: https://git.openjdk.org/jdk/pull/11491 From ihse at openjdk.org Tue Jan 17 12:17:25 2023 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Tue, 17 Jan 2023 12:17:25 GMT Subject: RFR: 8298047: Remove all non-significant trailing whitespace from properties files [v2] In-Reply-To: References: Message-ID: On Tue, 17 Jan 2023 11:44:32 GMT, Vladimir Sitnikov wrote: >> @RogerRiggs Thanks! > > @magicus , have you considered adding `.editorconfig` file (see https://editorconfig.org/ ) so it configures developers' editors to trim the whitespace? > > Of course, `.editorconfig` does not enforce the policy, however, it would make it easier for those who use editors that support `.editorconfig`. For instance, IntelliJ editors support it by default. @vlsi That is an interesting suggestion. My experience with `.editorconfig` is that it is a bit so-so about getting it to actually describe the coding practices of a project, but it can probably be used for a thing like stripping trailing whitespace. I suggest we continue that discussion in ide-support-dev at openjdk.org, to figure out exactly what can be added to an `.editorconfig file`, how it interacts with jcheck rules and test how different IDEs behave. ------------- PR: https://git.openjdk.org/jdk/pull/11491 From jlaskey at openjdk.org Tue Jan 17 18:03:39 2023 From: jlaskey at openjdk.org (Jim Laskey) Date: Tue, 17 Jan 2023 18:03:39 GMT Subject: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v34] In-Reply-To: References: Message-ID: <4iErqSLrHHY_Wmv5yztRHFs5v2LGQTjez0TJMfZ_sV0=.0a73c032-240e-4957-ac28-51d93091beae@github.com> On Wed, 11 Jan 2023 14:07:53 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are similar to string literals but contain embedded expressions. A string template is interpreted at run time by replacing each expression with the result of evaluating that expression, possibly after further validation and transformation. This is a [preview language feature and API](http://openjdk.java.net/jeps/12). > > Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: > > Update to JDK 21 Still active. ------------- PR: https://git.openjdk.org/jdk/pull/10889 From naoto at openjdk.org Tue Jan 17 19:27:45 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 17 Jan 2023 19:27:45 GMT Subject: RFR: 8300093: Refactor code examples to use @snippet in java.text.MessageFormat In-Reply-To: <1TQpjbUcl5hz7RVNrXF1AXvc98ooTMP1iA3LxiRmEho=.bb28548d-77d2-4399-ae77-43a45066497f@github.com> References: <1TQpjbUcl5hz7RVNrXF1AXvc98ooTMP1iA3LxiRmEho=.bb28548d-77d2-4399-ae77-43a45066497f@github.com> Message-ID: On Fri, 13 Jan 2023 21:47:40 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.MessageFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/class-use/MessageFormat.html). > > Code examples using

 ... 
blocks are replaced with the @ snippet syntax where applicable. Looks good. One minor nit (not related to your change). src/java.base/share/classes/java/text/MessageFormat.java line 336: > 334: * String forParsing = "x, y, z"; > 335: * Object[] objs = mf.parse(forParsing, new ParsePosition(0)); > 336: * // result now equals {new String("z")} I believe this `result` was meant for `objs`. ------------- PR: https://git.openjdk.org/jdk/pull/12001 From naoto at openjdk.org Tue Jan 17 19:40:25 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 17 Jan 2023 19:40:25 GMT Subject: RFR: 8300093: Refactor code examples to use @snippet in java.text.MessageFormat In-Reply-To: <1TQpjbUcl5hz7RVNrXF1AXvc98ooTMP1iA3LxiRmEho=.bb28548d-77d2-4399-ae77-43a45066497f@github.com> References: <1TQpjbUcl5hz7RVNrXF1AXvc98ooTMP1iA3LxiRmEho=.bb28548d-77d2-4399-ae77-43a45066497f@github.com> Message-ID: On Fri, 13 Jan 2023 21:47:40 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.MessageFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/class-use/MessageFormat.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. Marked as reviewed by naoto (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/12001 From naoto at openjdk.org Tue Jan 17 19:40:29 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 17 Jan 2023 19:40:29 GMT Subject: RFR: 8300093: Refactor code examples to use @snippet in java.text.MessageFormat In-Reply-To: References: <1TQpjbUcl5hz7RVNrXF1AXvc98ooTMP1iA3LxiRmEho=.bb28548d-77d2-4399-ae77-43a45066497f@github.com> Message-ID: On Tue, 17 Jan 2023 19:24:09 GMT, Naoto Sato wrote: >> This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.MessageFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/class-use/MessageFormat.html). >> >> Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. > > src/java.base/share/classes/java/text/MessageFormat.java line 336: > >> 334: * String forParsing = "x, y, z"; >> 335: * Object[] objs = mf.parse(forParsing, new ParsePosition(0)); >> 336: * // result now equals {new String("z")} > > I believe this `result` was meant for `objs`. Ah, this PR is already `/integated`. You can fix it at a later time. ------------- PR: https://git.openjdk.org/jdk/pull/12001 From jlu at openjdk.org Tue Jan 17 19:44:35 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 17 Jan 2023 19:44:35 GMT Subject: Integrated: 8300093: Refactor code examples to use @snippet in java.text.MessageFormat In-Reply-To: <1TQpjbUcl5hz7RVNrXF1AXvc98ooTMP1iA3LxiRmEho=.bb28548d-77d2-4399-ae77-43a45066497f@github.com> References: <1TQpjbUcl5hz7RVNrXF1AXvc98ooTMP1iA3LxiRmEho=.bb28548d-77d2-4399-ae77-43a45066497f@github.com> Message-ID: On Fri, 13 Jan 2023 21:47:40 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.MessageFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/class-use/MessageFormat.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. This pull request has now been integrated. Changeset: ade08e19 Author: Justin Lu Committer: Naoto Sato URL: https://git.openjdk.org/jdk/commit/ade08e190cc28cf0ce0194fa3fb67e48dc634e07 Stats: 24 lines in 1 file changed: 12 ins; 0 del; 12 mod 8300093: Refactor code examples to use @snippet in java.text.MessageFormat Reviewed-by: iris, naoto ------------- PR: https://git.openjdk.org/jdk/pull/12001 From jlu at openjdk.org Tue Jan 17 21:39:00 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 17 Jan 2023 21:39:00 GMT Subject: RFR: 8300308: java.text.MessageFormat has incorrect doc comment Message-ID: A code example for text.MessageFormat under the **Usage Information** section has a comment with the wrong variable name. * Object[] objs = mf.parse(forParsing, new ParsePosition(0)); * // result now equals {new String("z")} The name of the intended variable should be `objs`, not `result` ------------- Commit messages: - Fix conflicts - Use correct variable (objs) Changes: https://git.openjdk.org/jdk/pull/12050/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12050&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8300308 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/12050.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12050/head:pull/12050 PR: https://git.openjdk.org/jdk/pull/12050 From naoto at openjdk.org Tue Jan 17 21:44:36 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 17 Jan 2023 21:44:36 GMT Subject: RFR: 8300308: java.text.MessageFormat has incorrect doc comment In-Reply-To: References: Message-ID: <3JznI-ESZg-WX4i12gztnolVHAPORqmjSdv-tGog8PA=.6ea03d9c-a6cc-4347-9406-fd9672f1be1b@github.com> On Tue, 17 Jan 2023 21:28:23 GMT, Justin Lu wrote: > A code example for text.MessageFormat under the **Usage Information** section has a comment with the wrong variable name. > > > * Object[] objs = mf.parse(forParsing, new ParsePosition(0)); > * // result now equals {new String("z")} > > > The name of the intended variable should be `objs`, not `result` Marked as reviewed by naoto (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/12050 From jlu at openjdk.org Tue Jan 17 22:00:29 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 17 Jan 2023 22:00:29 GMT Subject: RFR: 8300308: java.text.MessageFormat has incorrect doc comment [v2] In-Reply-To: References: Message-ID: <70oVIgoIIfc0228rKPgYlEx_K77aJILdGyT3JUI7BqQ=.59baf97e-b295-4230-9fdf-569801784763@github.com> > A code example for text.MessageFormat under the **Usage Information** section has a comment with the wrong variable name. > > > * Object[] objs = mf.parse(forParsing, new ParsePosition(0)); > * // result now equals {new String("z")} > > > The name of the intended variable should be `objs`, not `result` Justin Lu has updated the pull request incrementally with two additional commits since the last revision: - Add missing semicolons - Swap to use snippet ------------- Changes: - all: https://git.openjdk.org/jdk/pull/12050/files - new: https://git.openjdk.org/jdk/pull/12050/files/60994b91..130127bd Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=12050&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12050&range=00-01 Stats: 21 lines in 1 file changed: 0 ins; 0 del; 21 mod Patch: https://git.openjdk.org/jdk/pull/12050.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12050/head:pull/12050 PR: https://git.openjdk.org/jdk/pull/12050 From jlu at openjdk.org Tue Jan 17 22:00:31 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 17 Jan 2023 22:00:31 GMT Subject: Withdrawn: 8300308: java.text.MessageFormat has incorrect doc comment In-Reply-To: References: Message-ID: On Tue, 17 Jan 2023 21:28:23 GMT, Justin Lu wrote: > A code example for text.MessageFormat under the **Usage Information** section has a comment with the wrong variable name. > > > * Object[] objs = mf.parse(forParsing, new ParsePosition(0)); > * // result now equals {new String("z")} > > > The name of the intended variable should be `objs`, not `result` This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/12050 From jlu at openjdk.org Tue Jan 17 22:44:23 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 17 Jan 2023 22:44:23 GMT Subject: RFR: 8300307: Refactor code examples to use @snippet in java.text.DateFormat Message-ID: This PR implements JEP 413: Code Snippets in Java API Documentation for [java.text.DateFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/DateFormat.html). Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. Additionally, missing semi colons were added in the code examples ------------- Commit messages: - Use snippets, add missing semicolons Changes: https://git.openjdk.org/jdk/pull/12053/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12053&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8300307 Stats: 21 lines in 1 file changed: 0 ins; 0 del; 21 mod Patch: https://git.openjdk.org/jdk/pull/12053.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12053/head:pull/12053 PR: https://git.openjdk.org/jdk/pull/12053 From jlu at openjdk.org Tue Jan 17 22:47:21 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 17 Jan 2023 22:47:21 GMT Subject: RFR: 8300308: java.text.MessageFormat has incorrect doc comment [v2] In-Reply-To: <70oVIgoIIfc0228rKPgYlEx_K77aJILdGyT3JUI7BqQ=.59baf97e-b295-4230-9fdf-569801784763@github.com> References: <70oVIgoIIfc0228rKPgYlEx_K77aJILdGyT3JUI7BqQ=.59baf97e-b295-4230-9fdf-569801784763@github.com> Message-ID: <0z9_KMEzFH55yku1SQI0J3FEB4IymzPwZwnYBahESs8=.32bb241b-cce2-41f2-a884-0089f8cf75f5@github.com> On Tue, 17 Jan 2023 22:00:29 GMT, Justin Lu wrote: >> A code example for text.MessageFormat under the **Usage Information** section has a comment with the wrong variable name. >> >> >> * Object[] objs = mf.parse(forParsing, new ParsePosition(0)); >> * // result now equals {new String("z")} >> >> >> The name of the intended variable should be `objs`, not `result` > > Justin Lu has updated the pull request incrementally with two additional commits since the last revision: > > - Add missing semicolons > - Swap to use snippet Closed, please refer to https://github.com/openjdk/jdk/pull/12054 ------------- PR: https://git.openjdk.org/jdk/pull/12050 From lancea at openjdk.org Tue Jan 17 22:49:16 2023 From: lancea at openjdk.org (Lance Andersen) Date: Tue, 17 Jan 2023 22:49:16 GMT Subject: RFR: 8300307: Refactor code examples to use @snippet in java.text.DateFormat In-Reply-To: References: Message-ID: On Tue, 17 Jan 2023 22:35:54 GMT, Justin Lu wrote: > This PR implements JEP 413: Code Snippets in Java API Documentation for [java.text.DateFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/DateFormat.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. > > Additionally, missing semi colons were added in the code examples Marked as reviewed by lancea (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/12053 From jlu at openjdk.org Tue Jan 17 22:55:45 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 17 Jan 2023 22:55:45 GMT Subject: RFR: 8300308: java.text.MessageFormat has incorrect doc comment Message-ID: A code example for text.MessageFormat under the **Usage Information** section has a comment with the wrong variable name. * Object[] objs = mf.parse(forParsing, new ParsePosition(0)); * // result now equals {new String("z")} The name of the intended variable should be `objs`, not `result` ------------- Commit messages: - Revert - Add missing semicolons - Swap to use snippet - Fix conflicts - Use correct variable (objs) Changes: https://git.openjdk.org/jdk/pull/12054/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12054&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8300308 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/12054.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12054/head:pull/12054 PR: https://git.openjdk.org/jdk/pull/12054 From naoto at openjdk.org Tue Jan 17 22:55:46 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 17 Jan 2023 22:55:46 GMT Subject: RFR: 8300308: java.text.MessageFormat has incorrect doc comment In-Reply-To: References: Message-ID: <96EOcwVTWbMtLGjdAdrUmwvUodcgpHziHZ-1K1qH-6c=.085eeb7a-4ecb-4502-9733-3b2b7a9bd0a0@github.com> On Tue, 17 Jan 2023 22:44:29 GMT, Justin Lu wrote: > A code example for text.MessageFormat under the **Usage Information** section has a comment with the wrong variable name. > > > * Object[] objs = mf.parse(forParsing, new ParsePosition(0)); > * // result now equals {new String("z")} > > > The name of the intended variable should be `objs`, not `result` Marked as reviewed by naoto (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/12054 From iris at openjdk.org Tue Jan 17 22:56:42 2023 From: iris at openjdk.org (Iris Clark) Date: Tue, 17 Jan 2023 22:56:42 GMT Subject: RFR: 8300307: Refactor code examples to use @snippet in java.text.DateFormat In-Reply-To: References: Message-ID: On Tue, 17 Jan 2023 22:35:54 GMT, Justin Lu wrote: > This PR implements JEP 413: Code Snippets in Java API Documentation for [java.text.DateFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/DateFormat.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. > > Additionally, missing semi colons were added in the code examples Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/12053 From lancea at openjdk.org Tue Jan 17 23:06:46 2023 From: lancea at openjdk.org (Lance Andersen) Date: Tue, 17 Jan 2023 23:06:46 GMT Subject: RFR: 8300308: java.text.MessageFormat has incorrect doc comment In-Reply-To: References: Message-ID: <8NPD3XhUCjyiEt9d4_wuu-AcHnVHtiuKdod7FWnP0ms=.49009600-9280-4c75-8594-9a56251c4893@github.com> On Tue, 17 Jan 2023 22:44:29 GMT, Justin Lu wrote: > A code example for text.MessageFormat under the **Usage Information** section has a comment with the wrong variable name. > > > * Object[] objs = mf.parse(forParsing, new ParsePosition(0)); > * // result now equals {new String("z")} > > > The name of the intended variable should be `objs`, not `result` Marked as reviewed by lancea (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/12054 From naoto at openjdk.org Tue Jan 17 23:36:24 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 17 Jan 2023 23:36:24 GMT Subject: RFR: 8300307: Refactor code examples to use @snippet in java.text.DateFormat In-Reply-To: References: Message-ID: On Tue, 17 Jan 2023 22:35:54 GMT, Justin Lu wrote: > This PR implements JEP 413: Code Snippets in Java API Documentation for [java.text.DateFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/DateFormat.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. > > Additionally, missing semi colons were added in the code examples Marked as reviewed by naoto (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/12053 From jlu at openjdk.org Tue Jan 17 23:51:22 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 17 Jan 2023 23:51:22 GMT Subject: RFR: 8300356: Refactor code examples to use @snippet in java.text.CollationElementIterator Message-ID: This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.CollationElementIterator](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationElementIterator.html). Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. Additionally, removed a floating colon in the code example ------------- Commit messages: - Spacing and floating colon removal - Switch to snippet Changes: https://git.openjdk.org/jdk/pull/12055/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12055&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8300356 Stats: 12 lines in 1 file changed: 0 ins; 2 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/12055.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12055/head:pull/12055 PR: https://git.openjdk.org/jdk/pull/12055 From jlu at openjdk.org Tue Jan 17 23:51:23 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 17 Jan 2023 23:51:23 GMT Subject: RFR: 8300356: Refactor code examples to use @snippet in java.text.CollationElementIterator In-Reply-To: References: Message-ID: On Tue, 17 Jan 2023 23:14:53 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.CollationElementIterator](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationElementIterator.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. > > > Additionally, removed a floating colon in the code example src/java.base/share/classes/java/text/CollationElementIterator.java line 87: > 85: * CollationElementIterator collationElementIterator = ruleBasedCollator.getCollationElementIterator(testString); > 86: * int primaryOrder = CollationElementIterator.primaryOrder(collationElementIterator.next()); > 87: * : I believe this is a typo, and have removed it ------------- PR: https://git.openjdk.org/jdk/pull/12055 From naoto at openjdk.org Tue Jan 17 23:58:21 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 17 Jan 2023 23:58:21 GMT Subject: RFR: 8300356: Refactor code examples to use @snippet in java.text.CollationElementIterator In-Reply-To: References: Message-ID: On Tue, 17 Jan 2023 23:15:26 GMT, Justin Lu wrote: >> This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.CollationElementIterator](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationElementIterator.html). >> >> Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. >> >> >> Additionally, removed a floating colon in the code example > > src/java.base/share/classes/java/text/CollationElementIterator.java line 87: > >> 85: * CollationElementIterator collationElementIterator = ruleBasedCollator.getCollationElementIterator(testString); >> 86: * int primaryOrder = CollationElementIterator.primaryOrder(collationElementIterator.next()); >> 87: * : > > I believe this is a typo, and have removed it My guess is that this was meant as a vertical ellipsis, so instead of removing it, you can replace it with `?`. ------------- PR: https://git.openjdk.org/jdk/pull/12055 From naoto at openjdk.org Wed Jan 18 00:01:34 2023 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 18 Jan 2023 00:01:34 GMT Subject: RFR: 8300356: Refactor code examples to use @snippet in java.text.CollationElementIterator In-Reply-To: References: Message-ID: On Tue, 17 Jan 2023 23:14:53 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.CollationElementIterator](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationElementIterator.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. > > > Additionally, removed a floating colon in the code example src/java.base/share/classes/java/text/CollationElementIterator.java line 82: > 80: * String testString = "This is a test"; > 81: * Collator col = Collator.getInstance(); > 82: * if (col instanceof RuleBasedCollator) { I'd use the pattern matching `instanceof` here ------------- PR: https://git.openjdk.org/jdk/pull/12055 From redestad at openjdk.org Wed Jan 18 11:12:58 2023 From: redestad at openjdk.org (Claes Redestad) Date: Wed, 18 Jan 2023 11:12:58 GMT Subject: RFR: 8300489: Use ArraysSupport.vectorizedHashCode in j.l.CharacterName Message-ID: <_MBuyd4RUJQZ3Z-5lARtGlrYDGvgLDKqpjzSnRo7OgY=.f659e4c1-09bc-4f09-bd14-9b8851253c05@github.com> This patch makes use of `ArraysSupport.vectorizedHashCode` and helps verify the performance win also for range-based hash calculations. Also modernized and cleaned up the surrounding code somewhat. Benchmark Mode Cnt Score Error Units Characters.CodePoints.codePointOf avgt 15 153.753 ? 6.119 ns/op Characters.CodePoints.codePointOf avgt 15 134.753 ? 4.386 ns/op # after, 1.14x For C1 and C2 on non-x86 platforms the performance is neutral. Interpreter sees a 1-2% regression due a few added calls. ------------- Commit messages: - 8300489: Use ArraysSupport.vectorizedHashCode in j.l.CharacterName Changes: https://git.openjdk.org/jdk/pull/12068/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12068&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8300489 Stats: 30 lines in 2 files changed: 15 ins; 5 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/12068.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12068/head:pull/12068 PR: https://git.openjdk.org/jdk/pull/12068 From alanb at openjdk.org Wed Jan 18 16:25:16 2023 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 18 Jan 2023 16:25:16 GMT Subject: RFR: 8300489: Use ArraysSupport.vectorizedHashCode in j.l.CharacterName In-Reply-To: <_MBuyd4RUJQZ3Z-5lARtGlrYDGvgLDKqpjzSnRo7OgY=.f659e4c1-09bc-4f09-bd14-9b8851253c05@github.com> References: <_MBuyd4RUJQZ3Z-5lARtGlrYDGvgLDKqpjzSnRo7OgY=.f659e4c1-09bc-4f09-bd14-9b8851253c05@github.com> Message-ID: On Wed, 18 Jan 2023 11:04:57 GMT, Claes Redestad wrote: > This patch makes use of `ArraysSupport.vectorizedHashCode` and helps verify the performance win also for range-based hash calculations. Also modernized and cleaned up the surrounding code somewhat. > > > Benchmark Mode Cnt Score Error Units > Characters.CodePoints.codePointOf avgt 15 153.753 ? 6.119 ns/op > Characters.CodePoints.codePointOf avgt 15 134.753 ? 4.386 ns/op # after, 1.14x > > > For C1 and C2 on non-x86 platforms the performance is neutral. Interpreter sees a 1-2% regression due a few added calls. Marked as reviewed by alanb (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/12068 From naoto at openjdk.org Wed Jan 18 17:10:16 2023 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 18 Jan 2023 17:10:16 GMT Subject: RFR: 8300489: Use ArraysSupport.vectorizedHashCode in j.l.CharacterName In-Reply-To: <_MBuyd4RUJQZ3Z-5lARtGlrYDGvgLDKqpjzSnRo7OgY=.f659e4c1-09bc-4f09-bd14-9b8851253c05@github.com> References: <_MBuyd4RUJQZ3Z-5lARtGlrYDGvgLDKqpjzSnRo7OgY=.f659e4c1-09bc-4f09-bd14-9b8851253c05@github.com> Message-ID: On Wed, 18 Jan 2023 11:04:57 GMT, Claes Redestad wrote: > This patch makes use of `ArraysSupport.vectorizedHashCode` and helps verify the performance win also for range-based hash calculations. Also modernized and cleaned up the surrounding code somewhat. > > > Benchmark Mode Cnt Score Error Units > Characters.CodePoints.codePointOf avgt 15 153.753 ? 6.119 ns/op > Characters.CodePoints.codePointOf avgt 15 134.753 ? 4.386 ns/op # after, 1.14x > > > For C1 and C2 on non-x86 platforms the performance is neutral. Interpreter sees a 1-2% regression due a few added calls. Marked as reviewed by naoto (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/12068 From redestad at openjdk.org Wed Jan 18 17:42:22 2023 From: redestad at openjdk.org (Claes Redestad) Date: Wed, 18 Jan 2023 17:42:22 GMT Subject: RFR: 8300489: Use ArraysSupport.vectorizedHashCode in j.l.CharacterName In-Reply-To: <_MBuyd4RUJQZ3Z-5lARtGlrYDGvgLDKqpjzSnRo7OgY=.f659e4c1-09bc-4f09-bd14-9b8851253c05@github.com> References: <_MBuyd4RUJQZ3Z-5lARtGlrYDGvgLDKqpjzSnRo7OgY=.f659e4c1-09bc-4f09-bd14-9b8851253c05@github.com> Message-ID: <0zvcOU207xe9dR8QJeo1Y4sQQu2AkFSPlfMwQKWHQ18=.bf3f3529-d21f-4983-9ec4-d30a567fbdb9@github.com> On Wed, 18 Jan 2023 11:04:57 GMT, Claes Redestad wrote: > This patch makes use of `ArraysSupport.vectorizedHashCode` and helps verify the performance win also for range-based hash calculations. Also modernized and cleaned up the surrounding code somewhat. > > > Benchmark Mode Cnt Score Error Units > Characters.CodePoints.codePointOf avgt 15 153.753 ? 6.119 ns/op > Characters.CodePoints.codePointOf avgt 15 134.753 ? 4.386 ns/op # after, 1.14x > > > For C1 and C2 on non-x86 platforms the performance is neutral. Interpreter sees a 1-2% regression due a few added calls. Thanks for reviewing! ------------- PR: https://git.openjdk.org/jdk/pull/12068 From redestad at openjdk.org Wed Jan 18 17:42:23 2023 From: redestad at openjdk.org (Claes Redestad) Date: Wed, 18 Jan 2023 17:42:23 GMT Subject: Integrated: 8300489: Use ArraysSupport.vectorizedHashCode in j.l.CharacterName In-Reply-To: <_MBuyd4RUJQZ3Z-5lARtGlrYDGvgLDKqpjzSnRo7OgY=.f659e4c1-09bc-4f09-bd14-9b8851253c05@github.com> References: <_MBuyd4RUJQZ3Z-5lARtGlrYDGvgLDKqpjzSnRo7OgY=.f659e4c1-09bc-4f09-bd14-9b8851253c05@github.com> Message-ID: On Wed, 18 Jan 2023 11:04:57 GMT, Claes Redestad wrote: > This patch makes use of `ArraysSupport.vectorizedHashCode` and helps verify the performance win also for range-based hash calculations. Also modernized and cleaned up the surrounding code somewhat. > > > Benchmark Mode Cnt Score Error Units > Characters.CodePoints.codePointOf avgt 15 153.753 ? 6.119 ns/op > Characters.CodePoints.codePointOf avgt 15 134.753 ? 4.386 ns/op # after, 1.14x > > > For C1 and C2 on non-x86 platforms the performance is neutral. Interpreter sees a 1-2% regression due a few added calls. This pull request has now been integrated. Changeset: 3ea0b8bc Author: Claes Redestad URL: https://git.openjdk.org/jdk/commit/3ea0b8bc253f1498895a879681406ecc15f37afb Stats: 30 lines in 2 files changed: 15 ins; 5 del; 10 mod 8300489: Use ArraysSupport.vectorizedHashCode in j.l.CharacterName Reviewed-by: alanb, naoto ------------- PR: https://git.openjdk.org/jdk/pull/12068 From jlu at openjdk.org Wed Jan 18 18:35:34 2023 From: jlu at openjdk.org (Justin Lu) Date: Wed, 18 Jan 2023 18:35:34 GMT Subject: RFR: 8300356: Refactor code examples to use @snippet in java.text.CollationElementIterator [v2] In-Reply-To: References: Message-ID: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.CollationElementIterator](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationElementIterator.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. > > > Additionally, removed a floating colon in the code example Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Replace conversion cast w/ pattern matching instaceOf ------------- Changes: - all: https://git.openjdk.org/jdk/pull/12055/files - new: https://git.openjdk.org/jdk/pull/12055/files/be291cbc..20c18209 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=12055&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12055&range=00-01 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/12055.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12055/head:pull/12055 PR: https://git.openjdk.org/jdk/pull/12055 From smarks at openjdk.org Wed Jan 18 18:50:16 2023 From: smarks at openjdk.org (Stuart Marks) Date: Wed, 18 Jan 2023 18:50:16 GMT Subject: RFR: JDK-8300133: Use generalized see and link tags in core libs [v2] In-Reply-To: References: Message-ID: On Fri, 13 Jan 2023 22:54:47 GMT, Joe Darcy wrote: >> With generalized see and link tags that can refer to anchors (JDK-8200337), the see and link tags in core libraries should be updated to use this feature when possible. This PR covers such updates for java.base. > > Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: > > Fix typo found in code review. Changes in collections look good. I think there are a bunch of other places where this could be used, but fixing up optional-restrictions is a good start. ------------- Marked as reviewed by smarks (Reviewer). PR: https://git.openjdk.org/jdk/pull/12000 From darcy at openjdk.org Wed Jan 18 18:57:23 2023 From: darcy at openjdk.org (Joe Darcy) Date: Wed, 18 Jan 2023 18:57:23 GMT Subject: Integrated: JDK-8300133: Use generalized see and link tags in core libs In-Reply-To: References: Message-ID: On Fri, 13 Jan 2023 21:30:06 GMT, Joe Darcy wrote: > With generalized see and link tags that can refer to anchors (JDK-8200337), the see and link tags in core libraries should be updated to use this feature when possible. This PR covers such updates for java.base. This pull request has now been integrated. Changeset: 7bf0d146 Author: Joe Darcy URL: https://git.openjdk.org/jdk/commit/7bf0d1465e73d83aae30f1cd9fd318af9e9c1b70 Stats: 107 lines in 10 files changed: 0 ins; 19 del; 88 mod 8300133: Use generalized see and link tags in core libs Reviewed-by: jjg, mchung, naoto, smarks ------------- PR: https://git.openjdk.org/jdk/pull/12000 From jlu at openjdk.org Wed Jan 18 19:02:38 2023 From: jlu at openjdk.org (Justin Lu) Date: Wed, 18 Jan 2023 19:02:38 GMT Subject: RFR: 8300356: Refactor code examples to use @snippet in java.text.CollationElementIterator [v3] In-Reply-To: References: Message-ID: On Tue, 17 Jan 2023 23:58:39 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional commit since the last revision: >> >> Add unicode vertical ellipsis > > src/java.base/share/classes/java/text/CollationElementIterator.java line 82: > >> 80: * String testString = "This is a test"; >> 81: * Collator col = Collator.getInstance(); >> 82: * if (col instanceof RuleBasedCollator) { > > I'd use the pattern matching `instanceof` here Replaced the casting conversion with the pattern matching as you suggested, thank you ------------- PR: https://git.openjdk.org/jdk/pull/12055 From jlu at openjdk.org Wed Jan 18 19:02:39 2023 From: jlu at openjdk.org (Justin Lu) Date: Wed, 18 Jan 2023 19:02:39 GMT Subject: RFR: 8300356: Refactor code examples to use @snippet in java.text.CollationElementIterator [v3] In-Reply-To: References: Message-ID: On Tue, 17 Jan 2023 23:55:41 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/text/CollationElementIterator.java line 87: >> >>> 85: * CollationElementIterator collationElementIterator = ruleBasedCollator.getCollationElementIterator(testString); >>> 86: * int primaryOrder = CollationElementIterator.primaryOrder(collationElementIterator.next()); >>> 87: * : >> >> I believe this is a typo, and have removed it > > My guess is that this was meant as a vertical ellipsis, so instead of removing it, you can replace it with `?`. Makes sense, replaced it with `\u22ee` as you suggested and it displays `?` properly when the docs are compiled. ------------- PR: https://git.openjdk.org/jdk/pull/12055 From jlu at openjdk.org Wed Jan 18 19:02:36 2023 From: jlu at openjdk.org (Justin Lu) Date: Wed, 18 Jan 2023 19:02:36 GMT Subject: RFR: 8300356: Refactor code examples to use @snippet in java.text.CollationElementIterator [v3] In-Reply-To: References: Message-ID: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.CollationElementIterator](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationElementIterator.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. > > > Additionally, removed a floating colon in the code example Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Add unicode vertical ellipsis ------------- Changes: - all: https://git.openjdk.org/jdk/pull/12055/files - new: https://git.openjdk.org/jdk/pull/12055/files/20c18209..d559be78 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=12055&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12055&range=01-02 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/12055.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12055/head:pull/12055 PR: https://git.openjdk.org/jdk/pull/12055 From naoto at openjdk.org Wed Jan 18 19:14:18 2023 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 18 Jan 2023 19:14:18 GMT Subject: RFR: 8300356: Refactor code examples to use @snippet in java.text.CollationElementIterator [v3] In-Reply-To: References: Message-ID: On Wed, 18 Jan 2023 19:02:36 GMT, Justin Lu wrote: >> This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.CollationElementIterator](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationElementIterator.html). >> >> Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. >> >> >> Additionally, removed a floating colon in the code example > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Add unicode vertical ellipsis Marked as reviewed by naoto (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/12055 From jlu at openjdk.org Wed Jan 18 23:13:35 2023 From: jlu at openjdk.org (Justin Lu) Date: Wed, 18 Jan 2023 23:13:35 GMT Subject: Integrated: 8300307: Refactor code examples to use @snippet in java.text.DateFormat In-Reply-To: References: Message-ID: <_m4XMsnel8gi7FfVjoyduNo6-ATFHdwi7tsoFMLjdB8=.1eb27257-3f39-4fbe-bfb4-ea9c56a26cf3@github.com> On Tue, 17 Jan 2023 22:35:54 GMT, Justin Lu wrote: > This PR implements JEP 413: Code Snippets in Java API Documentation for [java.text.DateFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/DateFormat.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. > > Additionally, missing semi colons were added in the code examples This pull request has now been integrated. Changeset: dfe94b89 Author: Justin Lu Committer: Naoto Sato URL: https://git.openjdk.org/jdk/commit/dfe94b89f82a6a43e2f563bcf93cf5a13930c44e Stats: 21 lines in 1 file changed: 0 ins; 0 del; 21 mod 8300307: Refactor code examples to use @snippet in java.text.DateFormat Reviewed-by: lancea, iris, naoto ------------- PR: https://git.openjdk.org/jdk/pull/12053 From jlu at openjdk.org Wed Jan 18 23:14:34 2023 From: jlu at openjdk.org (Justin Lu) Date: Wed, 18 Jan 2023 23:14:34 GMT Subject: Integrated: 8300308: java.text.MessageFormat has incorrect doc comment In-Reply-To: References: Message-ID: <3Hi4E4IWRxOvIH5yNX4HdCpBJBZAetuEPtUTD1dIVmM=.57cc140e-db79-4db3-a8a5-d5048b3d42ac@github.com> On Tue, 17 Jan 2023 22:44:29 GMT, Justin Lu wrote: > A code example for text.MessageFormat under the **Usage Information** section has a comment with the wrong variable name. > > > * Object[] objs = mf.parse(forParsing, new ParsePosition(0)); > * // result now equals {new String("z")} > > > The name of the intended variable should be `objs`, not `result` This pull request has now been integrated. Changeset: 31a2e02a Author: Justin Lu Committer: Naoto Sato URL: https://git.openjdk.org/jdk/commit/31a2e02afcf4853f71925ec75a9a6427b08b4cbd Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8300308: java.text.MessageFormat has incorrect doc comment Reviewed-by: naoto, lancea ------------- PR: https://git.openjdk.org/jdk/pull/12054 From jlu at openjdk.org Thu Jan 19 22:34:02 2023 From: jlu at openjdk.org (Justin Lu) Date: Thu, 19 Jan 2023 22:34:02 GMT Subject: RFR: 8300589: Use @snippet and @linkplain in java.text.CollationKey and java.text.CompactNumberFormat Message-ID: This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.CollationKey](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationKey.html) and [java.text.CompactNumberFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CompactNumberFormat.html). Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. Additionally, for [java.text.CompactNumberFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CompactNumberFormat.html) internal plain text links using
... are replaced with @ linkplain. (External links are kept the same) ------------- Commit messages: - Use linkplain for plain text internal links - Swap to snippet Changes: https://git.openjdk.org/jdk/pull/12108/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12108&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8300589 Stats: 15 lines in 2 files changed: 0 ins; 0 del; 15 mod Patch: https://git.openjdk.org/jdk/pull/12108.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12108/head:pull/12108 PR: https://git.openjdk.org/jdk/pull/12108 From jlu at openjdk.org Thu Jan 19 22:38:51 2023 From: jlu at openjdk.org (Justin Lu) Date: Thu, 19 Jan 2023 22:38:51 GMT Subject: Integrated: 8300356: Refactor code examples to use @snippet in java.text.CollationElementIterator In-Reply-To: References: Message-ID: On Tue, 17 Jan 2023 23:14:53 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.CollationElementIterator](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationElementIterator.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. > > > Additionally, removed a floating colon in the code example This pull request has now been integrated. Changeset: fbbb27e7 Author: Justin Lu Committer: Naoto Sato URL: https://git.openjdk.org/jdk/commit/fbbb27e77085c346a251e75527af8b21e76f7fc5 Stats: 12 lines in 1 file changed: 0 ins; 2 del; 10 mod 8300356: Refactor code examples to use @snippet in java.text.CollationElementIterator Reviewed-by: naoto ------------- PR: https://git.openjdk.org/jdk/pull/12055 From lancea at openjdk.org Thu Jan 19 22:53:30 2023 From: lancea at openjdk.org (Lance Andersen) Date: Thu, 19 Jan 2023 22:53:30 GMT Subject: RFR: 8300589: Use @snippet and @linkplain in java.text.CollationKey and java.text.CompactNumberFormat In-Reply-To: References: Message-ID: On Thu, 19 Jan 2023 22:25:51 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.CollationKey](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationKey.html) and [java.text.CompactNumberFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CompactNumberFormat.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. > > Additionally, for [java.text.CompactNumberFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CompactNumberFormat.html) internal plain text links using ... are replaced with @ linkplain. (External links are kept the same) Marked as reviewed by lancea (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/12108 From naoto at openjdk.org Thu Jan 19 23:24:41 2023 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 19 Jan 2023 23:24:41 GMT Subject: RFR: 8300589: Use @snippet and @linkplain in java.text.CollationKey and java.text.CompactNumberFormat In-Reply-To: References: Message-ID: On Thu, 19 Jan 2023 22:25:51 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.CollationKey](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationKey.html) and [java.text.CompactNumberFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CompactNumberFormat.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. > > Additionally, for [java.text.CompactNumberFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CompactNumberFormat.html) internal plain text links using ... are replaced with @ linkplain. (External links are kept the same) Looks good. Minor suggestions follow. src/java.base/share/classes/java/text/CompactNumberFormat.java line 387: > 385: * @param symbols the set of symbols to be used > 386: * @param compactPatterns an array of > 387: * {@linkplain CompactNumberFormat##compact_number_patterns Can eliminate `CompactNumberFormat` here. src/java.base/share/classes/java/text/CompactNumberFormat.java line 415: > 413: * @param symbols the set of symbols to be used > 414: * @param compactPatterns an array of > 415: * {@linkplain CompactNumberFormat##compact_number_patterns Same as above. ------------- PR: https://git.openjdk.org/jdk/pull/12108 From jlu at openjdk.org Thu Jan 19 23:29:07 2023 From: jlu at openjdk.org (Justin Lu) Date: Thu, 19 Jan 2023 23:29:07 GMT Subject: RFR: 8300589: Use @snippet and @linkplain in java.text.CollationKey and java.text.CompactNumberFormat In-Reply-To: References: Message-ID: <_mm0YTshrJ-ORuMA8TQYvAvIZQujtuMmFNcnmQ_xdm4=.944b2a8a-cdc5-4d93-b4a5-7a8787af1300@github.com> On Thu, 19 Jan 2023 23:20:52 GMT, Naoto Sato wrote: >> This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.CollationKey](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationKey.html) and [java.text.CompactNumberFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CompactNumberFormat.html). >> >> Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. >> >> Additionally, for [java.text.CompactNumberFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CompactNumberFormat.html) internal plain text links using ... are replaced with @ linkplain. (External links are kept the same) > > src/java.base/share/classes/java/text/CompactNumberFormat.java line 387: > >> 385: * @param symbols the set of symbols to be used >> 386: * @param compactPatterns an array of >> 387: * {@linkplain CompactNumberFormat##compact_number_patterns > > Can eliminate `CompactNumberFormat` here. Ah good point, it's the same file. Will make the change, thanks! ------------- PR: https://git.openjdk.org/jdk/pull/12108 From jlu at openjdk.org Fri Jan 20 17:31:26 2023 From: jlu at openjdk.org (Justin Lu) Date: Fri, 20 Jan 2023 17:31:26 GMT Subject: RFR: 8300589: Use @snippet and @linkplain in java.text.CollationKey and java.text.CompactNumberFormat [v2] In-Reply-To: References: Message-ID: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.CollationKey](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationKey.html) and [java.text.CompactNumberFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CompactNumberFormat.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. > > Additionally, for [java.text.CompactNumberFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CompactNumberFormat.html) internal plain text links using ... are replaced with @ linkplain. (External links are kept the same) Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Class can be removed for CNPatterns link ------------- Changes: - all: https://git.openjdk.org/jdk/pull/12108/files - new: https://git.openjdk.org/jdk/pull/12108/files/889f582c..0bd91514 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=12108&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12108&range=00-01 Stats: 4 lines in 1 file changed: 0 ins; 2 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/12108.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12108/head:pull/12108 PR: https://git.openjdk.org/jdk/pull/12108 From naoto at openjdk.org Fri Jan 20 17:37:01 2023 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 20 Jan 2023 17:37:01 GMT Subject: RFR: 8300589: Use @snippet and @linkplain in java.text.CollationKey and java.text.CompactNumberFormat [v2] In-Reply-To: References: Message-ID: On Fri, 20 Jan 2023 17:31:26 GMT, Justin Lu wrote: >> This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.CollationKey](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationKey.html) and [java.text.CompactNumberFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CompactNumberFormat.html). >> >> Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. >> >> Additionally, for [java.text.CompactNumberFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CompactNumberFormat.html) internal plain text links using ... are replaced with @ linkplain. (External links are kept the same) > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Class can be removed for CNPatterns link Marked as reviewed by naoto (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/12108 From lancea at openjdk.org Fri Jan 20 17:37:02 2023 From: lancea at openjdk.org (Lance Andersen) Date: Fri, 20 Jan 2023 17:37:02 GMT Subject: RFR: 8300589: Use @snippet and @linkplain in java.text.CollationKey and java.text.CompactNumberFormat [v2] In-Reply-To: References: Message-ID: On Fri, 20 Jan 2023 17:31:26 GMT, Justin Lu wrote: >> This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.CollationKey](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationKey.html) and [java.text.CompactNumberFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CompactNumberFormat.html). >> >> Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. >> >> Additionally, for [java.text.CompactNumberFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CompactNumberFormat.html) internal plain text links using ... are replaced with @ linkplain. (External links are kept the same) > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Class can be removed for CNPatterns link Marked as reviewed by lancea (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/12108 From jlu at openjdk.org Fri Jan 20 18:05:08 2023 From: jlu at openjdk.org (Justin Lu) Date: Fri, 20 Jan 2023 18:05:08 GMT Subject: RFR: 8300706: Use @snippet in java.text Message-ID: Some classes / interfaces in java.text have already implemented JEP 413. This PR implements _JEP 413: Code Snippets in Java API Documentation_ for the rest of [java.text](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/package-summary.html) including: - BreakIterator - CharacterIterator - DateFormatSymbols - DecimalFormat - NumberFormat Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. ------------- Commit messages: - Snippet for NFormat - DecimalFormat changes - Example in DFSymbols should end with semicolon - Snippet for DFSymbols - Minor spacing in CIterator - Snippet for CIterator - Snippet for BIterator Changes: https://git.openjdk.org/jdk/pull/12121/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12121&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8300706 Stats: 43 lines in 5 files changed: 1 ins; 0 del; 42 mod Patch: https://git.openjdk.org/jdk/pull/12121.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12121/head:pull/12121 PR: https://git.openjdk.org/jdk/pull/12121 From jlu at openjdk.org Fri Jan 20 18:05:08 2023 From: jlu at openjdk.org (Justin Lu) Date: Fri, 20 Jan 2023 18:05:08 GMT Subject: RFR: 8300706: Use @snippet in java.text In-Reply-To: References: Message-ID: On Fri, 20 Jan 2023 17:41:35 GMT, Justin Lu wrote: > Some classes / interfaces in java.text have already implemented JEP 413. > > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for the rest of [java.text](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/package-summary.html) including: > - BreakIterator > - CharacterIterator > - DateFormatSymbols > - DecimalFormat > - NumberFormat > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. src/java.base/share/classes/java/text/DecimalFormat.java line 343: > 341: *
{@code
> 342:  * // Print out a number using the localized number, integer, currency,
> 343:  * // and percent format for each locale}{@code

This comment is originally in strong font within the code example. Replacing both instances of `@ code` with `@ snippet` will just create two separate snippet blocks, one for the comment and one for the code which does not seem ideal.

To maintain the strong font, the comment has to be outside of the code snippet.

If that's not desirable, I think some alternatives are

- Leave the comment in the code snippet and get rid of the strong font 
- Keep the strong font but convert the comment into a normal text description

-------------

PR: https://git.openjdk.org/jdk/pull/12121

From lancea at openjdk.org  Fri Jan 20 18:38:29 2023
From: lancea at openjdk.org (Lance Andersen)
Date: Fri, 20 Jan 2023 18:38:29 GMT
Subject:  RFR: 8300706: Use @snippet in java.text
In-Reply-To: 
References: 
 
Message-ID: 

On Fri, 20 Jan 2023 17:57:47 GMT, Justin Lu  wrote:

>> Some classes / interfaces in java.text have already implemented JEP 413.
>> 
>> This PR implements _JEP 413: Code Snippets in Java API Documentation_ for the rest of [java.text](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/package-summary.html) including:
>> - BreakIterator
>> - CharacterIterator
>> - DateFormatSymbols
>> - DecimalFormat
>> - NumberFormat 
>> 
>> Code examples using 
 ... 
blocks are replaced with the @ snippet syntax where applicable. > > src/java.base/share/classes/java/text/DecimalFormat.java line 343: > >> 341: *
{@code
>> 342:  * // Print out a number using the localized number, integer, currency,
>> 343:  * // and percent format for each locale}{@code
> 
> This comment is originally in strong font within the code example. Replacing both instances of `@ code` with `@ snippet` will just create two separate snippet blocks, one for the comment and one for the code which does not seem ideal.
> 
> To maintain the strong font, the comment has to be outside of the code snippet.
> 
> If that's not desirable, I think some alternatives are
> 
> - Leave the comment in the code snippet and get rid of the strong font 
> - Keep the strong font but convert the comment into a normal text description

I would leave the comment in the code snippet.  I don't see a compelling reason for it to be  as it was originally

-------------

PR: https://git.openjdk.org/jdk/pull/12121

From jlu at openjdk.org  Fri Jan 20 18:47:54 2023
From: jlu at openjdk.org (Justin Lu)
Date: Fri, 20 Jan 2023 18:47:54 GMT
Subject:  RFR: 8300706: Use @snippet in java.text [v2]
In-Reply-To: 
References: 
Message-ID: <7W5SmQg-OFxRra67XIaijKQG0KEkx142g2h3EPuzvDE=.4e97a568-22d3-4e6d-a241-ccf541779cbc@github.com>

> Some classes / interfaces in java.text have already implemented JEP 413.
> 
> This PR implements _JEP 413: Code Snippets in Java API Documentation_ for the rest of [java.text](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/package-summary.html) including:
> - BreakIterator
> - CharacterIterator
> - DateFormatSymbols
> - DecimalFormat
> - NumberFormat 
> 
> Code examples using 
 ... 
blocks are replaced with the @ snippet syntax where applicable. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Drop strong font, put comment back in snippet ------------- Changes: - all: https://git.openjdk.org/jdk/pull/12121/files - new: https://git.openjdk.org/jdk/pull/12121/files/bf8309ef..5b0bfe85 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=12121&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12121&range=00-01 Stats: 3 lines in 1 file changed: 0 ins; 1 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/12121.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12121/head:pull/12121 PR: https://git.openjdk.org/jdk/pull/12121 From iris at openjdk.org Fri Jan 20 18:49:32 2023 From: iris at openjdk.org (Iris Clark) Date: Fri, 20 Jan 2023 18:49:32 GMT Subject: RFR: 8300589: Use @snippet and @linkplain in java.text.CollationKey and java.text.CompactNumberFormat [v2] In-Reply-To: References: Message-ID: On Fri, 20 Jan 2023 17:31:26 GMT, Justin Lu wrote: >> This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.CollationKey](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationKey.html) and [java.text.CompactNumberFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CompactNumberFormat.html). >> >> Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. >> >> Additionally, for [java.text.CompactNumberFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CompactNumberFormat.html) internal plain text links using ... are replaced with @ linkplain. (External links are kept the same) > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Class can be removed for CNPatterns link Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/12108 From naoto at openjdk.org Fri Jan 20 19:00:26 2023 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 20 Jan 2023 19:00:26 GMT Subject: RFR: 8300706: Use @snippet in java.text [v2] In-Reply-To: <7W5SmQg-OFxRra67XIaijKQG0KEkx142g2h3EPuzvDE=.4e97a568-22d3-4e6d-a241-ccf541779cbc@github.com> References: <7W5SmQg-OFxRra67XIaijKQG0KEkx142g2h3EPuzvDE=.4e97a568-22d3-4e6d-a241-ccf541779cbc@github.com> Message-ID: On Fri, 20 Jan 2023 18:47:54 GMT, Justin Lu wrote: >> Some classes / interfaces in java.text have already implemented JEP 413. >> >> This PR implements _JEP 413: Code Snippets in Java API Documentation_ for the rest of [java.text](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/package-summary.html) including: >> - BreakIterator >> - CharacterIterator >> - DateFormatSymbols >> - DecimalFormat >> - NumberFormat >> >> Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Drop strong font, put comment back in snippet Your changes look good. I'd clean up the examples themselves taking this opportunity. src/java.base/share/classes/java/text/DecimalFormat.java line 75: > 73: *
{@snippet lang=java : > 74: * NumberFormat f = NumberFormat.getInstance(loc); > 75: * if (f instanceof DecimalFormat) { Pattern matching `instanceof` should be used. src/java.base/share/classes/java/text/DecimalFormat.java line 373: > 371: * } > 372: * } > 373: * }
The example here can utilize enhanced `switch` and pattern matching `instanceof`. ------------- PR: https://git.openjdk.org/jdk/pull/12121 From naoto at openjdk.org Fri Jan 20 19:00:31 2023 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 20 Jan 2023 19:00:31 GMT Subject: RFR: 8300706: Use @snippet in java.text [v2] In-Reply-To: References: Message-ID: On Fri, 20 Jan 2023 18:34:37 GMT, Lance Andersen wrote: >> src/java.base/share/classes/java/text/DecimalFormat.java line 343: >> >>> 341: *
{@code
>>> 342:  * // Print out a number using the localized number, integer, currency,
>>> 343:  * // and percent format for each locale}{@code
>> 
>> This comment is originally in strong font within the code example. Replacing both instances of `@ code` with `@ snippet` will just create two separate snippet blocks, one for the comment and one for the code which does not seem ideal.
>> 
>> To maintain the strong font, the comment has to be outside of the code snippet.
>> 
>> If that's not desirable, I think some alternatives are
>> 
>> - Leave the comment in the code snippet and get rid of the strong font 
>> - Keep the strong font but convert the comment into a normal text description
>
> I would leave the comment in the code snippet.  I don't see a compelling reason for it to be  as it was originally

+1

-------------

PR: https://git.openjdk.org/jdk/pull/12121

From jlu at openjdk.org  Fri Jan 20 19:54:44 2023
From: jlu at openjdk.org (Justin Lu)
Date: Fri, 20 Jan 2023 19:54:44 GMT
Subject:  RFR: 8300706: Use @snippet in java.text [v3]
In-Reply-To: 
References: 
Message-ID: 

> Some classes / interfaces in java.text have already implemented JEP 413.
> 
> This PR implements _JEP 413: Code Snippets in Java API Documentation_ for the rest of [java.text](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/package-summary.html) including:
> - BreakIterator
> - CharacterIterator
> - DateFormatSymbols
> - DecimalFormat
> - NumberFormat 
> 
> Code examples using 
 ... 
blocks are replaced with the @ snippet syntax where applicable. Justin Lu has updated the pull request incrementally with three additional commits since the last revision: - Close catch on same line - Use pattern matching instanceOf, expression switch statement, and improve for loop readability - Use pattern IOf (1st snippet) ------------- Changes: - all: https://git.openjdk.org/jdk/pull/12121/files - new: https://git.openjdk.org/jdk/pull/12121/files/5b0bfe85..f5f9632c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=12121&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12121&range=01-02 Stats: 19 lines in 1 file changed: 0 ins; 4 del; 15 mod Patch: https://git.openjdk.org/jdk/pull/12121.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12121/head:pull/12121 PR: https://git.openjdk.org/jdk/pull/12121 From naoto at openjdk.org Fri Jan 20 22:08:11 2023 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 20 Jan 2023 22:08:11 GMT Subject: RFR: 8300706: Use @snippet in java.text [v3] In-Reply-To: References: Message-ID: On Fri, 20 Jan 2023 19:54:44 GMT, Justin Lu wrote: >> Some classes / interfaces in java.text have already implemented JEP 413. >> >> This PR implements _JEP 413: Code Snippets in Java API Documentation_ for the rest of [java.text](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/package-summary.html) including: >> - BreakIterator >> - CharacterIterator >> - DateFormatSymbols >> - DecimalFormat >> - NumberFormat >> >> Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. > > Justin Lu has updated the pull request incrementally with three additional commits since the last revision: > > - Close catch on same line > - Use pattern matching instanceOf, expression switch statement, and improve for loop readability > - Use pattern IOf (1st snippet) Marked as reviewed by naoto (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/12121 From stsypanov at openjdk.org Sat Jan 21 21:20:49 2023 From: stsypanov at openjdk.org (Sergey Tsypanov) Date: Sat, 21 Jan 2023 21:20:49 GMT Subject: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter Message-ID: Currently it's O(n) - we do `n` shifts of bytes within `StringBuilder`. This can be reduced to O(1) improving the code like: DateTimeFormatter dtf = new DateTimeFormatterBuilder() .appendLiteral("Date:") .padNext(20, ' ') .append(DateTimeFormatter.ISO_DATE) .toFormatter(); String text = dtf.format(LocalDateTime.now()); ------------- Commit messages: - Improve padding of DateTimeFormatter Changes: https://git.openjdk.org/jdk/pull/12131/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12131&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8300818 Stats: 5 lines in 1 file changed: 0 ins; 2 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/12131.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12131/head:pull/12131 PR: https://git.openjdk.org/jdk/pull/12131 From stsypanov at openjdk.org Sun Jan 22 09:50:21 2023 From: stsypanov at openjdk.org (Sergey Tsypanov) Date: Sun, 22 Jan 2023 09:50:21 GMT Subject: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v2] In-Reply-To: References: Message-ID: > Currently it's O(n) - we do `n` shifts of bytes within `StringBuilder`. This can be reduced to O(1) improving the code like: > > DateTimeFormatter dtf = new DateTimeFormatterBuilder() > .appendLiteral("Date:") > .padNext(20, ' ') > .append(DateTimeFormatter.ISO_DATE) > .toFormatter(); > String text = dtf.format(LocalDateTime.now()); Sergey Tsypanov 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 two additional commits since the last revision: - Merge branch 'master' into dtfb - Improve padding of DateTimeFormatter ------------- Changes: - all: https://git.openjdk.org/jdk/pull/12131/files - new: https://git.openjdk.org/jdk/pull/12131/files/b2160f8c..322ae9b4 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=12131&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12131&range=00-01 Stats: 95 lines in 17 files changed: 34 ins; 0 del; 61 mod Patch: https://git.openjdk.org/jdk/pull/12131.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12131/head:pull/12131 PR: https://git.openjdk.org/jdk/pull/12131 From redestad at openjdk.org Sun Jan 22 11:40:04 2023 From: redestad at openjdk.org (Claes Redestad) Date: Sun, 22 Jan 2023 11:40:04 GMT Subject: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v2] In-Reply-To: References: Message-ID: On Sun, 22 Jan 2023 09:50:21 GMT, Sergey Tsypanov wrote: >> Currently it's O(n) - we do `n` shifts of bytes within `StringBuilder`. This can be reduced to O(1) improving the code like: >> >> DateTimeFormatter dtf = new DateTimeFormatterBuilder() >> .appendLiteral("Date:") >> .padNext(20, ' ') >> .append(DateTimeFormatter.ISO_DATE) >> .toFormatter(); >> String text = dtf.format(LocalDateTime.now()); > > Sergey Tsypanov 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 two additional commits since the last revision: > > - Merge branch 'master' into dtfb > - Improve padding of DateTimeFormatter Changes requested by redestad (Reviewer). src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java line 2603: > 2601: public boolean format(DateTimePrintContext context, StringBuilder buf) { > 2602: int preLen = buf.length(); > 2603: if (!printerParser.format(context, buf)) { Non-standard as it may be, this style of using `expr == false` instead of `!expr` is a style choice by the original author. I would advice against changing these piecemeal without discussion and agreement that we should consistently enforce the `!expr` style. src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java line 2611: > 2609: "Cannot print as output of " + len + " characters exceeds pad width of " + padWidth); > 2610: } > 2611: buf.insert(preLen, String.valueOf(padChar).repeat(padWidth - len)); Have you checked with a microbenchmark that this added allocation can be elided by JITs and that there's a significant speed-up with your changes? I don't have the necessary domain expertise to assert anything here but I suspect padding widths are typically short. Such as 2 or 4 (for day/month and year fields) so a micro should examine there's no regression for little to no padding. Unlike the original code you call `insert` even if `padWidth - len == 0`. This might be optimized away by JITs, but it'd be good to verify which is best. ------------- PR: https://git.openjdk.org/jdk/pull/12131 From stsypanov at openjdk.org Sun Jan 22 13:10:06 2023 From: stsypanov at openjdk.org (Sergey Tsypanov) Date: Sun, 22 Jan 2023 13:10:06 GMT Subject: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v2] In-Reply-To: References: Message-ID: On Sun, 22 Jan 2023 10:56:11 GMT, Claes Redestad wrote: >> Sergey Tsypanov 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 two additional commits since the last revision: >> >> - Merge branch 'master' into dtfb >> - Improve padding of DateTimeFormatter > > src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java line 2603: > >> 2601: public boolean format(DateTimePrintContext context, StringBuilder buf) { >> 2602: int preLen = buf.length(); >> 2603: if (!printerParser.format(context, buf)) { > > Non-standard as it may be, this style of using `expr == false` instead of `!expr` is a style choice by the original author. I would advice against changing these piecemeal without discussion and agreement that we should consistently enforce the `!expr` style. Sure, I'll revert it ------------- PR: https://git.openjdk.org/jdk/pull/12131 From stsypanov at openjdk.org Sun Jan 22 13:31:05 2023 From: stsypanov at openjdk.org (Sergey Tsypanov) Date: Sun, 22 Jan 2023 13:31:05 GMT Subject: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v2] In-Reply-To: References: Message-ID: <3Im4RP5-AmauuIjCVgA3V4h0HellqriqIlbTSjXjrWU=.a3b7c98f-276a-423a-8d48-c3415633b2cc@github.com> On Sun, 22 Jan 2023 11:36:34 GMT, Claes Redestad wrote: >> Sergey Tsypanov 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 two additional commits since the last revision: >> >> - Merge branch 'master' into dtfb >> - Improve padding of DateTimeFormatter > > src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java line 2611: > >> 2609: "Cannot print as output of " + len + " characters exceeds pad width of " + padWidth); >> 2610: } >> 2611: buf.insert(preLen, String.valueOf(padChar).repeat(padWidth - len)); > > Have you checked with a microbenchmark that this added allocation can be elided by JITs and that there's a significant speed-up with your changes? I don't have the necessary domain expertise to assert anything here but I suspect padding widths are typically short. Such as 2 or 4 (for day/month and year fields) so a micro should examine there's no regression for little to no padding. Unlike the original code you call `insert` even if `padWidth - len == 0`. This might be optimized away by JITs, but it'd be good to verify which is best. The modified code is called only when a user explicitly calls `padNext(int, char)`, i.e. if I modified the example snippet as DateTimeFormatter dtf = new DateTimeFormatterBuilder() .appendLiteral("Date:") //.padNext(20, ' ') .append(DateTimeFormatter.ISO_DATE) .toFormatter(); String text = dtf.format(LocalDateTime.now()); there's no regression. Right now I cannot build ad-hoc JDK with my changes and check it with JMH, so I'd convert this to draft until I can verify it ------------- PR: https://git.openjdk.org/jdk/pull/12131 From redestad at openjdk.org Mon Jan 23 11:37:05 2023 From: redestad at openjdk.org (Claes Redestad) Date: Mon, 23 Jan 2023 11:37:05 GMT Subject: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v2] In-Reply-To: <3Im4RP5-AmauuIjCVgA3V4h0HellqriqIlbTSjXjrWU=.a3b7c98f-276a-423a-8d48-c3415633b2cc@github.com> References: <3Im4RP5-AmauuIjCVgA3V4h0HellqriqIlbTSjXjrWU=.a3b7c98f-276a-423a-8d48-c3415633b2cc@github.com> Message-ID: <_gJmYty5eyRbpGo3AIlFE4HDkmGWAWPsAOqwJri3mqo=.70b5927c-2be5-484c-98f4-f21933166c55@github.com> On Sun, 22 Jan 2023 13:28:06 GMT, Sergey Tsypanov wrote: >> src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java line 2611: >> >>> 2609: "Cannot print as output of " + len + " characters exceeds pad width of " + padWidth); >>> 2610: } >>> 2611: buf.insert(preLen, String.valueOf(padChar).repeat(padWidth - len)); >> >> Have you checked with a microbenchmark that this added allocation can be elided by JITs and that there's a significant speed-up with your changes? I don't have the necessary domain expertise to assert anything here but I suspect padding widths are typically short. Such as 2 or 4 (for day/month and year fields) so a micro should examine there's no regression for little to no padding. Unlike the original code you call `insert` even if `padWidth - len == 0`. This might be optimized away by JITs, but it'd be good to verify which is best. > > The modified code is called only when a user explicitly calls `padNext(int, char)`, i.e. if I modified the example snippet as > > DateTimeFormatter dtf = new DateTimeFormatterBuilder() > .appendLiteral("Date:") > //.padNext(20, ' ') > .append(DateTimeFormatter.ISO_DATE) > .toFormatter(); > String text = dtf.format(LocalDateTime.now()); > > there's no regression. > > Right now I cannot build ad-hoc JDK with my changes and check it with JMH, so I'd convert this to draft until I can verify it Meant that you should verify that something like this, which just add a little padding, doesn't regress with your changes: DateTimeFormatter dtf = new DateTimeFormatterBuilder() .appendLiteral("Year:") .padNext(5) .appendValue(ChronoField.YEAR) .toFormatter(); ... dtf.format(LocalDateTime.now()); And similar for effectively no padding (`.padNext(4)` in the above example). As this API might often be used to ensure short 2-4 char fields are correctly padded I think it's important that we're not adding overhead to such use cases. ------------- PR: https://git.openjdk.org/jdk/pull/12131 From jlu at openjdk.org Mon Jan 23 19:40:22 2023 From: jlu at openjdk.org (Justin Lu) Date: Mon, 23 Jan 2023 19:40:22 GMT Subject: Integrated: 8300077: Refactor code examples to use @snippet in java.text.ChoiceFormat In-Reply-To: References: Message-ID: On Thu, 12 Jan 2023 22:31:24 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.ChoiceFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/ChoiceFormat.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. This pull request has now been integrated. Changeset: dcf1523b Author: Justin Lu Committer: Naoto Sato URL: https://git.openjdk.org/jdk/commit/dcf1523bf2dba234371190a70a41cfcb77907196 Stats: 6 lines in 1 file changed: 0 ins; 0 del; 6 mod 8300077: Refactor code examples to use @snippet in java.text.ChoiceFormat Reviewed-by: lancea, iris, naoto ------------- PR: https://git.openjdk.org/jdk/pull/11981 From jlu at openjdk.org Tue Jan 24 02:08:14 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 24 Jan 2023 02:08:14 GMT Subject: Integrated: 8300706: Use @snippet in java.text In-Reply-To: References: Message-ID: <-Fk9_rPXrXEPlAdQzTryAjZvBXppkailmIXxE_LiiXE=.0f0f9eb5-4546-49c8-9524-3b446dc637b4@github.com> On Fri, 20 Jan 2023 17:41:35 GMT, Justin Lu wrote: > Some classes / interfaces in java.text have already implemented JEP 413. > > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for the rest of [java.text](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/package-summary.html) including: > - BreakIterator > - CharacterIterator > - DateFormatSymbols > - DecimalFormat > - NumberFormat > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. This pull request has now been integrated. Changeset: 0323609f Author: Justin Lu Committer: Naoto Sato URL: https://git.openjdk.org/jdk/commit/0323609f44e68ba8d992419a23be7066838a0e01 Stats: 69 lines in 5 files changed: 7 ins; 11 del; 51 mod 8300706: Use @snippet in java.text Reviewed-by: naoto ------------- PR: https://git.openjdk.org/jdk/pull/12121 From jlu at openjdk.org Tue Jan 24 04:39:09 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 24 Jan 2023 04:39:09 GMT Subject: Integrated: 8300589: Use @snippet and @linkplain in java.text.CollationKey and java.text.CompactNumberFormat In-Reply-To: References: Message-ID: On Thu, 19 Jan 2023 22:25:51 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.CollationKey](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationKey.html) and [java.text.CompactNumberFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CompactNumberFormat.html). > > Code examples using
 ... 
blocks are replaced with the @ snippet syntax where applicable. > > Additionally, for [java.text.CompactNumberFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CompactNumberFormat.html) internal plain text links using ... are replaced with @ linkplain. (External links are kept the same) This pull request has now been integrated. Changeset: b3822f50 Author: Justin Lu Committer: Naoto Sato URL: https://git.openjdk.org/jdk/commit/b3822f50c85524a00a045aa3a3d902f190e35906 Stats: 15 lines in 2 files changed: 0 ins; 2 del; 13 mod 8300589: Use @snippet and @linkplain in java.text.CollationKey and java.text.CompactNumberFormat Reviewed-by: lancea, naoto, iris ------------- PR: https://git.openjdk.org/jdk/pull/12108 From dnguyen at openjdk.org Tue Jan 24 20:57:43 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 24 Jan 2023 20:57:43 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update Message-ID: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. All tests passed ------------- Commit messages: - Remove currency symbol entries - Remove whitespace using tool - Remove double quotes generated by translation tool - Revert translation's removal of text - Update files for localization Changes: https://git.openjdk.org/jdk20/pull/116/files Webrev: https://webrevs.openjdk.org/?repo=jdk20&pr=116&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8300719 Stats: 1030 lines in 81 files changed: 218 ins; 115 del; 697 mod Patch: https://git.openjdk.org/jdk20/pull/116.diff Fetch: git fetch https://git.openjdk.org/jdk20 pull/116/head:pull/116 PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Tue Jan 24 21:08:11 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 24 Jan 2023 21:08:11 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update In-Reply-To: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: <4tI9y6FpAFrOiS4N4joygZHAHvPm-Ka2D9_3F8pyD6o=.fbb62ba6-4658-46b5-96f8-307ab3b41f81@github.com> On Tue, 24 Jan 2023 20:50:00 GMT, Damon Nguyen wrote: > Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. > All tests passed @prrace @wangweij @naotoj @JoeWang-Java @plummercj @alexeysemenyukoracle Could you review the changes from this localization drop? ------------- PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Tue Jan 24 21:48:11 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 24 Jan 2023 21:48:11 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update In-Reply-To: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 20:50:00 GMT, Damon Nguyen wrote: > Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. > All tests passed @magicus @LanceAndersen @jonathan-gibbons @pavelrappo @dougxc @lahodaj Could you review the changes from this localization drop for the areas you're familiar with? ------------- PR: https://git.openjdk.org/jdk20/pull/116 From cjplummer at openjdk.org Tue Jan 24 22:05:10 2023 From: cjplummer at openjdk.org (Chris Plummer) Date: Tue, 24 Jan 2023 22:05:10 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update In-Reply-To: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 20:50:00 GMT, Damon Nguyen wrote: > Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. > All tests passed jdk.console and jdk.management.agent changes look good. ------------- Marked as reviewed by cjplummer (Reviewer). PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Tue Jan 24 22:12:26 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 24 Jan 2023 22:12:26 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v2] In-Reply-To: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: > Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. > All tests passed Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Change German help of jar command ------------- Changes: - all: https://git.openjdk.org/jdk20/pull/116/files - new: https://git.openjdk.org/jdk20/pull/116/files/4ced04fb..a2528015 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk20&pr=116&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk20&pr=116&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk20/pull/116.diff Fetch: git fetch https://git.openjdk.org/jdk20 pull/116/head:pull/116 PR: https://git.openjdk.org/jdk20/pull/116 From naoto at openjdk.org Tue Jan 24 22:24:15 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 24 Jan 2023 22:24:15 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v2] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 22:12:26 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Change German help of jar command Changes requested by naoto (Reviewer). src/jdk.jconsole/share/classes/sun/tools/jconsole/resources/messages_zh_CN.properties line 174: > 172: MBEANS_TAB_UNSUBSCRIBE_NOTIFICATIONS_BUTTON=\u53D6\u6D88\u8BA2\u9605(&U) > 173: MBEANS_TAB_UNSUBSCRIBE_NOTIFICATIONS_BUTTON_TOOLTIP=\u505C\u6B62\u76D1\u542C\u901A\u77E5 > 174: MANAGE_HOTSPOT_MBEANS_IN_COLON_=\u7BA1\u7406\u4EE5\u4E0B\u4F4D\u7F6E\u7684 HotSpot MBean: This looks like a prefix, so instead of removing the space, it should be replaced with `\u0020` like other locations. Also, it seems that other l10n files (de, ja) do not seem to have spaces in the first place. src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_de.properties line 38: > 36: resource.post-msi-script=Auszuf\u00FChrendes Skript nach dem Erstellen der MSI-Datei f\u00FCr das EXE-Installationsprogramm > 37: resource.wxl-file=WiX-Lokalisierungsdatei > 38: resource.wxl-file-name=MsiInstallerStrings_en.wxl Shouldn't this be `de`? src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_ja.properties line 38: > 36: resource.post-msi-script=exe\u30A4\u30F3\u30B9\u30C8\u30FC\u30E9\u306Emsi\u30D5\u30A1\u30A4\u30EB\u304C\u4F5C\u6210\u3055\u308C\u305F\u5F8C\u306B\u5B9F\u884C\u3059\u308B\u30B9\u30AF\u30EA\u30D7\u30C8 > 37: resource.wxl-file=WiX\u30ED\u30FC\u30AB\u30EA\u30BC\u30FC\u30B7\u30E7\u30F3\u30FB\u30D5\u30A1\u30A4\u30EB > 38: resource.wxl-file-name=MsiInstallerStrings_en.wxl Shouldn't this be `ja`? src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_zh_CN.properties line 38: > 36: resource.post-msi-script=\u5728\u4E3A exe \u5B89\u88C5\u7A0B\u5E8F\u521B\u5EFA msi \u6587\u4EF6\u4E4B\u540E\u8981\u8FD0\u884C\u7684\u811A\u672C > 37: resource.wxl-file=WiX \u672C\u5730\u5316\u6587\u4EF6 > 38: resource.wxl-file-name=MsiInstallerStrings_en.wxl Shouldn't this be `zh_CN`? src/jdk.localedata/share/classes/sun/util/resources/ext/CurrencyNames_zh_CN.properties line 63: > 61: # written authorization of the copyright holder. > 62: > 63: CNY=\uffe5 Do not remove this. ------------- PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Tue Jan 24 22:24:16 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 24 Jan 2023 22:24:16 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v2] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 22:05:55 GMT, Naoto Sato wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Change German help of jar command > > src/jdk.jconsole/share/classes/sun/tools/jconsole/resources/messages_zh_CN.properties line 174: > >> 172: MBEANS_TAB_UNSUBSCRIBE_NOTIFICATIONS_BUTTON=\u53D6\u6D88\u8BA2\u9605(&U) >> 173: MBEANS_TAB_UNSUBSCRIBE_NOTIFICATIONS_BUTTON_TOOLTIP=\u505C\u6B62\u76D1\u542C\u901A\u77E5 >> 174: MANAGE_HOTSPOT_MBEANS_IN_COLON_=\u7BA1\u7406\u4EE5\u4E0B\u4F4D\u7F6E\u7684 HotSpot MBean: > > This looks like a prefix, so instead of removing the space, it should be replaced with `\u0020` like other locations. > Also, it seems that other l10n files (de, ja) do not seem to have spaces in the first place. OK, I can make the manual edit for this > src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_zh_CN.properties line 38: > >> 36: resource.post-msi-script=\u5728\u4E3A exe \u5B89\u88C5\u7A0B\u5E8F\u521B\u5EFA msi \u6587\u4EF6\u4E4B\u540E\u8981\u8FD0\u884C\u7684\u811A\u672C >> 37: resource.wxl-file=WiX \u672C\u5730\u5316\u6587\u4EF6 >> 38: resource.wxl-file-name=MsiInstallerStrings_en.wxl > > Shouldn't this be `zh_CN`? The translation tool seems to use the English source file's file name here, so it's replaced. I will handle these 3 occurrences now. I thought I handled all occurrences of this, but these 3 slipped in ------------- PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Tue Jan 24 22:33:24 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 24 Jan 2023 22:33:24 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v3] In-Reply-To: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: > Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. > All tests passed Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Change localization codes. Add CNY back ------------- Changes: - all: https://git.openjdk.org/jdk20/pull/116/files - new: https://git.openjdk.org/jdk20/pull/116/files/a2528015..40291c61 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk20&pr=116&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk20&pr=116&range=01-02 Stats: 4 lines in 4 files changed: 1 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk20/pull/116.diff Fetch: git fetch https://git.openjdk.org/jdk20 pull/116/head:pull/116 PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Tue Jan 24 22:33:28 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 24 Jan 2023 22:33:28 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v2] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 22:12:02 GMT, Naoto Sato wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Change German help of jar command > > src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_de.properties line 38: > >> 36: resource.post-msi-script=Auszuf\u00FChrendes Skript nach dem Erstellen der MSI-Datei f\u00FCr das EXE-Installationsprogramm >> 37: resource.wxl-file=WiX-Lokalisierungsdatei >> 38: resource.wxl-file-name=MsiInstallerStrings_en.wxl > > Shouldn't this be `de`? Changed back similar to with zh_CN > src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_ja.properties line 38: > >> 36: resource.post-msi-script=exe\u30A4\u30F3\u30B9\u30C8\u30FC\u30E9\u306Emsi\u30D5\u30A1\u30A4\u30EB\u304C\u4F5C\u6210\u3055\u308C\u305F\u5F8C\u306B\u5B9F\u884C\u3059\u308B\u30B9\u30AF\u30EA\u30D7\u30C8 >> 37: resource.wxl-file=WiX\u30ED\u30FC\u30AB\u30EA\u30BC\u30FC\u30B7\u30E7\u30F3\u30FB\u30D5\u30A1\u30A4\u30EB >> 38: resource.wxl-file-name=MsiInstallerStrings_en.wxl > > Shouldn't this be `ja`? Changed back similar to with zh_CN ------------- PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Tue Jan 24 22:33:29 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 24 Jan 2023 22:33:29 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v3] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 22:14:36 GMT, Naoto Sato wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Change localization codes. Add CNY back > > src/jdk.localedata/share/classes/sun/util/resources/ext/CurrencyNames_zh_CN.properties line 63: > >> 61: # written authorization of the copyright holder. >> 62: >> 63: CNY=\uffe5 > > Do not remove this. Added back. Thanks for catching this! ------------- PR: https://git.openjdk.org/jdk20/pull/116 From prr at openjdk.org Tue Jan 24 22:44:13 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 24 Jan 2023 22:44:13 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v2] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 22:12:26 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Change German help of jar command Removing the trailing white space seems OK in the desktop resources. I checked the base (English) version of the files and none of them have trailing white space so it seems unlikely it is significant. ------------- Marked as reviewed by prr (Reviewer). PR: https://git.openjdk.org/jdk20/pull/116 From jlu at openjdk.org Tue Jan 24 22:44:14 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 24 Jan 2023 22:44:14 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v3] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 22:20:22 GMT, Damon Nguyen wrote: >> src/jdk.jconsole/share/classes/sun/tools/jconsole/resources/messages_zh_CN.properties line 174: >> >>> 172: MBEANS_TAB_UNSUBSCRIBE_NOTIFICATIONS_BUTTON=\u53D6\u6D88\u8BA2\u9605(&U) >>> 173: MBEANS_TAB_UNSUBSCRIBE_NOTIFICATIONS_BUTTON_TOOLTIP=\u505C\u6B62\u76D1\u542C\u901A\u77E5 >>> 174: MANAGE_HOTSPOT_MBEANS_IN_COLON_=\u7BA1\u7406\u4EE5\u4E0B\u4F4D\u7F6E\u7684 HotSpot MBean: >> >> This looks like a prefix, so instead of removing the space, it should be replaced with `\u0020` like other locations. >> Also, it seems that other l10n files (de, ja) do not seem to have spaces in the first place. > > OK, I can make the manual edit for this This change was made because it was compared to the original messages.properties. In that file, the respective line is given as `MANAGE_HOTSPOT_MBEANS_IN_COLON_=Manage Hotspot MBeans in:` with no trailing space. That's why in this file, to ensure consistency, the trailing space was stripped. I think either this space should be removed, or all 4 (en, ja, de, zh) should have the `\u0020` appended. I agree that since it is a prefix it would make sense for a space to be there, but there is no guarantee that what comes after, or even the code that loads the .properties file does not already handles that necessary space. Should the space remain removed like in the English source file and the other l10n files, or do you think all 4 should be changed to add `\u0020`? ------------- PR: https://git.openjdk.org/jdk20/pull/116 From joehw at openjdk.org Tue Jan 24 22:59:07 2023 From: joehw at openjdk.org (Joe Wang) Date: Tue, 24 Jan 2023 22:59:07 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v3] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: <8IAAljdZ35sxC22s2SeFdCTX5xmx83YUFr8dwOYtXzA=.028e67c7-0969-4204-b843-0c0f2d79574f@github.com> On Tue, 24 Jan 2023 22:33:24 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Change localization codes. Add CNY back Marked as reviewed by joehw (Reviewer). java.xml changes look good to me. Thanks. ------------- PR: https://git.openjdk.org/jdk20/pull/116 From naoto at openjdk.org Tue Jan 24 22:59:08 2023 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 24 Jan 2023 22:59:08 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v3] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 22:40:55 GMT, Justin Lu wrote: >> OK, I can make the manual edit for this > > This change was made because it was compared to the original messages.properties. In that file, the respective line is given as `MANAGE_HOTSPOT_MBEANS_IN_COLON_=Manage Hotspot MBeans in:` with no trailing space. That's why in this file, to ensure consistency, the trailing space was stripped. > > I think either this space should be removed, or all 4 (en, ja, de, zh) should have the `\u0020` appended. I agree that since it is a prefix it would make sense for a space to be there, but there is no guarantee that what comes after, or even the code that loads the .properties file does not already handles that necessary space. > > Should the space remain removed like in the English source file and the other l10n files, or do you think all 4 should be changed to add `\u0020`? Confirmed that the message is for a label (`sun.tools.jconsole.LabeledComponent`), followed by a Component, so no space seems needed in each file. Sorry for the false alarm. ------------- PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Tue Jan 24 22:59:08 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 24 Jan 2023 22:59:08 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v3] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 22:49:20 GMT, Naoto Sato wrote: >> This change was made because it was compared to the original messages.properties. In that file, the respective line is given as `MANAGE_HOTSPOT_MBEANS_IN_COLON_=Manage Hotspot MBeans in:` with no trailing space. That's why in this file, to ensure consistency, the trailing space was stripped. >> >> I think either this space should be removed, or all 4 (en, ja, de, zh) should have the `\u0020` appended. I agree that since it is a prefix it would make sense for a space to be there, but there is no guarantee that what comes after, or even the code that loads the .properties file does not already handles that necessary space. >> >> Should the space remain removed like in the English source file and the other l10n files, or do you think all 4 should be changed to add `\u0020`? > > Confirmed that the message is for a label (`sun.tools.jconsole.LabeledComponent`), followed by a Component, so no space seems needed in each file. Sorry for the false alarm. Ok I left this change out of my most recent update just in case. I addressed all the other comments I believe. Thanks! ------------- PR: https://git.openjdk.org/jdk20/pull/116 From asemenyuk at openjdk.org Tue Jan 24 22:59:12 2023 From: asemenyuk at openjdk.org (Alexey Semenyuk) Date: Tue, 24 Jan 2023 22:59:12 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v3] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 22:33:24 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Change localization codes. Add CNY back src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/MsiInstallerStrings_de.wxl line 2: > 1: > 2: Please revert the value of the `Culture` attribute. src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/MsiInstallerStrings_ja.wxl line 2: > 1: > 2: Please revert the value of the `Culture` attribute. src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/MsiInstallerStrings_zh_CN.wxl line 2: > 1: > 2: Please revert the value of the `Culture` attribute. ------------- PR: https://git.openjdk.org/jdk20/pull/116 From jlu at openjdk.org Tue Jan 24 23:06:14 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 24 Jan 2023 23:06:14 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v3] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 22:33:24 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Change localization codes. Add CNY back src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins_ja.properties line 62: > 60: dedup-legal-notices.usage=\ --dedup-legal-notices [error-if-not-same-content]\n \u3059\u3079\u3066\u306E\u6CD5\u5F8B\u4E0A\u306E\u6CE8\u610F\u70B9\u306E\u91CD\u8907\u3092\u9664\u5916\u3057\u307E\u3059\u3002\n error-if-not-same-content\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\n \u540C\u3058\u30D5\u30A1\u30A4\u30EB\u540D\u306E2\u3064\u306E\u30D5\u30A1\u30A4\u30EB\u304C\u7570\u306A\u3063\u3066\u3044\u308B\u3068\n \u30A8\u30E9\u30FC\u306B\u306A\u308A\u307E\u3059\u3002 > 61: > 62: exclude-files.argument=\u9664\u5916\u3059\u308B\u30D5\u30A1\u30A4\u30EB\u306E It seems like the translation process added a space here, but it does not appear in the original. This should be removed. src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins_zh_CN.properties line 194: > 192: main.plugin.module=\u63D2\u4EF6\u6A21\u5757 > 193: > 194: main.plugin.category=\u7C7B\u522B Same as above. ------------- PR: https://git.openjdk.org/jdk20/pull/116 From asemenyuk at openjdk.org Tue Jan 24 23:19:12 2023 From: asemenyuk at openjdk.org (Alexey Semenyuk) Date: Tue, 24 Jan 2023 23:19:12 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v3] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: <53tinlttCmtNrOBaz7F54bKSeftrurnsr9OVoQzzjC8=.191b9195-e775-4b4b-8811-d34789cec36e@github.com> On Tue, 24 Jan 2023 22:33:24 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Change localization codes. Add CNY back Changes requested by asemenyuk (Reviewer). src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/MsiInstallerStrings_zh_CN.wxl line 2: > 1: > 2: Please revert the value of the Culture attribute. ------------- PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Tue Jan 24 23:38:23 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 24 Jan 2023 23:38:23 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v4] In-Reply-To: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: > Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. > All tests passed Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Remove trailing whitespace ------------- Changes: - all: https://git.openjdk.org/jdk20/pull/116/files - new: https://git.openjdk.org/jdk20/pull/116/files/40291c61..fc32c37f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk20&pr=116&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk20&pr=116&range=02-03 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk20/pull/116.diff Fetch: git fetch https://git.openjdk.org/jdk20 pull/116/head:pull/116 PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Tue Jan 24 23:56:23 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 24 Jan 2023 23:56:23 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5] In-Reply-To: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: > Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. > All tests passed Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Revert culture attribute ------------- Changes: - all: https://git.openjdk.org/jdk20/pull/116/files - new: https://git.openjdk.org/jdk20/pull/116/files/fc32c37f..616b2502 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk20&pr=116&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk20&pr=116&range=03-04 Stats: 3 lines in 3 files changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk20/pull/116.diff Fetch: git fetch https://git.openjdk.org/jdk20 pull/116/head:pull/116 PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Tue Jan 24 23:59:13 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 24 Jan 2023 23:59:13 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v3] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 23:02:58 GMT, Justin Lu wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Change localization codes. Add CNY back > > src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins_ja.properties line 62: > >> 60: dedup-legal-notices.usage=\ --dedup-legal-notices [error-if-not-same-content]\n \u3059\u3079\u3066\u306E\u6CD5\u5F8B\u4E0A\u306E\u6CE8\u610F\u70B9\u306E\u91CD\u8907\u3092\u9664\u5916\u3057\u307E\u3059\u3002\n error-if-not-same-content\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\n \u540C\u3058\u30D5\u30A1\u30A4\u30EB\u540D\u306E2\u3064\u306E\u30D5\u30A1\u30A4\u30EB\u304C\u7570\u306A\u3063\u3066\u3044\u308B\u3068\n \u30A8\u30E9\u30FC\u306B\u306A\u308A\u307E\u3059\u3002 >> 61: >> 62: exclude-files.argument=\u9664\u5916\u3059\u308B\u30D5\u30A1\u30A4\u30EB\u306E > > It seems like the translation process added a space here, but it does not appear in the original. This should be removed. Removed both instances of the extra trailing whitespace. > src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins_zh_CN.properties line 194: > >> 192: main.plugin.module=\u63D2\u4EF6\u6A21\u5757 >> 193: >> 194: main.plugin.category=\u7C7B\u522B > > Same as above. Addressed as above ------------- PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Tue Jan 24 23:59:17 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 24 Jan 2023 23:59:17 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v2] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 22:55:43 GMT, Alexey Semenyuk wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Change German help of jar command > > src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/MsiInstallerStrings_de.wxl line 2: > >> 1: >> 2: > > Please revert the value of the `Culture` attribute. I resolved this for the German, Japanese, and Chinese files in the latest commit. > src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/MsiInstallerStrings_ja.wxl line 2: > >> 1: >> 2: > > Please revert the value of the `Culture` attribute. Resolved in recent commit ------------- PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Tue Jan 24 23:59:19 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 24 Jan 2023 23:59:19 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v3] In-Reply-To: <53tinlttCmtNrOBaz7F54bKSeftrurnsr9OVoQzzjC8=.191b9195-e775-4b4b-8811-d34789cec36e@github.com> References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> <53tinlttCmtNrOBaz7F54bKSeftrurnsr9OVoQzzjC8=.191b9195-e775-4b4b-8811-d34789cec36e@github.com> Message-ID: On Tue, 24 Jan 2023 23:16:02 GMT, Alexey Semenyuk wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Change localization codes. Add CNY back > > src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/MsiInstallerStrings_zh_CN.wxl line 2: > >> 1: >> 2: > > Please revert the value of the Culture attribute. Resolved in recent commit ------------- PR: https://git.openjdk.org/jdk20/pull/116 From asemenyuk at openjdk.org Wed Jan 25 00:12:09 2023 From: asemenyuk at openjdk.org (Alexey Semenyuk) Date: Wed, 25 Jan 2023 00:12:09 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 23:56:23 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Revert culture attribute jpackage changes look good ------------- Marked as reviewed by asemenyuk (Reviewer). PR: https://git.openjdk.org/jdk20/pull/116 From jlu at openjdk.org Wed Jan 25 01:11:15 2023 From: jlu at openjdk.org (Justin Lu) Date: Wed, 25 Jan 2023 01:11:15 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 23:56:23 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Revert culture attribute Marked as reviewed by jlu (Author). ------------- PR: https://git.openjdk.org/jdk20/pull/116 From duke at openjdk.org Wed Jan 25 08:20:13 2023 From: duke at openjdk.org (danielpeintner) Date: Wed, 25 Jan 2023 08:20:13 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v2] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 22:12:26 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Change German help of jar command src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties line 111: > 109: main.help.opt.main.update=\ -u, --update Ein vorhandenes JAR-Archiv aktualisieren > 110: main.help.opt.main.extract=\ -x, --extract Benannte (oder alle) Dateien aus dem Archiv extrahieren > 111: main.help.opt.main.describe-module=\ -d, --describe-module Gibt den Moduldeskriptor oder automatischen Modulnamen aus Just because I stumbled over this commit. I think the line should be translated as follows: `Gibt die Modulbeschreibung oder den automatischen Modulnamen aus` ------------- PR: https://git.openjdk.org/jdk20/pull/116 From lancea at openjdk.org Wed Jan 25 13:45:21 2023 From: lancea at openjdk.org (Lance Andersen) Date: Wed, 25 Jan 2023 13:45:21 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 23:56:23 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Revert culture attribute Marked as reviewed by lancea (Reviewer). ------------- PR: https://git.openjdk.org/jdk20/pull/116 From ihse at openjdk.org Wed Jan 25 13:56:21 2023 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 25 Jan 2023 13:56:21 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: <-Mjbn1ko2InJOzXLccieEzU8h4bypdm9vTzHdmtA-JQ=.2e1f4d59-e30e-434a-8e62-25777adb3a07@github.com> On Tue, 24 Jan 2023 23:56:23 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Revert culture attribute I skimmed through this, basically looking for trailing white space changes only, and it generally looks okay. Note that some of these trailing whitespace fixes has been independently address in mainline. Forward-porting this might involve some (virtual) conflicts. It is also impossible to see in the Github interface if you are introducing *new* trailing white spaces in the added texts. I hope you are not, and that you have verified this. ------------- Marked as reviewed by ihse (Reviewer). PR: https://git.openjdk.org/jdk20/pull/116 From naoto at openjdk.org Wed Jan 25 16:55:04 2023 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 25 Jan 2023 16:55:04 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 23:56:23 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Revert culture attribute LGTM ------------- Marked as reviewed by naoto (Reviewer). PR: https://git.openjdk.org/jdk20/pull/116 From weijun at openjdk.org Wed Jan 25 17:36:38 2023 From: weijun at openjdk.org (Weijun Wang) Date: Wed, 25 Jan 2023 17:36:38 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: <_THK1t7SrTRqoW0o0gfgmCo1Ea1WfgdfeB7jNJDKUKk=.05512373-8cb2-41d3-a71f-589075240bb7@github.com> On Tue, 24 Jan 2023 23:56:23 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Revert culture attribute src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_zh_CN.properties line 32: > 30: err.bad.constant.pool=\u8BFB\u53D6{0}\u7684\u5E38\u91CF\u6C60\u65F6\u51FA\u9519: {1} > 31: err.class.not.found=\u627E\u4E0D\u5230\u7C7B: {0} > 32: err.crash=\u51FA\u73B0\u4E25\u91CD\u7684\u5185\u90E8\u9519\u8BEF\uFF1A{0}\n\u8BF7\u586B\u5199 Bug \u62A5\u544A\uFF0C\u5E76\u5305\u62EC\u4EE5\u4E0B\u4FE1\u606F\uFF1A\n{1} While personally I like to see Chinese-style punctuation marks (Ex: `?`) used in Chinese contexts instead of their English-style ones (Ex: `:`), it's only updated on this single line and all the others are still using the English-style. There should be a general rule on which style we should use throughout all display messages. ------------- PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Wed Jan 25 17:47:19 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 25 Jan 2023 17:47:19 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v6] In-Reply-To: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: > Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. > All tests passed Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Revert translated punctuation ------------- Changes: - all: https://git.openjdk.org/jdk20/pull/116/files - new: https://git.openjdk.org/jdk20/pull/116/files/616b2502..4222df9a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk20&pr=116&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk20&pr=116&range=04-05 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk20/pull/116.diff Fetch: git fetch https://git.openjdk.org/jdk20 pull/116/head:pull/116 PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Wed Jan 25 17:51:20 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 25 Jan 2023 17:51:20 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v7] In-Reply-To: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: <5QDH5Zhiji1PTh-833JdIopABeDoDCLA5e-u1Q3pkUE=.98a38bd3-3e52-4b51-9287-dc70454c4b89@github.com> > Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. > All tests passed Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Revert one more punctuation ------------- Changes: - all: https://git.openjdk.org/jdk20/pull/116/files - new: https://git.openjdk.org/jdk20/pull/116/files/4222df9a..9a5b45a2 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk20&pr=116&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk20&pr=116&range=05-06 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk20/pull/116.diff Fetch: git fetch https://git.openjdk.org/jdk20 pull/116/head:pull/116 PR: https://git.openjdk.org/jdk20/pull/116 From weijun at openjdk.org Wed Jan 25 17:52:21 2023 From: weijun at openjdk.org (Weijun Wang) Date: Wed, 25 Jan 2023 17:52:21 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 23:56:23 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Revert culture attribute src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.properties line 113: > 111: doclet.inheritDocWithinInappropriateTag=\u4E0D\u80FD\u5728\u6B64\u6807\u8BB0\u4E2D\u4F7F\u7528 @inheritDoc > 112: doclet.inheritDocNoDoc=\u88AB\u8986\u76D6\u7684\u65B9\u6CD5\u4E0D\u8BB0\u5F55\u5F02\u5E38\u9519\u8BEF\u7C7B\u578B {0} > 113: doclet.throwsInheritDocUnsupported=\u4E0D\u662F\u7531\u65B9\u6CD5\u58F0\u660E\u7684 exception-type \u7C7B\u578B\u53C2\u6570\u4E0D\u652F\u6301 @inheritDoc\uFF1B\u76F4\u63A5\u8BB0\u5F55\u6B64\u7C7B\u5F02\u5E38\u9519\u8BEF\u7C7B\u578B Should `exception-type` be translated? ------------- PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Wed Jan 25 18:03:54 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 25 Jan 2023 18:03:54 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Wed, 25 Jan 2023 17:49:59 GMT, Weijun Wang wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Revert culture attribute > > src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.properties line 113: > >> 111: doclet.inheritDocWithinInappropriateTag=\u4E0D\u80FD\u5728\u6B64\u6807\u8BB0\u4E2D\u4F7F\u7528 @inheritDoc >> 112: doclet.inheritDocNoDoc=\u88AB\u8986\u76D6\u7684\u65B9\u6CD5\u4E0D\u8BB0\u5F55\u5F02\u5E38\u9519\u8BEF\u7C7B\u578B {0} >> 113: doclet.throwsInheritDocUnsupported=\u4E0D\u662F\u7531\u65B9\u6CD5\u58F0\u660E\u7684 exception-type \u7C7B\u578B\u53C2\u6570\u4E0D\u652F\u6301 @inheritDoc\uFF1B\u76F4\u63A5\u8BB0\u5F55\u6B64\u7C7B\u5F02\u5E38\u9519\u8BEF\u7C7B\u578B > > Should `exception-type` be translated? The translation tool didn't seem to translate this. Either because it couldn't or because it somehow missed it. I'm not sure which, but I'm open to replacing this with a translation suggestion you have. Or I can leave it as is. > src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_zh_CN.properties line 32: > >> 30: err.bad.constant.pool=\u8BFB\u53D6{0}\u7684\u5E38\u91CF\u6C60\u65F6\u51FA\u9519: {1} >> 31: err.class.not.found=\u627E\u4E0D\u5230\u7C7B: {0} >> 32: err.crash=\u51FA\u73B0\u4E25\u91CD\u7684\u5185\u90E8\u9519\u8BEF\uFF1A{0}\n\u8BF7\u586B\u5199 Bug \u62A5\u544A\uFF0C\u5E76\u5305\u62EC\u4EE5\u4E0B\u4FE1\u606F\uFF1A\n{1} > > While personally I like to see Chinese-style punctuation marks (Ex: `?`) used in Chinese contexts instead of their English-style ones (Ex: `:`), it's only updated on this single line and all the others are still using the English-style. > > There should be a general rule on which style we should use throughout all display messages. Updated the punctuation (colons and comma) to be more consistent throughout the file. ------------- PR: https://git.openjdk.org/jdk20/pull/116 From weijun at openjdk.org Wed Jan 25 18:03:55 2023 From: weijun at openjdk.org (Weijun Wang) Date: Wed, 25 Jan 2023 18:03:55 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Wed, 25 Jan 2023 17:56:15 GMT, Damon Nguyen wrote: >> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.properties line 113: >> >>> 111: doclet.inheritDocWithinInappropriateTag=\u4E0D\u80FD\u5728\u6B64\u6807\u8BB0\u4E2D\u4F7F\u7528 @inheritDoc >>> 112: doclet.inheritDocNoDoc=\u88AB\u8986\u76D6\u7684\u65B9\u6CD5\u4E0D\u8BB0\u5F55\u5F02\u5E38\u9519\u8BEF\u7C7B\u578B {0} >>> 113: doclet.throwsInheritDocUnsupported=\u4E0D\u662F\u7531\u65B9\u6CD5\u58F0\u660E\u7684 exception-type \u7C7B\u578B\u53C2\u6570\u4E0D\u652F\u6301 @inheritDoc\uFF1B\u76F4\u63A5\u8BB0\u5F55\u6B64\u7C7B\u5F02\u5E38\u9519\u8BEF\u7C7B\u578B >> >> Should `exception-type` be translated? > > The translation tool didn't seem to translate this. Either because it couldn't or because it somehow missed it. I'm not sure which, but I'm open to replacing this with a translation suggestion you have. Or I can leave it as is. I'm not sure either. You can ask a javadoc expert whether this is a proper noun or just plain English. I noticed it's also not translated in the Japanese version but the German version has translated it. >> src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_zh_CN.properties line 32: >> >>> 30: err.bad.constant.pool=\u8BFB\u53D6{0}\u7684\u5E38\u91CF\u6C60\u65F6\u51FA\u9519: {1} >>> 31: err.class.not.found=\u627E\u4E0D\u5230\u7C7B: {0} >>> 32: err.crash=\u51FA\u73B0\u4E25\u91CD\u7684\u5185\u90E8\u9519\u8BEF\uFF1A{0}\n\u8BF7\u586B\u5199 Bug \u62A5\u544A\uFF0C\u5E76\u5305\u62EC\u4EE5\u4E0B\u4FE1\u606F\uFF1A\n{1} >> >> While personally I like to see Chinese-style punctuation marks (Ex: `?`) used in Chinese contexts instead of their English-style ones (Ex: `:`), it's only updated on this single line and all the others are still using the English-style. >> >> There should be a general rule on which style we should use throughout all display messages. > > Updated the punctuation (colons and comma) to be more consistent throughout the file. Looks good now. ------------- PR: https://git.openjdk.org/jdk20/pull/116 From jjg at openjdk.org Wed Jan 25 18:24:55 2023 From: jjg at openjdk.org (Jonathan Gibbons) Date: Wed, 25 Jan 2023 18:24:55 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v7] In-Reply-To: <5QDH5Zhiji1PTh-833JdIopABeDoDCLA5e-u1Q3pkUE=.98a38bd3-3e52-4b51-9287-dc70454c4b89@github.com> References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> <5QDH5Zhiji1PTh-833JdIopABeDoDCLA5e-u1Q3pkUE=.98a38bd3-3e52-4b51-9287-dc70454c4b89@github.com> Message-ID: On Wed, 25 Jan 2023 17:51:20 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Revert one more punctuation I don't see anything absurdly wrong in the jdk.compiler files. ------------- Marked as reviewed by jjg (Reviewer). PR: https://git.openjdk.org/jdk20/pull/116 From weijun at openjdk.org Wed Jan 25 18:58:57 2023 From: weijun at openjdk.org (Weijun Wang) Date: Wed, 25 Jan 2023 18:58:57 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v7] In-Reply-To: <5QDH5Zhiji1PTh-833JdIopABeDoDCLA5e-u1Q3pkUE=.98a38bd3-3e52-4b51-9287-dc70454c4b89@github.com> References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> <5QDH5Zhiji1PTh-833JdIopABeDoDCLA5e-u1Q3pkUE=.98a38bd3-3e52-4b51-9287-dc70454c4b89@github.com> Message-ID: On Wed, 25 Jan 2023 17:51:20 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Revert one more punctuation zh_cn translations look fine. Thanks. ------------- Marked as reviewed by weijun (Reviewer). PR: https://git.openjdk.org/jdk20/pull/116 From prappo at openjdk.org Wed Jan 25 20:06:53 2023 From: prappo at openjdk.org (Pavel Rappo) Date: Wed, 25 Jan 2023 20:06:53 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Wed, 25 Jan 2023 18:00:33 GMT, Weijun Wang wrote: >> The translation tool didn't seem to translate this. Either because it couldn't or because it somehow missed it. I'm not sure which, but I'm open to replacing this with a translation suggestion you have. Or I can leave it as is. > > I'm not sure either. You can ask a javadoc expert whether this is a proper noun or just plain English. I noticed it's also not translated in the Japanese version but the German version has translated it. It's not a noun. It's an adjective that I had to synthesize for extra clarity and closeness to Java Language Specification (JLS). The English version of that entry is as follows: doclet.throwsInheritDocUnsupported=@inheritDoc is not supported for exception-type type parameters \ that are not declared by a method; document such exception types directly JLS _8.4.6. Method Throws_ defines BNF which conveniently labels elements, a list of which may appear in the `throws` clause, as `ExceptionType`. To make it more English-like and separate two otherwise consecutive occurrences of "type" in that sentence, I split the words with a hyphen and lower-cased them: exception-type. @jonathan-gibbons thoughts? ------------- PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Wed Jan 25 22:02:45 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 25 Jan 2023 22:02:45 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v8] In-Reply-To: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: > Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. > All tests passed Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Update German translation ------------- Changes: - all: https://git.openjdk.org/jdk20/pull/116/files - new: https://git.openjdk.org/jdk20/pull/116/files/9a5b45a2..35829a25 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk20&pr=116&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk20&pr=116&range=06-07 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk20/pull/116.diff Fetch: git fetch https://git.openjdk.org/jdk20 pull/116/head:pull/116 PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Wed Jan 25 22:19:34 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 25 Jan 2023 22:19:34 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v2] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Wed, 25 Jan 2023 08:17:26 GMT, danielpeintner wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Change German help of jar command > > src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties line 111: > >> 109: main.help.opt.main.update=\ -u, --update Ein vorhandenes JAR-Archiv aktualisieren >> 110: main.help.opt.main.extract=\ -x, --extract Benannte (oder alle) Dateien aus dem Archiv extrahieren >> 111: main.help.opt.main.describe-module=\ -d, --describe-module Gibt den Moduldeskriptor oder automatischen Modulnamen aus > > Just because I stumbled over this commit. I think the line should be translated as follows: > > `Gibt die Modulbeschreibung oder den automatischen Modulnamen aus` Resolved ------------- PR: https://git.openjdk.org/jdk20/pull/116 From jjg at openjdk.org Wed Jan 25 22:41:34 2023 From: jjg at openjdk.org (Jonathan Gibbons) Date: Wed, 25 Jan 2023 22:41:34 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Wed, 25 Jan 2023 20:03:48 GMT, Pavel Rappo wrote: >> I'm not sure either. You can ask a javadoc expert whether this is a proper noun or just plain English. I noticed it's also not translated in the Japanese version but the German version has translated it. > > It's not a noun. It's an adjective that I had to synthesize for extra clarity and closeness to Java Language Specification (JLS). The English version of that entry is as follows: > > doclet.throwsInheritDocUnsupported=@inheritDoc is not supported for exception-type type parameters \ > that are not declared by a method; document such exception types directly > > JLS _8.4.6. Method Throws_ defines BNF which conveniently labels elements, a list of which may appear in the `throws` clause, as `ExceptionType`. To make it more English-like and separate two otherwise consecutive occurrences of "type" in that sentence, I split the words with a hyphen and lower-cased them: exception-type. > > @jonathan-gibbons thoughts? While the text is technically correct, it may not be as clear as it could be to all folk that will read this message for whom English is not their primary language. I would suggest translating the phrase as if it were something like @inheritDoc is not supported for type parameters that are exception types and not declared by a method and secondarily, changing the English resource to something like that as well. ------------- PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Wed Jan 25 22:56:59 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 25 Jan 2023 22:56:59 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v9] In-Reply-To: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: > Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. > All tests passed Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Replace exception-type ------------- Changes: - all: https://git.openjdk.org/jdk20/pull/116/files - new: https://git.openjdk.org/jdk20/pull/116/files/35829a25..53a86ef2 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk20&pr=116&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk20&pr=116&range=07-08 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk20/pull/116.diff Fetch: git fetch https://git.openjdk.org/jdk20 pull/116/head:pull/116 PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Wed Jan 25 22:56:59 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 25 Jan 2023 22:56:59 GMT Subject: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5] In-Reply-To: References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Wed, 25 Jan 2023 22:38:38 GMT, Jonathan Gibbons wrote: >> It's not a noun. It's an adjective that I had to synthesize for extra clarity and closeness to Java Language Specification (JLS). The English version of that entry is as follows: >> >> doclet.throwsInheritDocUnsupported=@inheritDoc is not supported for exception-type type parameters \ >> that are not declared by a method; document such exception types directly >> >> JLS _8.4.6. Method Throws_ defines BNF which conveniently labels elements, a list of which may appear in the `throws` clause, as `ExceptionType`. To make it more English-like and separate two otherwise consecutive occurrences of "type" in that sentence, I split the words with a hyphen and lower-cased them: exception-type. >> >> @jonathan-gibbons thoughts? > > While the text is technically correct, it may not be as clear as it could be to all folk that will read this message for whom English is not their primary language. > > I would suggest translating the phrase as if it were something like > > @inheritDoc is not supported for type parameters that are exception types and not declared by a method > > > and secondarily, changing the English resource to something like that as well. Updated this line with `exception-type` translated. Hopefully this will be addressed in future drops with changes to the translation tool after some bug fixes. ------------- PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Thu Jan 26 22:36:39 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 26 Jan 2023 22:36:39 GMT Subject: [jdk20] Integrated: 8300719: JDK 20 RDP2 L10n resource files update In-Reply-To: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> References: <0fuTtDy_5ZjAaxfJV75WRG8xQ76Tj-oM5hdYpG-yfkk=.a4ce241d-52a8-422a-9e1e-40de0afa78cb@github.com> Message-ID: On Tue, 24 Jan 2023 20:50:00 GMT, Damon Nguyen wrote: > Open l10n drop. Files have been updated with translated versions. Whitespace tool has been ran on files. > All tests passed This pull request has now been integrated. Changeset: a67b1e77 Author: Damon Nguyen Committer: Naoto Sato URL: https://git.openjdk.org/jdk20/commit/a67b1e77d33339f5db36c6d15bac0423a31eb5ee Stats: 1023 lines in 82 files changed: 218 ins; 114 del; 691 mod 8300719: JDK 20 RDP2 L10n resource files update Reviewed-by: cjplummer, naoto, prr, joehw, asemenyuk, jlu, lancea, ihse, jjg, weijun ------------- PR: https://git.openjdk.org/jdk20/pull/116 From dnguyen at openjdk.org Fri Jan 27 01:50:08 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 27 Jan 2023 01:50:08 GMT Subject: [jdk20] RFR: 8301206: Fix issue with LocaleData after JDK-8300719 Message-ID: Localization update didn't include an update to LocaleData file. This PR addresses this by updating the file with the newly translated values. The LocaleDataTest now passes. This should address the recent related failures to LocaleData. ------------- Commit messages: - Update LocaleData Changes: https://git.openjdk.org/jdk20/pull/118/files Webrev: https://webrevs.openjdk.org/?repo=jdk20&pr=118&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8301206 Stats: 52 lines in 1 file changed: 0 ins; 0 del; 52 mod Patch: https://git.openjdk.org/jdk20/pull/118.diff Fetch: git fetch https://git.openjdk.org/jdk20 pull/118/head:pull/118 PR: https://git.openjdk.org/jdk20/pull/118 From naoto at openjdk.org Fri Jan 27 02:05:24 2023 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 27 Jan 2023 02:05:24 GMT Subject: [jdk20] RFR: 8301206: Fix issue with LocaleData after JDK-8300719 In-Reply-To: References: Message-ID: On Fri, 27 Jan 2023 01:43:11 GMT, Damon Nguyen wrote: > Localization update didn't include an update to LocaleData file. This PR addresses this by updating the file with the newly translated values. The LocaleDataTest now passes. This should address the recent related failures to LocaleData. The fix itself looks good. Add the bug id to `LocaleDataTest.java` ------------- PR: https://git.openjdk.org/jdk20/pull/118 From dnguyen at openjdk.org Fri Jan 27 02:34:37 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 27 Jan 2023 02:34:37 GMT Subject: [jdk20] RFR: 8301206: Fix issue with LocaleData after JDK-8300719 [v2] In-Reply-To: References: Message-ID: > Localization update didn't include an update to LocaleData file. This PR addresses this by updating the file with the newly translated values. The LocaleDataTest now passes. This should address the recent related failures to LocaleData. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Add bugid. Update year ------------- Changes: - all: https://git.openjdk.org/jdk20/pull/118/files - new: https://git.openjdk.org/jdk20/pull/118/files/a1d7fc21..87a37655 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk20&pr=118&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk20&pr=118&range=00-01 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk20/pull/118.diff Fetch: git fetch https://git.openjdk.org/jdk20 pull/118/head:pull/118 PR: https://git.openjdk.org/jdk20/pull/118 From dnguyen at openjdk.org Fri Jan 27 02:54:16 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 27 Jan 2023 02:54:16 GMT Subject: [jdk20] RFR: 8301206: Fix issue with LocaleData after JDK-8300719 [v2] In-Reply-To: References: Message-ID: <9AKbqVXq9FN90NcKKnCEKl0U8CV26o8p_2ogpQPXTbU=.ed3fe886-ce24-4380-a3b0-dbe0b9ce5203@github.com> On Fri, 27 Jan 2023 02:02:34 GMT, Naoto Sato wrote: > The fix itself looks good. Add the bug id to `LocaleDataTest.java` Added BugID to the list of BugID's in `LocaleDataTest.java` ------------- PR: https://git.openjdk.org/jdk20/pull/118 From naoto at openjdk.org Fri Jan 27 13:32:21 2023 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 27 Jan 2023 13:32:21 GMT Subject: [jdk20] RFR: 8301206: Fix issue with LocaleData after JDK-8300719 [v2] In-Reply-To: References: Message-ID: On Fri, 27 Jan 2023 02:34:37 GMT, Damon Nguyen wrote: >> Localization update didn't include an update to LocaleData file. This PR addresses this by updating the file with the newly translated values. The LocaleDataTest now passes. This should address the recent related failures to LocaleData. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Add bugid. Update year Marked as reviewed by naoto (Reviewer). ------------- PR: https://git.openjdk.org/jdk20/pull/118 From rgiulietti at openjdk.org Fri Jan 27 16:10:23 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Fri, 27 Jan 2023 16:10:23 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter Message-ID: Align `double` and `float` decimal conversions in `java.util.Formatter` with the algorithm used in `Double.toString(double)`. ------------- Commit messages: - 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter Changes: https://git.openjdk.org/jdk/pull/12259/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12259&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8300869 Stats: 720 lines in 4 files changed: 319 ins; 372 del; 29 mod Patch: https://git.openjdk.org/jdk/pull/12259.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12259/head:pull/12259 PR: https://git.openjdk.org/jdk/pull/12259 From rgiulietti at openjdk.org Fri Jan 27 16:18:17 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Fri, 27 Jan 2023 16:18:17 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter In-Reply-To: References: Message-ID: On Fri, 27 Jan 2023 16:02:38 GMT, Raffaello Giulietti wrote: > Align `double` and `float` decimal conversions in `java.util.Formatter` with the algorithm used in `Double.toString(double)`. The specification in `Formatter` explicitly refers to the outcome of `Double.toString(double)`. However, it currently uses another implementation for the floating-point to decimal conversion, which might end up in rare, slightly different outcomes than the ones described in the specification. This fixes the discrepancy between specification and implementation in `Formatter`. Class `jdk.internal.math.FormattedFPDecimal` replaces `jdk.internal.math.FormattedFloatingDecimal`, which is no longer needed. ------------- PR: https://git.openjdk.org/jdk/pull/12259 From dnguyen at openjdk.org Fri Jan 27 17:25:25 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 27 Jan 2023 17:25:25 GMT Subject: [jdk20] Integrated: 8301206: Fix issue with LocaleData after JDK-8300719 In-Reply-To: References: Message-ID: <06LTdXFKqGB_hvVkZ4zUC0DsiY_WPwLuTt9d6Yqu6-k=.26533a47-ed2a-4e61-b749-0efbaab0010b@github.com> On Fri, 27 Jan 2023 01:43:11 GMT, Damon Nguyen wrote: > Localization update didn't include an update to LocaleData file. This PR addresses this by updating the file with the newly translated values. The LocaleDataTest now passes. This should address the recent related failures to LocaleData. This pull request has now been integrated. Changeset: e5860ef6 Author: Damon Nguyen Committer: Naoto Sato URL: https://git.openjdk.org/jdk20/commit/e5860ef60a9353508afb09716158baf8bfb35559 Stats: 54 lines in 2 files changed: 1 ins; 0 del; 53 mod 8301206: Fix issue with LocaleData after JDK-8300719 Reviewed-by: naoto ------------- PR: https://git.openjdk.org/jdk20/pull/118 From rgiulietti at openjdk.org Fri Jan 27 18:19:58 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Fri, 27 Jan 2023 18:19:58 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v2] In-Reply-To: References: Message-ID: > Align `double` and `float` decimal conversions in `java.util.Formatter` with the algorithm used in `Double.toString(double)`. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter Added tests for known differences between current and new behavior. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/12259/files - new: https://git.openjdk.org/jdk/pull/12259/files/bcbbe1e9..d42fbd03 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=12259&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12259&range=00-01 Stats: 188 lines in 20 files changed: 168 ins; 0 del; 20 mod Patch: https://git.openjdk.org/jdk/pull/12259.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12259/head:pull/12259 PR: https://git.openjdk.org/jdk/pull/12259 From rgiulietti at openjdk.org Fri Jan 27 18:25:17 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Fri, 27 Jan 2023 18:25:17 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v2] In-Reply-To: References: Message-ID: On Fri, 27 Jan 2023 18:19:58 GMT, Raffaello Giulietti wrote: >> Align `double` and `float` decimal conversions in `java.util.Formatter` with the algorithm used in `Double.toString(double)`. > > Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: > > 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter > > Added tests for known differences between current and new behavior. Added tests for known differences. Most of the modified files are generated automatically by a script that, somewhat questionably, renews the copyright year in some of the files for no apparent reason. ------------- PR: https://git.openjdk.org/jdk/pull/12259 From duke at openjdk.org Fri Jan 27 18:43:34 2023 From: duke at openjdk.org (duke) Date: Fri, 27 Jan 2023 18:43:34 GMT Subject: Withdrawn: 8296546: Add @spec tags to API In-Reply-To: <5uS_XWg0xRt6Rp20wY65rAmNRcDrp5XN_74k1aQ_4jk=.9f458354-9bca-473e-b60e-e520fa90724b@github.com> References: <5uS_XWg0xRt6Rp20wY65rAmNRcDrp5XN_74k1aQ_4jk=.9f458354-9bca-473e-b60e-e520fa90724b@github.com> Message-ID: On Thu, 10 Nov 2022 01:10:13 GMT, Jonathan Gibbons wrote: > Please review a "somewhat automated" change to insert `@spec` tags into doc comments, as appropriate, to leverage the recent new javadoc feature to generate a new page listing the references to all external specifications listed in the `@spec` tags. > > "Somewhat automated" means that I wrote and used a temporary utility to scan doc comments looking for HTML links to selected sites, such as `ietf.org`, `unicode.org`, `w3.org`. These links may be in the main description of a doc comment, or in `@see` tags. For each link, the URL is examined, and "normalized", and inserted into the doc comment with a new `@spec` tag, giving the link and tile for the spec. > > "Normalized" means... > * Use `https:` where possible (includes pretty much all cases) > * Use a single consistent host name for all URLs coming from the same spec site (i.e. don't use different aliases for the same site) > * Point to the root page of a multi-page spec > * Use a consistent form of the spec, preferring HTML over plain text where both are available (this mostly applies to IETF specs) > > In addition, a "standard" title is determined for all specs, determined either from the content of the (main) spec page or from site index pages. > > The net effect is (or should be) that **all** the changes are to just **add** new `@spec` tags, based on the links found in each doc comment. There should be no other changes to the doc comments, or to the implementation of any classes and interfaces. > > That being said, the utility I wrote does have additional abilities, to update the links that it finds (e.g. changing to use `https:` etc,) but those features are _not_ being used here, but could be used in followup PRs if component teams so desired. I did notice while working on this overall feature that many of our links do point to "outdated" pages, some with eye-catching notices declaring that the spec has been superseded. Determining how, when and where to update such links is beyond the scope of this PR. > > Going forward, it is to be hoped that component teams will maintain the underlying links, and the URLs in `@spec` tags, such that if references to external specifications are updated, this will include updating the `@spec` tags. > > To see the effect of all these new `@spec` tags, see http://cr.openjdk.java.net/~jjg/8296546/api.00/ > > In particular, see the new [External Specifications](http://cr.openjdk.java.net/~jjg/8296546/api.00/external-specs.html) page, which you can also find via the new link near the top of the [Index](http://cr.openjdk.java.net/~jjg/8296546/api.00/index-files/index-1.html) pages. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/11073 From rriggs at openjdk.org Fri Jan 27 19:59:19 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 27 Jan 2023 19:59:19 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v2] In-Reply-To: References: Message-ID: On Fri, 27 Jan 2023 18:19:58 GMT, Raffaello Giulietti wrote: >> Align `double` and `float` decimal conversions in `java.util.Formatter` with the algorithm used in `Double.toString(double)`. > > Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: > > 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter > > Added tests for known differences between current and new behavior. test/jdk/java/util/Formatter/BasicInt.java line 1: > 1: /* It looks line the non-float/double test classes are unchanged, they could be dropped from the PR. ------------- PR: https://git.openjdk.org/jdk/pull/12259 From jwilhelm at openjdk.org Fri Jan 27 21:08:40 2023 From: jwilhelm at openjdk.org (Jesper Wilhelmsson) Date: Fri, 27 Jan 2023 21:08:40 GMT Subject: RFR: Merge jdk20 Message-ID: <7o8i6xuRhpJrSJJg2EUyu-JPcawJAytTWS3yHX3PZd0=.0157940a-bbb2-4dc0-a645-5cde446d5052@github.com> Forwardport JDK 20 -> JDK 21 ------------- Commit messages: - Merge remote-tracking branch 'jdk20/master' into Merge_jdk20 - 8301206: Fix issue with LocaleData after JDK-8300719 - 8300953: ClassDesc::ofInternalName missing @since tag - 8300719: JDK 20 RDP2 L10n resource files update The webrevs contain the adjustments done while merging with regards to each parent branch: - master: https://webrevs.openjdk.org/?repo=jdk&pr=12267&range=00.0 - jdk20: https://webrevs.openjdk.org/?repo=jdk&pr=12267&range=00.1 Changes: https://git.openjdk.org/jdk/pull/12267/files Stats: 1078 lines in 85 files changed: 220 ins; 114 del; 744 mod Patch: https://git.openjdk.org/jdk/pull/12267.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12267/head:pull/12267 PR: https://git.openjdk.org/jdk/pull/12267 From rgiulietti at openjdk.org Fri Jan 27 21:30:18 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Fri, 27 Jan 2023 21:30:18 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v2] In-Reply-To: References: Message-ID: <_KVrr_BXbGV8pPxdRL3L4CHHR-0A8Y6KuSSDGEZSG_w=.b6a9b4b0-ebe8-4f74-80c0-dc9a42f73a22@github.com> On Fri, 27 Jan 2023 19:56:28 GMT, Roger Riggs wrote: >> Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: >> >> 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter >> >> Added tests for known differences between current and new behavior. > > test/jdk/java/util/Formatter/BasicInt.java line 1: > >> 1: /* > > It looks line the non-float/double test classes are unchanged, they could be dropped from the PR. The only changes I made myself in the test files are in Basic-X.java.template (including the copyright year). The other files were generated by a script, which happens to also change the copyright year for otherwise unmodified files. If you agree, I'll happily remove the trivial copyright year changes and only retain those files containing more substantial modifications. ------------- PR: https://git.openjdk.org/jdk/pull/12259 From rriggs at openjdk.org Fri Jan 27 22:13:19 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 27 Jan 2023 22:13:19 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v2] In-Reply-To: <_KVrr_BXbGV8pPxdRL3L4CHHR-0A8Y6KuSSDGEZSG_w=.b6a9b4b0-ebe8-4f74-80c0-dc9a42f73a22@github.com> References: <_KVrr_BXbGV8pPxdRL3L4CHHR-0A8Y6KuSSDGEZSG_w=.b6a9b4b0-ebe8-4f74-80c0-dc9a42f73a22@github.com> Message-ID: <9Bv6duFlBn492Tk9zzMa3P3c6Lzm7rViBUJwaAzkUlc=.0db9a6d8-f2e7-47c1-8647-c3a7d5be3069@github.com> On Fri, 27 Jan 2023 21:27:57 GMT, Raffaello Giulietti wrote: >> test/jdk/java/util/Formatter/BasicInt.java line 1: >> >>> 1: /* >> >> It looks line the non-float/double test classes are unchanged, they could be dropped from the PR. > > The only changes I made myself in the test files are in Basic-X.java.template (including the copyright year). The other files were generated by a script, which happens to also change the copyright year for otherwise unmodified files. > > If you agree, I'll happily remove the trivial copyright year changes and only retain those files containing more substantial modifications. Fine with me, I figured it was the script that changed the copyright and otherwise generated the same as before. tnx ------------- PR: https://git.openjdk.org/jdk/pull/12259 From rgiulietti at openjdk.org Fri Jan 27 22:26:58 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Fri, 27 Jan 2023 22:26:58 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v3] In-Reply-To: References: Message-ID: > Align `double` and `float` decimal conversions in `java.util.Formatter` with the algorithm used in `Double.toString(double)`. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter Reverted back copyright year of otherwise untouched files. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/12259/files - new: https://git.openjdk.org/jdk/pull/12259/files/d42fbd03..6f026d45 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=12259&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12259&range=01-02 Stats: 14 lines in 14 files changed: 0 ins; 0 del; 14 mod Patch: https://git.openjdk.org/jdk/pull/12259.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12259/head:pull/12259 PR: https://git.openjdk.org/jdk/pull/12259 From rgiulietti at openjdk.org Fri Jan 27 22:26:58 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Fri, 27 Jan 2023 22:26:58 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v2] In-Reply-To: <9Bv6duFlBn492Tk9zzMa3P3c6Lzm7rViBUJwaAzkUlc=.0db9a6d8-f2e7-47c1-8647-c3a7d5be3069@github.com> References: <_KVrr_BXbGV8pPxdRL3L4CHHR-0A8Y6KuSSDGEZSG_w=.b6a9b4b0-ebe8-4f74-80c0-dc9a42f73a22@github.com> <9Bv6duFlBn492Tk9zzMa3P3c6Lzm7rViBUJwaAzkUlc=.0db9a6d8-f2e7-47c1-8647-c3a7d5be3069@github.com> Message-ID: On Fri, 27 Jan 2023 22:10:38 GMT, Roger Riggs wrote: >> The only changes I made myself in the test files are in Basic-X.java.template (including the copyright year). The other files were generated by a script, which happens to also change the copyright year for otherwise unmodified files. >> >> If you agree, I'll happily remove the trivial copyright year changes and only retain those files containing more substantial modifications. > > Fine with me, I figured it was the script that changed the copyright and otherwise generated the same as before. tnx Otherwise untouched files are now reverted back with previous copyright year ------------- PR: https://git.openjdk.org/jdk/pull/12259 From jwilhelm at openjdk.org Fri Jan 27 22:49:26 2023 From: jwilhelm at openjdk.org (Jesper Wilhelmsson) Date: Fri, 27 Jan 2023 22:49:26 GMT Subject: Integrated: Merge jdk20 In-Reply-To: <7o8i6xuRhpJrSJJg2EUyu-JPcawJAytTWS3yHX3PZd0=.0157940a-bbb2-4dc0-a645-5cde446d5052@github.com> References: <7o8i6xuRhpJrSJJg2EUyu-JPcawJAytTWS3yHX3PZd0=.0157940a-bbb2-4dc0-a645-5cde446d5052@github.com> Message-ID: On Fri, 27 Jan 2023 21:00:03 GMT, Jesper Wilhelmsson wrote: > Forwardport JDK 20 -> JDK 21 This pull request has now been integrated. Changeset: 5c59de52 Author: Jesper Wilhelmsson URL: https://git.openjdk.org/jdk/commit/5c59de52a31da937663ad2cef055213489b0516e Stats: 1078 lines in 85 files changed: 220 ins; 114 del; 744 mod Merge ------------- PR: https://git.openjdk.org/jdk/pull/12267 From aivanov at openjdk.org Sat Jan 28 18:55:16 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Sat, 28 Jan 2023 18:55:16 GMT Subject: RFR: 4934362: see also refers to self [v4] In-Reply-To: References: Message-ID: On Mon, 9 Jan 2023 03:57:17 GMT, Prasanta Sadhukhan wrote: >> Some methods and constants has a hyperreference to self in javadoc which is rectified to reference proper methods > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Point to isEditable method Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11820 From ihse at openjdk.org Sat Jan 28 21:11:19 2023 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Sat, 28 Jan 2023 21:11:19 GMT Subject: RFR: 8298045: Fix hidden but significant trailing whitespace in properties files for core-libs code In-Reply-To: References: Message-ID: On Fri, 2 Dec 2022 16:40:51 GMT, Magnus Ihse Bursie wrote: > According to [the specification](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/Properties.html#load(java.io.Reader)) trailing whitespaces in the values of properties files are (somewhat surprisingly) actually significant. > > We have multiple files in the JDK with trailing whitespaces in the values. For most of this files, this is likely incorrect and due to oversight, but in a few cases it might actually be intended (like "The value is: "). > > After a discussion in the PR for [JDK-8295729](https://bugs.openjdk.org/browse/JDK-8295729), the consensus was to replace valid trailing spaces with the corresponding unicode sequence, `\u0020`. (And of course remove non-wanted trailing spaces.) > > Doing so has a dual benefit: > > 1) It makes it clear to everyone reading the code that there is a trailing space and it is intended > > 2) It will allow us to remove all actual trailing space characters, and turn on the corresponding check in jcheck to keep the properties files, just like all other source code files, free of trailing spaces. > > Ultimately, the call of whether a trailing space is supposed to be there, or is a bug, lies with the respective component teams owning these files. Thus I have split up the set of properties files with trailing spaces in several groups, to match the JDK teams, and open a JBS issue for each of them. This issue is for code I believe belong with the core-libs team. Bot-Keep-Alive-Ping ------------- PR: https://git.openjdk.org/jdk/pull/11489 From rgiulietti at openjdk.org Mon Jan 30 14:33:06 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Mon, 30 Jan 2023 14:33:06 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v4] In-Reply-To: References: Message-ID: > Align `double` and `float` decimal conversions in `java.util.Formatter` with the algorithm used in `Double.toString(double)`. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter ------------- Changes: - all: https://git.openjdk.org/jdk/pull/12259/files - new: https://git.openjdk.org/jdk/pull/12259/files/6f026d45..d5592324 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=12259&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12259&range=02-03 Stats: 15 lines in 1 file changed: 15 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/12259.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12259/head:pull/12259 PR: https://git.openjdk.org/jdk/pull/12259 From darcy at openjdk.org Mon Jan 30 18:44:43 2023 From: darcy at openjdk.org (Joe Darcy) Date: Mon, 30 Jan 2023 18:44:43 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v2] In-Reply-To: References: Message-ID: On Fri, 27 Jan 2023 18:22:11 GMT, Raffaello Giulietti wrote: >> Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: >> >> 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter >> >> Added tests for known differences between current and new behavior. > > Added tests for known differences. > > Most of the modified files are generated automatically by a script that, somewhat questionably, renews the copyright year in some of the files for no apparent reason. I've spoken to @rgiulietti about this PR; since there behavioral changes of possible interest, I'm requesting a CSR to cover those changes. ------------- PR: https://git.openjdk.org/jdk/pull/12259 From darcy at openjdk.org Mon Jan 30 18:50:14 2023 From: darcy at openjdk.org (Joe Darcy) Date: Mon, 30 Jan 2023 18:50:14 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v4] In-Reply-To: References: Message-ID: On Mon, 30 Jan 2023 14:33:06 GMT, Raffaello Giulietti wrote: >> Align `double` and `float` decimal conversions in `java.util.Formatter` with the algorithm used in `Double.toString(double)`. > > Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: > > 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter test/jdk/java/util/Formatter/Basic-X.java.template line 935: > 933: > 934: //--------------------------------------------------------------------- > 935: // %e - adoption of Double.toString(double) algorithm (8300869) Nit: we generally don't use the bug ids in comments like this, usually at most relying on a bug listed in the test "@bug" line. ------------- PR: https://git.openjdk.org/jdk/pull/12259 From rgiulietti at openjdk.org Mon Jan 30 18:54:32 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Mon, 30 Jan 2023 18:54:32 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v4] In-Reply-To: References: Message-ID: On Mon, 30 Jan 2023 18:47:31 GMT, Joe Darcy wrote: >> Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: >> >> 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter > > test/jdk/java/util/Formatter/Basic-X.java.template line 935: > >> 933: >> 934: //--------------------------------------------------------------------- >> 935: // %e - adoption of Double.toString(double) algorithm (8300869) > > Nit: we generally don't use the bug ids in comments like this, usually at most relying on a bug listed in the test "@bug" line. The bug id was added there because I'm not sure there's a way to add the @bug line to Basic-X.java.template`. ------------- PR: https://git.openjdk.org/jdk/pull/12259 From rgiulietti at openjdk.org Mon Jan 30 19:49:31 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Mon, 30 Jan 2023 19:49:31 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v5] In-Reply-To: References: Message-ID: > Align `double` and `float` decimal conversions in `java.util.Formatter` with the algorithm used in `Double.toString(double)`. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter ------------- Changes: - all: https://git.openjdk.org/jdk/pull/12259/files - new: https://git.openjdk.org/jdk/pull/12259/files/d5592324..0c72b743 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=12259&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12259&range=03-04 Stats: 8 lines in 1 file changed: 6 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/12259.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12259/head:pull/12259 PR: https://git.openjdk.org/jdk/pull/12259 From rgiulietti at openjdk.org Mon Jan 30 19:49:32 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Mon, 30 Jan 2023 19:49:32 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v4] In-Reply-To: References: Message-ID: On Mon, 30 Jan 2023 14:33:06 GMT, Raffaello Giulietti wrote: >> Align `double` and `float` decimal conversions in `java.util.Formatter` with the algorithm used in `Double.toString(double)`. > > Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: > > 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter The CSR has been added. It covers both a behavioral change due to the implementation change in this PR, _and_ a specification change to align it with the implementation (current and proposed), resolving a long standing mismatch in the `e`, `f`, and `g` conversions on `float` values. ------------- PR: https://git.openjdk.org/jdk/pull/12259 From darcy at openjdk.org Mon Jan 30 19:51:56 2023 From: darcy at openjdk.org (Joe Darcy) Date: Mon, 30 Jan 2023 19:51:56 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v4] In-Reply-To: References: Message-ID: On Mon, 30 Jan 2023 18:52:11 GMT, Raffaello Giulietti wrote: >> test/jdk/java/util/Formatter/Basic-X.java.template line 935: >> >>> 933: >>> 934: //--------------------------------------------------------------------- >>> 935: // %e - adoption of Double.toString(double) algorithm (8300869) >> >> Nit: we generally don't use the bug ids in comments like this, usually at most relying on a bug listed in the test "@bug" line. > > The bug id was added there because I'm not sure there's a way to add the @bug line to Basic-X.java.template`. I see; it might suffice in this case to rely on the bug information in the SCM history, but I don't have a strong opinion. ------------- PR: https://git.openjdk.org/jdk/pull/12259 From rgiulietti at openjdk.org Mon Jan 30 20:12:59 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Mon, 30 Jan 2023 20:12:59 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v4] In-Reply-To: References: Message-ID: On Mon, 30 Jan 2023 19:48:50 GMT, Joe Darcy wrote: >> The bug id was added there because I'm not sure there's a way to add the @bug line to Basic-X.java.template`. > > I see; it might suffice in this case to rely on the bug information in the SCM history, but I don't have a strong opinion. In this specific `*.java.template` case, I think that the bug id in the comment somehow replaces the lack of the @bug line. But I have no problems in removing it if there are stronger opinions. ------------- PR: https://git.openjdk.org/jdk/pull/12259 From stsypanov at openjdk.org Tue Jan 31 11:54:47 2023 From: stsypanov at openjdk.org (Sergey Tsypanov) Date: Tue, 31 Jan 2023 11:54:47 GMT Subject: RFR: 8301492: Modernize equals() method of ResourceBundle.CacheKey and Bundles.CacheKey Message-ID: <5xdnQZ8wLrkyB6U2miAOizqpvHGTFzy7OF_a24CUabc=.db6a65d7-9a29-44dc-94aa-692fbbfc82c7@github.com> `ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire outdated. This simple clean-up modernizes them. ------------- Commit messages: - Copyright year update - Modernize Bubldes.equals() Changes: https://git.openjdk.org/jdk/pull/12328/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12328&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8301492 Stats: 13 lines in 2 files changed: 0 ins; 4 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/12328.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12328/head:pull/12328 PR: https://git.openjdk.org/jdk/pull/12328 From stsypanov at openjdk.org Tue Jan 31 11:54:49 2023 From: stsypanov at openjdk.org (Sergey Tsypanov) Date: Tue, 31 Jan 2023 11:54:49 GMT Subject: RFR: 8301492: Modernize equals() method of ResourceBundle.CacheKey and Bundles.CacheKey In-Reply-To: <5xdnQZ8wLrkyB6U2miAOizqpvHGTFzy7OF_a24CUabc=.db6a65d7-9a29-44dc-94aa-692fbbfc82c7@github.com> References: <5xdnQZ8wLrkyB6U2miAOizqpvHGTFzy7OF_a24CUabc=.db6a65d7-9a29-44dc-94aa-692fbbfc82c7@github.com> Message-ID: On Tue, 31 Jan 2023 11:40:43 GMT, Sergey Tsypanov wrote: > `ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire outdated. This simple clean-up modernizes them. Btw, in `ResourceBundle.CacheKey.equals()` can we replace Module module = getModule(); Module caller = getCallerModule(); return Objects.equals(module, otherEntry.getModule()) && Objects.equals(caller, otherEntry.getCallerModule()); with return moduleRef.refersTo(otherEntry.getModule()) && callerRef.refersTo(otherEntry.getCallerModule()); ? ------------- PR: https://git.openjdk.org/jdk/pull/12328 From rgiulietti at openjdk.org Tue Jan 31 13:39:15 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Tue, 31 Jan 2023 13:39:15 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v6] In-Reply-To: References: Message-ID: > Align `double` and `float` decimal conversions in `java.util.Formatter` with the algorithm used in `Double.toString(double)`. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter ------------- Changes: - all: https://git.openjdk.org/jdk/pull/12259/files - new: https://git.openjdk.org/jdk/pull/12259/files/0c72b743..bfe3d155 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=12259&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12259&range=04-05 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/12259.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12259/head:pull/12259 PR: https://git.openjdk.org/jdk/pull/12259 From pminborg at openjdk.org Tue Jan 31 16:09:34 2023 From: pminborg at openjdk.org (Per Minborg) Date: Tue, 31 Jan 2023 16:09:34 GMT Subject: RFR: 8301552: Use AtomicReferenceArray for caching instead of CHM in ZoneOffset Message-ID: `ZoneOffset` instances are cached by the `ZoneOffset` class itself for values in the range [-18h, 18h] for each second that is on an even quarter of an hour (i.e. at most 2*18*4+1 = 145 values). Instead of using a `ConcurrentHashMap` for caching instanced, we could instead use an `AtomicReferenceArray` with direct slot value access for said even seconds. This will improve performance and reduce the number of object even though the backing array will go from an initial 32 in the CHM to an initial/final 145 in the ARA. The CHM will contain much more objects and array slots for typical numbers of entries in the cache and will compute hash/bucket/collision on the hot code path for each cache access. ------------- Commit messages: - Update copyright years - Use AtomicReferenceArray for caching instead of CHM Changes: https://git.openjdk.org/jdk/pull/12346/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12346&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8301552 Stats: 39 lines in 2 files changed: 22 ins; 6 del; 11 mod Patch: https://git.openjdk.org/jdk/pull/12346.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12346/head:pull/12346 PR: https://git.openjdk.org/jdk/pull/12346 From pminborg at openjdk.org Tue Jan 31 16:09:36 2023 From: pminborg at openjdk.org (Per Minborg) Date: Tue, 31 Jan 2023 16:09:36 GMT Subject: RFR: 8301552: Use AtomicReferenceArray for caching instead of CHM in ZoneOffset In-Reply-To: References: Message-ID: <1su0_EK4Sx_blL9MQLS7147NWLaYH80QCSvM2iyV7h4=.6c053033-45ce-4234-912c-3de05ee0ef46@github.com> On Tue, 31 Jan 2023 15:57:43 GMT, Per Minborg wrote: > `ZoneOffset` instances are cached by the `ZoneOffset` class itself for values in the range [-18h, 18h] for each second that is on an even quarter of an hour (i.e. at most 2*18*4+1 = 145 values). > > Instead of using a `ConcurrentHashMap` for caching instanced, we could instead use an `AtomicReferenceArray` with direct slot value access for said even seconds. This will improve performance and reduce the number of object even though the backing array will go from an initial 32 in the CHM to an initial/final 145 in the ARA. The CHM will contain much more objects and array slots for typical numbers of entries in the cache and will compute hash/bucket/collision on the hot code path for each cache access. src/java.base/share/classes/java/time/ZoneOffset.java line 432: > 430: if (totalSeconds % (15 * SECONDS_PER_MINUTE) == 0) { > 431: int slot = cacheSlot(totalSeconds); > 432: ZoneOffset cached = SECONDS_CACHE.get(slot); I miss `AtomicReferenceArray::computeIfNull` that atomically will compute an element if the value at a certain index is `null`. ------------- PR: https://git.openjdk.org/jdk/pull/12346 From mchung at openjdk.org Tue Jan 31 17:35:22 2023 From: mchung at openjdk.org (Mandy Chung) Date: Tue, 31 Jan 2023 17:35:22 GMT Subject: RFR: 8301492: Modernize equals() method of ResourceBundle.CacheKey and Bundles.CacheKey In-Reply-To: <5xdnQZ8wLrkyB6U2miAOizqpvHGTFzy7OF_a24CUabc=.db6a65d7-9a29-44dc-94aa-692fbbfc82c7@github.com> References: <5xdnQZ8wLrkyB6U2miAOizqpvHGTFzy7OF_a24CUabc=.db6a65d7-9a29-44dc-94aa-692fbbfc82c7@github.com> Message-ID: <8ViNuPWf2wFEzWB7ZWJTbHHxOqI16j0eBzRLZGzOYB4=.bf101b4d-df41-4979-a07d-0caa992dad94@github.com> On Tue, 31 Jan 2023 11:40:43 GMT, Sergey Tsypanov wrote: > `ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire outdated. This simple clean-up modernizes them. return moduleRef.refersTo(otherEntry.getModule()) && callerRef.refersTo(otherEntry.getCallerModule()); You need to check if module and caller module are non-null. `equals` returns true only if the module and callerModule of this `CacheKey` and other `CacheKey` are the same and non-null. ------------- PR: https://git.openjdk.org/jdk/pull/12328 From bpb at openjdk.org Tue Jan 31 18:15:24 2023 From: bpb at openjdk.org (Brian Burkhalter) Date: Tue, 31 Jan 2023 18:15:24 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v4] In-Reply-To: References: Message-ID: On Mon, 30 Jan 2023 20:10:17 GMT, Raffaello Giulietti wrote: >> I see; it might suffice in this case to rely on the bug information in the SCM history, but I don't have a strong opinion. > > In this specific `*.java.template` case, I think that the bug id in the comment somehow replaces the lack of the @bug line. > But I have no problems in removing it if there are stronger opinions. The `@bug` tag is in `BasicTestLauncher` which is where 8300869 should likely go. ------------- PR: https://git.openjdk.org/jdk/pull/12259 From rgiulietti at openjdk.org Tue Jan 31 18:30:14 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Tue, 31 Jan 2023 18:30:14 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v7] In-Reply-To: References: Message-ID: > Align `double` and `float` decimal conversions in `java.util.Formatter` with the algorithm used in `Double.toString(double)`. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter ------------- Changes: - all: https://git.openjdk.org/jdk/pull/12259/files - new: https://git.openjdk.org/jdk/pull/12259/files/bfe3d155..5e488a70 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=12259&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12259&range=05-06 Stats: 19 lines in 7 files changed: 0 ins; 0 del; 19 mod Patch: https://git.openjdk.org/jdk/pull/12259.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12259/head:pull/12259 PR: https://git.openjdk.org/jdk/pull/12259 From rgiulietti at openjdk.org Tue Jan 31 18:30:15 2023 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Tue, 31 Jan 2023 18:30:15 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v4] In-Reply-To: References: Message-ID: On Tue, 31 Jan 2023 18:12:45 GMT, Brian Burkhalter wrote: >> In this specific `*.java.template` case, I think that the bug id in the comment somehow replaces the lack of the @bug line. >> But I have no problems in removing it if there are stronger opinions. > > The `@bug` tag is in `BasicTestLauncher` which is where 8300869 should likely go. Thanks @bplb for pointing to the right place. Done ------------- PR: https://git.openjdk.org/jdk/pull/12259 From darcy at openjdk.org Tue Jan 31 22:21:51 2023 From: darcy at openjdk.org (Joe Darcy) Date: Tue, 31 Jan 2023 22:21:51 GMT Subject: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v7] In-Reply-To: References: Message-ID: On Tue, 31 Jan 2023 18:30:14 GMT, Raffaello Giulietti wrote: >> Align `double` and `float` decimal conversions in `java.util.Formatter` with the algorithm used in `Double.toString(double)`. > > Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: > > 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter Marked as reviewed by darcy (Reviewer). src/java.base/share/classes/jdk/internal/math/FormattedFPDecimal.java line 28: > 26: package jdk.internal.math; > 27: > 28: public final class FormattedFPDecimal { I suggest adding a short explanation of what this class is used for. ------------- PR: https://git.openjdk.org/jdk/pull/12259