Re: RFR: 8289834: Add SBCS and DBCS Only EBCDIC charsets

2022-07-07 Thread Alan Bateman
On Wed, 6 Jul 2022 16:18:08 GMT, Ichiroh Takiguchi wrote: > Discussions are available on : > [JDK-8289834](https://bugs.openjdk.org/browse/JDK-8289834): Add SBCS and DBCS > Only EBCDIC charsets Yes, I think this need discussion on whether the JDK really needs to keep including and adding more

Re: RFR: 8289768: Clean up unused code [v3]

2022-07-08 Thread Alan Bateman
On Fri, 8 Jul 2022 07:08:46 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list >> of disabled warnings

Re: RFR: 8290300: Use standard String-joining tools where applicable

2022-07-15 Thread Alan Bateman
On Fri, 15 Jul 2022 12:03:13 GMT, Сергей Цыпанов wrote: > Simplify code with `String.join()` joptsimple is a 3rd party code so we probably don't want to change that. - PR: https://git.openjdk.org/jdk/pull/9513

Re: RFR: 8290316: Ensure that all directory streams are closed in java.base

2022-07-15 Thread Alan Bateman
On Fri, 15 Jul 2022 16:06:21 GMT, Ryan Ernst wrote: > This commit guards uses of Files methods returning path streams in > java.base to use try-with-resources. Changing these usages to close the stream is good but needs to keep the formatting/style consistent with the existing code. Also can yo

Re: RFR: 8290316: Ensure that all directory streams are closed in java.base

2022-07-15 Thread Alan Bateman
On Fri, 15 Jul 2022 16:06:21 GMT, Ryan Ernst wrote: > This commit guards uses of Files methods returning path streams in > java.base to use try-with-resources. src/java.base/share/classes/jdk/internal/module/ModuleHashes.java line 119: > 117: } > 118: try { > 119: by

Re: RFR: 8290488: IBM864 character encoding implementation bug

2022-08-02 Thread Alan Bateman
On Wed, 27 Jul 2022 17:47:36 GMT, Naoto Sato wrote: > Adding an extra c2b mapping for the `%` in `IBM864` charset. The discrepancy > came from the mapping difference between MS and IBM. test/jdk/java/beans/XMLEncoder/Test4625418.java line 26: > 24: /* > 25: * @test > 26: * @bug 4625418 82399

Re: RFR: 8290488: IBM864 character encoding implementation bug

2022-08-02 Thread Alan Bateman
On Wed, 27 Jul 2022 17:47:36 GMT, Naoto Sato wrote: > Adding an extra c2b mapping for the `%` in `IBM864` charset. The discrepancy > came from the mapping difference between MS and IBM. Marked as reviewed by alanb (Reviewer). - PR: https://git.openjdk.org/jdk/pull/9661

Re: RFR: 8291916: Unexpected output on Arabic Windows command prompt

2022-08-04 Thread Alan Bateman
On Fri, 5 Aug 2022 02:15:21 GMT, Ichiroh Takiguchi wrote: > To support Windows command prompt's codepage, following charsets should be > moved from jdk.charsets module to java.base module. > > - IBM860 > - IBM861 > - IBM863 > - IBM864 > - IBM865 > - IBM869 IBM860 is Portuguese, IBM861 is Icel

Re: RFR: 8289834: Add SBCS and DBCS Only EBCDIC charsets

2022-08-08 Thread Alan Bateman
On Mon, 8 Aug 2022 00:19:57 GMT, Ichiroh Takiguchi wrote: > As you know `sun.nio.cs.ArrayDecoder` and `sun.nio.cs.ArrayEncoder`interface > have performance advantage. And some other performance advantages are there > on built-in charset decoder/encoder. Is it possible to create simple public

Re: RFR: 8289834: Add SBCS and DBCS Only EBCDIC charsets

2022-08-26 Thread Alan Bateman
On Wed, 6 Jul 2022 14:05:39 GMT, Ichiroh Takiguchi wrote: > OpenJDK supports "Japanese EBCDIC - Katakana" and "Korean EBCDIC" SBCS and > DBCS Only charsets. > |Charset|Mix|SBCS|DBCS| > | -- | -- | -- | -- | > | Japanese EBCDIC - Katakana | Cp930 | Cp290 | Cp300 | > | Korean | Cp933 | Cp833 | Cp

Re: RFR: 8292579: (tz) Update Timezone Data to 2022c

2022-09-03 Thread Alan Bateman
On Thu, 25 Aug 2022 02:26:19 GMT, Yoshiki Sato wrote: > Please review this PR. The PR adopts the official tzdata2022c as it is. > It means the pre-1970s data merged in tzdata2022c doesn't exist. > All tests have been passed with no failures. Marked as reviewed by alanb (Reviewer).

Re: RFR: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni

2022-09-25 Thread Alan Bateman
On Thu, 25 Aug 2022 15:35:53 GMT, Michael Ernst wrote: > 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni src/java.base/share/native/libzip/zlib/zlib.h line 756: > 754:If this is done, the old level and strategy will be applied to the > data > 755:compressed

Re: RFR: 8289834: Add SBCS and DBCS Only EBCDIC charsets

2022-10-03 Thread Alan Bateman
On Mon, 3 Oct 2022 07:14:09 GMT, Ichiroh Takiguchi wrote: > Test results are as follows on RHEL8.6 x86_64 (Intel Core i7 3520M) : > > ``` > 1.8.0_345-b01 > Benchmark Mode Cnt Score Error Units > MyBenchmark.testIBM1047 thrpt 25 53213.092 ± 126.962 ops/s >

Re: RFR: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni [v2]

2022-10-07 Thread Alan Bateman
On Mon, 26 Sep 2022 16:51:36 GMT, Michael Ernst wrote: >> 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni > > Michael Ernst has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains six commits: > > - Reinstate t

Re: RFR: 8284840: Update CLDR to Version 42.0

2022-10-22 Thread Alan Bateman
On Fri, 21 Oct 2022 19:46:36 GMT, Naoto Sato wrote: > Yes. These translation changes affect formatting. We don't usually file a CSR > for such changes, but cover them in our release notes. Indeed and periodically CLDR upgrades do cause breakage somewhere, often it will be a library or applicat

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-11-01 Thread Alan Bateman
On Mon, 31 Oct 2022 13:45:10 GMT, Jim Laskey wrote: >> Yes, it only occurs to me mid review, that said there is already an >> implementation in the jdk of a compact immutable that allow null inside the >> JDK (this implementation is used when stream.toList() is used). >> Using that implementati

Re: RFR: JDK-8296547: Add @spec tags to API

2022-11-10 Thread Alan Bateman
On Thu, 10 Nov 2022 11:30:51 GMT, Daniel Fuchs wrote: > When referencing an RFC, it might be good to keep the RFC number in the text > link. For instance I see that java.net.URL now has this: I agree and also to add that some RFCs have commas in their titles, the same separator used when there

Re: RFR: JDK-8296547: Add @spec tags to API

2022-11-10 Thread Alan Bateman
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

Re: RFR: 8296546: Add @spec tags to API [v3]

2022-11-24 Thread Alan Bateman
On Wed, 23 Nov 2022 18:57:03 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 >> li

Re: RFR: 8298375: Bad copyright header in test/jdk/java/lang/Character/Supplementary.java

2022-12-08 Thread Alan Bateman
On Thu, 8 Dec 2022 10:48:40 GMT, Jaikiran Pai wrote: > Can I get a review of this change which fixes the copyright header on the > test file? Marked as reviewed by alanb (Reviewer). - PR: https://git.openjdk.org/jdk/pull/11583

Re: RFR: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR

2023-01-03 Thread Alan Bateman
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 >

Re: RFR: 8299439: [testbug] java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR after 1.1.2023 and 8296239

2023-01-04 Thread Alan Bateman
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

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor

2023-01-05 Thread Alan Bateman
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 f

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor

2023-01-06 Thread Alan Bateman
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 k

Re: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point

2023-01-11 Thread Alan Bateman
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

Re: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point

2023-01-11 Thread Alan Bateman
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 >

Re: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point [v4]

2023-01-12 Thread Alan Bateman
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

Re: RFR: 8300489: Use ArraysSupport.vectorizedHashCode in j.l.CharacterName

2023-01-18 Thread Alan Bateman
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

Re: RFR: 8302664: Fix several incorrect usages of Preconditions.checkFromIndexSize

2023-02-17 Thread Alan Bateman
On Thu, 16 Feb 2023 14:42:52 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which fixes the usage of > `Preconditions.checkFromIndexSize`? This addresses > https://bugs.openjdk.org/browse/JDK-8302664. > > There was an oversight when these changes were introduced in > http

Re: RFR: 8302815 Use new Math.clamp method in core libraries [v2]

2023-02-19 Thread Alan Bateman
On Sat, 18 Feb 2023 21:40:08 GMT, Tagir F. Valeev wrote: > Revert changes in JrtPath, as it seems to be compiled with bootstrap JDK Yes, the jrt file system provider is compiled --release 8 to create lib/jrt-fs.jar. That's the plumbing needed to allow IDEs/tools running on JDK 8 access the con

Re: RFR: 8302815 Use new Math.clamp method in core libraries [v2]

2023-02-20 Thread Alan Bateman
On Sat, 18 Feb 2023 21:40:08 GMT, Tagir F. Valeev wrote: >> For cleanup and dogfooding the new method, it would be nice to use >> Math.clamp where possible in java.base. See PR #12428. >> >> As Math.clamp performs an additional check that min is not greater than max, >> I conservatively replac

Re: RFR: 8302871: Speed up StringLatin1.regionMatchesCI [v7]

2023-02-21 Thread Alan Bateman
On Tue, 21 Feb 2023 11:14:13 GMT, Eirik Bjorsnos wrote: >> This PR suggests we can speed up `StringLatin1.regionMatchesCI` by applying >> 'the oldest ASCII trick in the book'. >> >> The new static method `CharacterDataLatin1.equalsIgnoreCase` compares two >> latin1 bytes for equality ignoring

Re: RFR: 8301119: Support for GB18030-2022

2023-02-22 Thread Alan Bateman
On Fri, 10 Feb 2023 20:35:58 GMT, Naoto Sato wrote: > Upgrading the GB18030 charset in the JDK to the latest 2022 standard. Since > this is not a compatible upgrade to the existing mapping, a new system > property `jdk.charset.GB18030` is introduced. If it is set to "2000", the > mapping falls

Re: RFR: 8301119: Support for GB18030-2022

2023-02-22 Thread Alan Bateman
On Wed, 22 Feb 2023 10:46:10 GMT, Sean Coffey wrote: > curious - what scenario triggers this call at initLevel < 1 ? It's not supported, but it is possible that someone might run with -Dfile.encoding=GB18030, in which case the default charset is used before the system properties are initialize

Re: RFR: 8301119: Support for GB18030-2022

2023-02-22 Thread Alan Bateman
On Fri, 10 Feb 2023 20:35:58 GMT, Naoto Sato wrote: > Upgrading the GB18030 charset in the JDK to the latest 2022 standard. Since > this is not a compatible upgrade to the existing mapping, a new system > property `jdk.charset.GB18030` is introduced. If it is set to "2000", the > mapping falls

Re: RFR: 8301119: Support for GB18030-2022 [v2]

2023-02-23 Thread Alan Bateman
On Thu, 23 Feb 2023 08:55:08 GMT, Claes Redestad wrote: >> `@Stable` semantics are still fuzzy to me but the rule I've adhered to is >> that back to back stores to the field - if unavoidable - needs to be >> idempotent since the JIT (or AOT) may record any non-null value as a compile >> time c

Re: RFR: 8301119: Support for GB18030-2022 [v2]

2023-02-23 Thread Alan Bateman
On Thu, 23 Feb 2023 09:48:39 GMT, Sean Coffey wrote: > would use of jdk.internal.util.SystemProps be an option here (if having to > retrieve that value when we're at VM init level <1 ? The early startup scenario is early in the system property initialization, specifically SystemProps.Raw. whic

Re: RFR: 8302871: Speed up StringLatin1.regionMatchesCI [v12]

2023-02-23 Thread Alan Bateman
On Wed, 22 Feb 2023 18:44:57 GMT, Eirik Bjorsnos wrote: > I'll let this linger a bit before integrating in case Alan has comments after > the latest updates. I plan to look at it, been busy with other things. - PR: https://git.openjdk.org/jdk/pull/12632

Re: RFR: 8301119: Support for GB18030-2022 [v3]

2023-02-23 Thread Alan Bateman
On Thu, 23 Feb 2023 19:34:44 GMT, Naoto Sato wrote: >> Upgrading the GB18030 charset in the JDK to the latest 2022 standard. Since >> this is not a compatible upgrade to the existing mapping, a new system >> property `jdk.charset.GB18030` is introduced. If it is set to "2000", the >> mapping f

Re: RFR: 8301119: Support for GB18030-2022 [v3]

2023-02-24 Thread Alan Bateman
On Fri, 24 Feb 2023 08:34:48 GMT, Ichiroh Takiguchi wrote: > * Why GB18030.java.template is in > src/jdk.charsets/share/classes/sun/nio/cs/ext/ directory even if the > generated code is always stored into sun/nio/cs ? That is a good question. It could move, and $PACKAGE replaced with sun.nio.

Re: RFR: 8302871: Speed up StringLatin1.regionMatchesCI [v14]

2023-02-24 Thread Alan Bateman
On Wed, 22 Feb 2023 20:01:52 GMT, Eirik Bjorsnos wrote: >> This PR suggests we can speed up `StringLatin1.regionMatchesCI` by applying >> 'the oldest ASCII trick in the book'. >> >> The new static method `CharacterDataLatin1.equalsIgnoreCase` compares two >> latin1 bytes for equality ignoring

Re: RFR: 8303018: Unicode Emoji Properties

2023-03-14 Thread Alan Bateman
On Mon, 13 Mar 2023 21:16:24 GMT, Naoto Sato wrote: > Proposing accessor methods to Emoji properties defined in [Unicode Technical > Standard #51](https://unicode.org/reports/tr51/) in `java.lang.Character` > class. This is per a request from the client group, as well as refining the > current

Re: RFR: 8303018: Unicode Emoji Properties [v2]

2023-03-14 Thread Alan Bateman
On Tue, 14 Mar 2023 15:43:13 GMT, Naoto Sato wrote: > Fixed this one as well Spec update looks good. I suppose I have to use an emoji to react to that 👍 - PR: https://git.openjdk.org/jdk/pull/13006

Re: RFR: JDK-8305206: Add @spec tags in java.base/java.* (part 1)

2023-03-30 Thread Alan Bateman
On Thu, 30 Mar 2023 17:24:11 GMT, Jonathan Gibbons wrote: > Please review a change to add `@spec` tags (and remove some equivalent `@see` > tags) to the main "core-libs" packages in `java.base` module. > > This is similar to, and a subset of, PR #11073. That PR was withdrawn, and > based on

Re: RFR: JDK-8305206: Add @spec tags in java.base/java.* (part 1) [v2]

2023-03-31 Thread Alan Bateman
On Thu, 30 Mar 2023 20:45:08 GMT, Jonathan Gibbons wrote: >> Please review a change to add `@spec` tags (and remove some equivalent >> `@see` tags) to the main "core-libs" packages in `java.base` module. >> >> This is similar to, and a subset of, PR #11073. That PR was withdrawn, and >> base

Re: RFR: JDK-8305206: Add @spec tags in java.base/java.* (part 1) [v2]

2023-03-31 Thread Alan Bateman
On Thu, 30 Mar 2023 20:28:52 GMT, Jonathan Gibbons wrote: >> src/java.base/share/classes/java/lang/Thread.java line 1960: >> >>> 1958: * thread. >>> 1959: * >>> 1960: * @spec jni/index.html Java Native Interface Specification >> >> The link to the JNI spec in this met

Re: RFR: JDK-8305206: Add @spec tags in java.base/java.* (part 1)

2023-03-31 Thread Alan Bateman
On Thu, 30 Mar 2023 20:38:13 GMT, Jonathan Gibbons wrote: > The initial assumption was "after the @param/@return/@throws group". Overall, > as I said in the description for this PR, the block tags are not very > consistent about ordering. I was thinking we might want to recommend an > overall

Re: RFR: 8304982: Emit warning for removal of `COMPAT` provider

2023-04-03 Thread Alan Bateman
On Mon, 3 Apr 2023 16:47:40 GMT, Naoto Sato wrote: > This is a precursor to the future removal of the `COMPAT` locale data > provider. Before the actual removal of the provider, warn the users who > explicitly specify `COMPAT` at the command line in order for their smooth > migration to CLDR.

Re: RFR: 8304982: Emit warning for removal of `COMPAT` provider [v2]

2023-04-03 Thread Alan Bateman
On Mon, 3 Apr 2023 18:11:03 GMT, Naoto Sato wrote: >> This is a precursor to the future removal of the `COMPAT` locale data >> provider. Before the actual removal of the provider, warn the users who >> explicitly specify `COMPAT` at the command line in order for their smooth >> migration to CL

Re: RFR: 8304982: Emit warning for removal of `COMPAT` provider [v2]

2023-04-03 Thread Alan Bateman
On Mon, 3 Apr 2023 20:15:49 GMT, Naoto Sato wrote: > Locale providers provided by users can all be loaded in the name of `SPI`, as > they are the real implementation of `LocaleServiceProvider` class, so the > order of the preference can be specified against JDK's `CLDR` provider. Does > this a

Re: RFR: 8304982: Emit warning for removal of `COMPAT` provider [v2]

2023-04-04 Thread Alan Bateman
On Tue, 4 Apr 2023 17:32:35 GMT, Naoto Sato wrote: > Good point. Removed the @implNote tag for now and filed a separate issue to > clarify the system property: https://bugs.openjdk.org/browse/JDK-8305595 Okay, that works for me. - PR Review Comment: https://git.openjdk.org/jdk/pul

Re: RFR: 8304982: Emit warning for removal of `COMPAT` provider [v3]

2023-04-04 Thread Alan Bateman
On Tue, 4 Apr 2023 17:30:00 GMT, Naoto Sato wrote: >> This is a precursor to the future removal of the `COMPAT` locale data >> provider. Before the actual removal of the provider, warn the users who >> explicitly specify `COMPAT` at the command line in order for their smooth >> migration to CL

Re: RFR: 8304911: Use OperatingSystem enum in some modules

2023-04-05 Thread Alan Bateman
On Tue, 4 Apr 2023 19:22:48 GMT, Roger Riggs wrote: > With the addition of `jdk.internal.util.OperatingSystem` references to the > system property `os.name` can be replaced. > This PR exports jdk.internal.util to: > - java.prefs, > - java.security.jgss, > - java.smartcardio, > - jdk.charsets

Re: RFR: 8304911: Use OperatingSystem enum in some modules [v2]

2023-04-05 Thread Alan Bateman
On Wed, 5 Apr 2023 14:18:54 GMT, Roger Riggs wrote: > Created [JDK-8305662](https://bugs.openjdk.org/browse/JDK-8305662) to track > refactoring. > Will revert. Thanks, you can revert the qualified export in module-info and the additional grant in default.policy too. The interesting thing abou

Re: RFR: 8305904: java/lang/Character, java/lang/String and java/text/Normalizer tests read the unicode data files from src directories.

2023-04-15 Thread Alan Bateman
On Wed, 12 Apr 2023 16:35:19 GMT, Mahendra Chhipa wrote: > Following tests read the unicode data files > (http://www.unicode.org/Public/UNIDATA/ ) from src directory. For tests, > these files should be in test directories. No source code is using these > files. Only tests are using these files

Re: RFR: 8306927: Collator treats "v" and "w" as the same letter for Swedish language locale.

2023-05-04 Thread Alan Bateman
On Thu, 27 Apr 2023 12:32:19 GMT, Naoto Sato wrote: >> The rule was changed in 2006, the year Jave SE 6 was released. Though it >> looks like very much a corner case, it goes all the way back. I wonder if a >> CSR is needed? > >> The rule was changed in 2006, the year Jave SE 6 was released. Th

Re: RFR: 8307547: Support for multiple collations for a locale [v2]

2023-05-11 Thread Alan Bateman
On Wed, 10 May 2023 20:28:11 GMT, Naoto Sato wrote: >> The fix to https://bugs.openjdk.org/browse/JDK-8306927 switched the default >> collation for Swedish to the modern one. In order to provide a means for >> users who need the old collation, this PR intends to make `Collator` >> recognize th

Re: RFR: 8307547: Support variant collations [v4]

2023-05-12 Thread Alan Bateman
On Thu, 11 May 2023 20:51:37 GMT, Naoto Sato wrote: >> The fix to https://bugs.openjdk.org/browse/JDK-8306927 switched the default >> collation for Swedish to the modern one. In order to provide a means for >> users who need the old collation, this PR intends to make `Collator` >> recognize th

Re: RFR: 8307547: Support variant collations [v4]

2023-05-13 Thread Alan Bateman
On Fri, 12 May 2023 16:41:20 GMT, Steven Loomis wrote: > > so is this considered a private use language tag > > Not private use at all. The `-u-` subtag is registered, and the links above > are from the registrar, see > > * https://www.rfc-editor.org/info/bcp47 > * https://www.rfc-editor.org/r

Re: RFR: 8307547: Support variant collations [v4]

2023-05-13 Thread Alan Bateman
On Thu, 11 May 2023 20:51:37 GMT, Naoto Sato wrote: >> The fix to https://bugs.openjdk.org/browse/JDK-8306927 switched the default >> collation for Swedish to the modern one. In order to provide a means for >> users who need the old collation, this PR intends to make `Collator` >> recognize th

Re: RFR: 8308108: Support Unicode extension for collation settings [v3]

2023-05-19 Thread Alan Bateman
On Thu, 18 May 2023 19:44:01 GMT, Naoto Sato wrote: >> This change intends to interpret the BCP47 U extension wrt collation >> settings in the given `Locale`, then applies them to the created instances >> in the 1-arg factory method in `Collator`. A corresponding CSR has also been >> drafted.

Re: RFR: 8308108: Support Unicode extension for collation settings [v3]

2023-05-19 Thread Alan Bateman
On Fri, 19 May 2023 16:44:04 GMT, Naoto Sato wrote: > I don't think there is any chance that the factory method returns a Collator > that fails to meet the settings in the locale, because > setStrength()/setDecompositon() with valid values never fail. So the returned > instance will always hav

Re: RFR: 8308108: Support Unicode extension for collation settings [v4]

2023-05-21 Thread Alan Bateman
On Fri, 19 May 2023 21:13:37 GMT, Naoto Sato wrote: >> This change intends to interpret the BCP47 U extension wrt collation >> settings in the given `Locale`, then applies them to the created instances >> in the 1-arg factory method in `Collator`. A corresponding CSR has also been >> drafted.

Re: RFR: 8308108: Support Unicode extension for collation settings [v5]

2023-05-23 Thread Alan Bateman
On Mon, 22 May 2023 17:59:18 GMT, Naoto Sato wrote: >> This change intends to interpret the BCP47 U extension wrt collation >> settings in the given `Locale`, then applies them to the created instances >> in the 1-arg factory method in `Collator`. A corresponding CSR has also been >> drafted.

Re: RFR: 8289220: [Shenandoah] TestAllocObjectArrays fails intermittently

2023-05-30 Thread Alan Bateman
On Tue, 30 May 2023 08:31:08 GMT, SUN Guoyun wrote: > command: make test CONF=fastdebug JTREG="VM_OPTIONS=-Xcomp" > TEST=gc/TestAllocHumongousFragment.java > error info: > > Caused by: java.lang.NullPointerException: Cannot invoke > "sun.util.locale.BaseLocale.getVariant()" because "base" is

Re: RFR: 8289220: [Shenandoah] TestAllocObjectArrays fails intermittently

2023-05-30 Thread Alan Bateman
On Tue, 30 May 2023 08:49:35 GMT, Alan Bateman wrote: >> command: make test CONF=fastdebug JTREG="VM_OPTIONS=-Xcomp" >> TEST=gc/TestAllocHumongousFragment.java >> error info: >> >> Caused by: java.lang.NullPointerException: Cannot invoke >> &qu

Re: RFR: 8289220: [Shenandoah] TestAllocObjectArrays fails intermittently

2023-05-31 Thread Alan Bateman
On Wed, 31 May 2023 10:00:18 GMT, SUN Guoyun wrote: > Jtreg tier1 can trigger the same error with vmoptions:"-Xcomp > -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive > -XX:+ShenandoahOOMDuringEvacALot I found the GC occurs between when the soft > reference is assigned and when it is

Re: RFR: 8289220: [Shenandoah] TestAllocObjectArrays fails intermittently [v2]

2023-06-01 Thread Alan Bateman
On Thu, 1 Jun 2023 06:58:32 GMT, SUN Guoyun wrote: >> command: make test CONF=fastdebug JTREG="VM_OPTIONS=-Xcomp" >> TEST=gc/TestAllocHumongousFragment.java >> error info: >> >> Caused by: java.lang.NullPointerException: Cannot invoke >> "sun.util.locale.BaseLocale.getVariant()" because "base

Re: RFR: 8289220: Locale.forLanguageTag throws NPE due to soft ref used in locale cache being cleared [v6]

2023-06-07 Thread Alan Bateman
On Wed, 7 Jun 2023 03:37:26 GMT, SUN Guoyun wrote: >> command: make test CONF=fastdebug JTREG="VM_OPTIONS=-Xcomp" >> TEST=gc/TestAllocHumongousFragment.java >> error info: >> >> Caused by: java.lang.NullPointerException: Cannot invoke >> "sun.util.locale.BaseLocale.getVariant()" because "base

Re: RFR: 8289220: Locale.forLanguageTag throws NPE due to soft ref used in locale cache being cleared [v6]

2023-06-07 Thread Alan Bateman
On Wed, 7 Jun 2023 11:55:57 GMT, Daniel Jeliński wrote: > That being said, the number of long-lived `BaseLocale` objects is very > limited; we only keep them in Locale, LocaleKey, and Locale.CONSTANT_LOCALES. > Unless I'm missing something, we could solve this problem by removing > `BaseLocale

Re: RFR: 8309622: Re-examine the cache mechanism in BaseLocale [v2]

2023-06-13 Thread Alan Bateman
On Mon, 12 Jun 2023 17:33:11 GMT, Naoto Sato wrote: >> This is stemming from the PR: https://github.com/openjdk/jdk/pull/14211 >> where aggressive GC can cause NPE in `BaseLocale$Key` class. I refactored >> the in-house cache with WeakHashMap, and removed the Key class as it is no >> longer ne

Re: RFR: 8309622: Re-examine the cache mechanism in BaseLocale [v2]

2023-06-14 Thread Alan Bateman
On Tue, 13 Jun 2023 17:57:36 GMT, Naoto Sato wrote: > Replaced it with a ReentrantLock The concern is that this is a system-wide lock and so creates the potential for contention when many threads are bashing on Locale.of and other methods. Moving to use the JDK's ReferenceKeyMap with a CHM, or

Re: RFR: 8167252: Some of Charset.availableCharsets() does not contain itself

2023-06-14 Thread Alan Bateman
On Wed, 14 Jun 2023 16:47:40 GMT, Naoto Sato wrote: > Adding themselves into their `contains()` method will fix it. Marked as reviewed by alanb (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/14473#pullrequestreview-1479944770

Re: RFR: 8167252: Some of Charset.availableCharsets() does not contain itself

2023-06-14 Thread Alan Bateman
On Wed, 14 Jun 2023 17:14:08 GMT, Lance Andersen wrote: >> Adding themselves into their `contains()` method will fix it. > > test/jdk/java/nio/charset/Charset/Contains.java line 108: > >> 106: } >> 107: >> 108: static void selfContainmentTest() { > > Be nice to add a comment regarding

Re: RFR: 8167252: Some of Charset.availableCharsets() does not contain itself [v2]

2023-06-14 Thread Alan Bateman
On Wed, 14 Jun 2023 18:08:34 GMT, Naoto Sato wrote: >> Adding themselves into their `contains()` method will fix it. > > Naoto Sato has updated the pull request incrementally with one additional > commit since the last revision: > > Refined the test Marked as reviewed by alanb (Reviewer). -

Re: RFR: 8167252: Some of Charset.availableCharsets() does not contain itself [v2]

2023-06-14 Thread Alan Bateman
On Thu, 15 Jun 2023 06:19:09 GMT, Jaikiran Pai wrote: > Hello Naoto, should `sun.util.PropertyResourceBundleCharset` be fixed too? This is JDK internal, it shouldn't leak out via the APIs. If there is a way for it to leak out then it would require a compliant contains method but I suspect it'

Re: RFR: 8315097: Rename createJavaProcessBuilder [v3]

2023-08-30 Thread Alan Bateman
On Wed, 30 Aug 2023 17:38:01 GMT, Stefan Karlsson wrote: > I wouldn't be opposed to a change that: > > * Keeps the `createJavaProcessBuilder` name > * Renames `createTestJvm` to `createJavaProcessBuilderPrependTestOpts` > * Renames `executeTestJvm` to `executeJavaPrependTestOpts` > * Removes `cr

Re: RFR: 8267174: Many test files have the wrong Copyright header

2023-09-06 Thread Alan Bateman
On Tue, 5 Sep 2023 23:15:53 GMT, Jonathan Gibbons wrote: > One has to wonder about the `**/*_OLD.java` files, but that would be a > different cleanup The IBM double byte charsets were re-implemented in JDK 7. I think the old implementations moved to the test tree so it could be used to test th

Re: RFR: 8267174: Many test files have the wrong Copyright header

2023-09-06 Thread Alan Bateman
On Wed, 6 Sep 2023 16:49:39 GMT, Chris Plummer wrote: > > I wonder if this is the right thing to do for the hprof files. I believe > > they originated from some hprof tools that we no longer ship. 3rd parties > > might choose to integrate them into their own tools. > > Do you think I should re

Re: RFR: 8310631: test/jdk/sun/nio/cs/TestCharsetMapping.java is spuriously passing [v2]

2023-09-24 Thread Alan Bateman
On Tue, 19 Sep 2023 20:03:51 GMT, Naoto Sato wrote: >> Fixed the failing (well, false-positive) test case. Made the following >> changes to the test: >> >> - Corrected the path to the mapping files directory >> - Made sure to fail if the directory path is incorrect >> - Took care of `GB18030` a

Re: RFR: 8316557: Make fields final in 'sun.util' package

2023-09-25 Thread Alan Bateman
On Mon, 25 Sep 2023 10:04:13 GMT, Chen Liang wrote: >>> UTF8 decoder does not perform any internal state mutation during decoding; >> >> Are you sure? I think `CharsetDecoder::decode` will modify the `status` >> field. > > right, it does have a `state` field. CharsetDecoder is specified to be

Re: RFR: JDK-8315457 Implementation of String Templates (Second Preview)

2023-10-16 Thread Alan Bateman
On Mon, 16 Oct 2023 13:41:55 GMT, Jim Laskey wrote: > Update String Templates for a second preview. With the addition of > > - Expression type and throws are determined from the `process` method of the > processor type and not the processor type. > > - Qualified `STR` and `RAW` are treated the

Re: RFR: JDK-8315457 Implementation of String Templates (Second Preview) [v4]

2023-11-04 Thread Alan Bateman
On Fri, 3 Nov 2023 15:29:25 GMT, Jim Laskey wrote: >> Update String Templates for a second preview. With the addition of >> >> - Expression type and throws are determined from the `process` method of the >> processor type and not the processor type. >> >> - Qualified `STR` and `RAW` are treate

Re: RFR: JDK-8315457 Implementation of String Templates (Second Preview) [v4]

2023-11-04 Thread Alan Bateman
On Mon, 16 Oct 2023 14:31:46 GMT, Jim Laskey wrote: > Wasn't sure about that. Thx. When in doubt, JEP 12. Alex provided good guidance for API authors on how `@since` should be used with preview APIs. - PR Review Comment: https://git.openjdk.org/jdk/pull/16202#discussion_r13823929

Re: RFR: 8321206: Make Locale related system properties static properties

2023-12-06 Thread Alan Bateman
On Tue, 5 Dec 2023 23:04:55 GMT, Naoto Sato wrote: > Currently, Locale-related system properties, such as `user.language` or > `user.country`, are initialized when the `Locale` class is loaded. Making > them static properties is safer than relying on the class initialization > timing, which co

Re: RFR: 8320788: The system properties page is missing some properties [v3]

2024-01-11 Thread Alan Bateman
On Tue, 9 Jan 2024 23:40:35 GMT, Naoto Sato wrote: >> Adding an explanation of the locale-related system properties in the >> `System.getProperties()` method. Corresponding CSR has also been drafted. > > Naoto Sato has updated the pull request with a new target base due to a merge > or a rebase

Re: RFR: JDK-8325189: Enable this-escape javac warning in java.base

2024-02-03 Thread Alan Bateman
On Fri, 2 Feb 2024 23:36:41 GMT, Joe Darcy wrote: > After the "this-escape" lint warning was added to javac (JDK-8015831), the > base module was not updated to be able to compile with this warning enabled. > This PR makes the necessary changes to allow the base module to build with > the warni

Re: RFR: 8174269: Remove COMPAT locale data provider from JDK

2024-02-24 Thread Alan Bateman
On Fri, 23 Feb 2024 21:24:10 GMT, Naoto Sato wrote: > This PR intends to remove the legacy `COMPAT` locale data from the JDK. The > `COMPAT` locale data was introduced for applications' migratory purposes > transitioning to `CLDR`. It is becoming a technical debt and now is the time > to remov

Re: RFR: 8326718: Test java/util/Formatter/Padding.java does not timeout on large inputs before JDK-8299677

2024-02-27 Thread Alan Bateman
On Tue, 27 Feb 2024 17:24:03 GMT, Chad Rakoczy wrote: > [JDK-8299677](https://bugs.openjdk.java.net/browse/JDK-8299677) fixes a bug > with Formatter.format taking a long time when there is a lot of padding. This > test runs Formatter.format with very large padding. Test fails before > [JDK-829

Re: RFR: 8330802: Desugar switch in Locale::createLocale

2024-04-22 Thread Alan Bateman
On Mon, 22 Apr 2024 10:34:29 GMT, Claes Redestad wrote: > This switch expression in `Locale::createLocale` is causing a somewhat large > startup regression on my local system. Desugaring to if statements seem like > the right thing to do while we investigate ways to further reduce overheads >

Re: RFR: 8331932: Startup regressions in 23-b13 [v3]

2024-05-08 Thread Alan Bateman
On Wed, 8 May 2024 17:01:05 GMT, Claes Redestad wrote: >> A rather large startup regression was introduced in 23-b13 from >> [JDK-8309622](https://bugs.openjdk.org/browse/JDK-8309622). Some of that has >> been dealt with as enhancements such as >> [JDK-8330802](https://bugs.openjdk.org/browse/

Re: RFR: 8331932: Startup regressions in 23-b13 [v4]

2024-05-08 Thread Alan Bateman
On Wed, 8 May 2024 17:30:22 GMT, Claes Redestad wrote: >> A rather large startup regression was introduced in 23-b13 from >> [JDK-8309622](https://bugs.openjdk.org/browse/JDK-8309622). Some of that has >> been dealt with as enhancements such as >> [JDK-8330802](https://bugs.openjdk.org/browse/

Re: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v3]

2024-05-13 Thread Alan Bateman
On Mon, 13 May 2024 11:47:38 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting >> the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loa

Re: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v3]

2024-05-14 Thread Alan Bateman
On Wed, 15 May 2024 00:54:43 GMT, David Holmes wrote: >> src/hotspot/share/runtime/arguments.cpp line 2271: >> >>> 2269: } else if (match_option(option, "--illegal-native-access=", >>> &tail)) { >>> 2270: if (!create_module_property("jdk.module.illegal.native.access", >>> tail, Inter

Re: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v3]

2024-05-15 Thread Alan Bateman
On Wed, 15 May 2024 10:34:01 GMT, Maurizio Cimadamore wrote: > I don't fully agree that this option is not module related (which is why I > gave it that name). The very definition of illegal native access is related > to native access occurring from a module that is outside a specific set. So

Re: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v5]

2024-05-15 Thread Alan Bateman
On Wed, 15 May 2024 10:40:34 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting >> the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loa

Re: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v7]

2024-05-16 Thread Alan Bateman
On Thu, 16 May 2024 12:23:44 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting >> the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loa

Re: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v7]

2024-05-17 Thread Alan Bateman
On Thu, 16 May 2024 12:23:44 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting >> the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loa

Re: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v7]

2024-05-17 Thread Alan Bateman
On Thu, 16 May 2024 12:23:44 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting >> the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loa

Re: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v7]

2024-05-17 Thread Alan Bateman
On Thu, 16 May 2024 12:23:44 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting >> the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loa

  1   2   >