Re: RFR: 8311968: Clarify Three-letter time zone IDs in java.util.TimeZone

2023-07-13 Thread Naoto Sato
On Thu, 13 Jul 2023 06:34:09 GMT, Justin Lu wrote: > Please review this PR and associated > [CSR](https://bugs.openjdk.org/browse/JDK-8311979) which links the full list > of deprecated three-letter IDs in java.util.TimeZone > > Although it is made apparent in TimeZone that certain 3-letter

Re: [EXTERNAL] Re: 4-letter patterns in Date Format Style no longer give full text style

2023-07-10 Thread Naoto Sato
pec of Locale(String) is clear that it won't do any syntactic checks on the input. Otherwise if someone had been creating "xxx_yyy" as a language, it will break. Naoto Sent from mobile device. -------- *From:* Naoto Sato *S

Re: 4-letter patterns in Date Format Style no longer give full text style

2023-07-10 Thread Naoto Sato
Hi, In your test case, ``` new Locale("en_US"); ``` This will fall back to ROOT locale texts with CLDR (default since JDK9) where it differs from US English. Probably you may want to `new Locale("en", "US)` or preferably use `Locale.US` constant. Naoto On 7/10/23 12:08 PM, Bruno Borges

Integrated: 8311528: Remove IDE specific SuppressWarnings

2023-07-10 Thread Naoto Sato
On Thu, 6 Jul 2023 21:03:29 GMT, Naoto Sato wrote: > Removing the IDE specific `@SuppressWarnings` attached to > `java.util.Calendar#equals()`. `equals()` implementation now checks the type > of the other instance for this. This pull request has now been integrated. Changeset:

Re: RFR: 8310818: Refactor more Locale tests to use JUnit [v2]

2023-07-06 Thread Naoto Sato
On Thu, 6 Jul 2023 19:32:09 GMT, Justin Lu wrote: >> Please review this PR which refactors additional tests in Locale to use >> JUnit. >> >> If a test was named bugNNN.java, it was renamed to something more >> descriptive. >> >> Below is a list of all the changes >> >> - Refactor and

RFR: 8311528: Remove IDE specific SuppressWarnings

2023-07-06 Thread Naoto Sato
Removing the IDE specific `@SuppressWarnings` attached to `java.util.Calendar#equals()`. `equals()` implementation now checks the type of the other instance for this. - Commit messages: - initial commit Changes: https://git.openjdk.org/jdk/pull/14790/files Webrev:

Re: RFR: 8311188: Simplify and modernize equals and hashCode in java.text

2023-07-03 Thread Naoto Sato
On Mon, 3 Jul 2023 11:12:32 GMT, Pavel Rappo wrote: > Please review this PR to use modern APIs and language features to simplify > `equals` and `hashCode` in the java.text area. > > * Some changes to `equals` and `hashCode` are refactoring rather than > modernization. Such changes can be as

Re: RFR: 8310818: Refactor more Locale tests to use JUnit

2023-07-03 Thread Naoto Sato
On Fri, 30 Jun 2023 07:52:36 GMT, Justin Lu wrote: > Please review this PR which refactors additional tests in Locale to use JUnit. > > If a test was named bugNNN.java, it was renamed to something more > descriptive. > > Below is a list of all the changes > > - Refactor and Rename

Re: RFR: 8310923: Refactor Currency tests to use JUnit [v6]

2023-06-30 Thread Naoto Sato
On Fri, 30 Jun 2023 16:49:22 GMT, Justin Lu wrote: >> Please review this PR which refactors Currency tests to use JUnit. >> >> The most significant change occurs in `ValidateISO4217.java`. Other changes >> to this file excluding the JUnit refactoring include >> >> - Tests are no longer

Re: RFR: 8310923: Refactor Currency tests to use JUnit [v5]

2023-06-30 Thread Naoto Sato
On Fri, 30 Jun 2023 07:50:50 GMT, Justin Lu wrote: >> Please review this PR which refactors Currency tests to use JUnit. >> >> The most significant change occurs in `ValidateISO4217.java`. Other changes >> to this file excluding the JUnit refactoring include >> >> - Tests are no longer

Re: RFR: 8310923: Refactor Currency tests to use JUnit [v4]

2023-06-29 Thread Naoto Sato
On Wed, 28 Jun 2023 20:49:18 GMT, Justin Lu wrote: >> Please review this PR which refactors Currency tests to use JUnit. >> >> The most significant change occurs in `ValidateISO4217.java`. Other changes >> to this file excluding the JUnit refactoring include >> >> - Tests are no longer

Re: RFR: 6960866: [Fmt-Ch] ChoiceFormat claims impossible and unimplemented functionality

2023-06-29 Thread Naoto Sato
On Thu, 29 Jun 2023 18:02:00 GMT, Justin Lu wrote: > Please review this PR, which clarifies the parameter description of > ChoiceFormat.setChoices(). > > `ChoiceFormat.setChoices(double[] limits, String[] formats)` claims that > `formats` can either be "Format objects or Strings". It also

Re: RFR: 8311122: Fix typos in java.base

2023-06-29 Thread Naoto Sato
On Thu, 29 Jun 2023 21:17:49 GMT, Pavel Rappo wrote: > Please review this IDE-assisted typo hunt, which I plan to backport to jdk21. LGTM - Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/14718#pullrequestreview-1506183994

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

2023-06-29 Thread Naoto Sato
aleOfavgt 20 62564.079 ± 406.697 ns/op > > (w/ fix) > Benchmark Mode Cnt Score Error Units > LocaleCache.testForLanguageTag avgt 20 4801.175 ± 371.830 ns/op > LocaleCache.testLocaleOf avgt 20 60394.652 ± 352.471 ns/op Naoto Sat

Re: RFR: JDK-8310913 Move ReferencedKeyMap to jdk.internal so it may be shared

2023-06-29 Thread Naoto Sato
On Tue, 27 Jun 2023 19:07:12 GMT, Jim Laskey wrote: > java.lang.runtime.ReferencedKeyMap was introduced to provide a concurrent > caching scheme for Carrier objects. The technique used is generally useful > for a variety of caching schemes and is being moved to be shared in other > parts of

Integrated: 8310232: java.time.Clock$TickClock.millis() fails in runtime when tick is 1 microsecond

2023-06-29 Thread Naoto Sato
On Mon, 26 Jun 2023 17:31:29 GMT, Naoto Sato wrote: > Fixing the `/ by zero` exception with tick durations less than a millisecond. This pull request has now been integrated. Changeset: a995aa6c Author: Naoto Sato URL: https://git.openjdk.org/jdk/com

Re: RFR: 8311030: ResourceBundle.handleKeySet() is racy

2023-06-29 Thread Naoto Sato
On Wed, 28 Jun 2023 11:05:11 GMT, Sergey Tsypanov wrote: > Double-checked locking should rely on local variable to avoid racy reads from > volatile field. Retrieving the approval, per the discussion. - Changes requested by naoto (Reviewer). PR Review:

Re: RFR: 8311030: ResourceBundle.handleKeySet() is racy

2023-06-28 Thread Naoto Sato
On Wed, 28 Jun 2023 11:05:11 GMT, Sergey Tsypanov wrote: > Double-checked locking should rely on local variable to avoid racy reads from > volatile field. +1 - Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/14692#pullrequestreview-1503927831

Re: RFR: 8310241: OffsetDateTime compareTo redundant computation [v2]

2023-06-28 Thread Naoto Sato
On Wed, 28 Jun 2023 17:46:51 GMT, Roger Riggs wrote: >> Remove a redundant comparison in java.time `OffsetDateTime.compareTo()`. >> If the `compareInstant` utility method returns 0 (equal), it compares the >> `LocalDateTime`. >> However, `compareInstant` has already done that comparison; if it

Re: RFR: 8310241: OffsetDateTime compareTo redundant computation [v2]

2023-06-28 Thread Naoto Sato
On Wed, 28 Jun 2023 17:46:51 GMT, Roger Riggs wrote: >> Remove a redundant comparison in java.time `OffsetDateTime.compareTo()`. >> If the `compareInstant` utility method returns 0 (equal), it compares the >> `LocalDateTime`. >> However, `compareInstant` has already done that comparison; if it

Re: RFR: 8310232: java.time.Clock$TickClock.millis() fails in runtime when tick is 1 microsecond [v2]

2023-06-28 Thread Naoto Sato
On Wed, 28 Jun 2023 14:12:53 GMT, Roger Riggs wrote: >> src/java.base/share/classes/java/time/Clock.java line 762: >> >>> 760: public long millis() { >>> 761: long millis = baseClock.millis(); >>> 762: return tickNanos < 1000_000L ? millis : millis - >>>

Re: RFR: 8310982: jdk/internal/util/ArchTest.java fails after JDK-8308452 failed with Method isARM()

2023-06-27 Thread Naoto Sato
On Tue, 27 Jun 2023 19:55:02 GMT, Roger Riggs wrote: > Fix a test bug when run on aarch64, it was supposed to confirm it was not > running on Arm. Marked as reviewed by naoto (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/14685#pullrequestreview-1501758826

Re: RFR: 8301569: list mode of jmod and jimage cannot be used normally in turkish locale [v4]

2023-06-27 Thread Naoto Sato
On Tue, 27 Jun 2023 15:20:33 GMT, Glavo wrote: >> When the default Locale is `tr`, the jmod and jimage commands have the >> following problems: >> >> * The jmod command does not correctly recognize the `list` mode typed in >> lowercase; >> * The jimage command cannot obtain the help

[jdk21] Integrated: 8310182: DateTimeFormatter date formats (ISO_LOCAL_DATE) separated with hyphen, not dash

2023-06-27 Thread Naoto Sato
On Tue, 27 Jun 2023 17:07:50 GMT, Naoto Sato wrote: > Hi all, > > This pull request contains a backport of commit > [ec45bd64](https://github.com/openjdk/jdk/commit/ec45bd64d504d579aef54c924fb8ca75a944036f) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository.

[jdk21] RFR: 8310182: DateTimeFormatter date formats (ISO_LOCAL_DATE) separated with hyphen, not dash

2023-06-27 Thread Naoto Sato
Hi all, This pull request contains a backport of commit [ec45bd64](https://github.com/openjdk/jdk/commit/ec45bd64d504d579aef54c924fb8ca75a944036f) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Naoto Sato on 27 Jun 2023

Re: RFR: 8310232: java.time.Clock$TickClock.millis() fails in runtime when tick is 1 microsecond [v2]

2023-06-27 Thread Naoto Sato
> Fixing the `/ by zero` exception with tick durations less than a millisecond. Naoto Sato has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains f

Integrated: 8310182: DateTimeFormatter date formats (ISO_LOCAL_DATE) separated with hyphen, not dash

2023-06-27 Thread Naoto Sato
On Thu, 22 Jun 2023 20:36:48 GMT, Naoto Sato wrote: > Replacing the ambiguous `dash` with `hyphen-minus` for more clarity. There > are other locations than `ISO_LOCAL_DATE` that have the same description. > Those are corrected too. This pull request has now been integrated.

Re: RFR: 8310232: java.time.Clock$TickClock.millis() fails in runtime when tick is 1 microsecond

2023-06-27 Thread Naoto Sato
On Tue, 27 Jun 2023 07:23:21 GMT, Alan Bateman wrote: >> Fixing the `/ by zero` exception with tick durations less than a millisecond. > > test/jdk/java/time/test/java/time/TestClock_Tick.java line 77: > >> 75: * Test tick clock. >> 76: * >> 77: * @bug 8310232 > > Did you mean the put the

Re: RFR: 8310182: DateTimeFormatter date formats (ISO_LOCAL_DATE) separated with hyphen, not dash [v2]

2023-06-26 Thread Naoto Sato
> Replacing the ambiguous `dash` with `hyphen-minus` for more clarity. There > are other locations than `ISO_LOCAL_DATE` that have the same description. > Those are corrected too. Naoto Sato has updated the pull request incrementally with one additional commit since the last

Re: RFR: JDK-8310909: java.io.InvalidObjectException has redundant `@since` tag

2023-06-26 Thread Naoto Sato
On Mon, 26 Jun 2023 18:32:30 GMT, Jonathan Gibbons wrote: > Please review a trivial update to remove a redundant `@since` tag. Marked as reviewed by naoto (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/14662#pullrequestreview-1499185740

Re: RFR: 8310828: java.sql java.sql.rowset packages have no `@since` info

2023-06-26 Thread Naoto Sato
On Mon, 26 Jun 2023 13:00:31 GMT, Lance Andersen wrote: > Hi all, > > Please review this trivial change which adds the `@since` javadoc tag to the > various ` java.sql `and `java.sql.rowset` packages. > > Best > Lance LGTM - Marked as reviewed by naoto (Reviewer). PR Review:

Re: RFR: 8310241: OffsetDateTime compareTo redundant computation

2023-06-26 Thread Naoto Sato
On Thu, 22 Jun 2023 19:03:03 GMT, Roger Riggs wrote: > Remove a redundant comparison in java.time `OffsetDateTime.compareTo()`. > If the `compareInstant` utility method returns 0 (equal), it compares the > `LocalDateTime`. > However, `compareInstant` has already done that comparison; if it

Re: RFR: 8310890: Normalize identifier names

2023-06-26 Thread Naoto Sato
On Mon, 26 Jun 2023 14:07:03 GMT, Pavel Rappo wrote: > Please review this cleanup PR to normalize names of identifiers which are > Java variables/fields or tokens in text files. Those names either contain a > pronoun that is very rarely used in code, or seem like they contain such a >

RFR: 8310232: java.time.Clock$TickClock.millis() fails in runtime when tick is 1 microsecond

2023-06-26 Thread Naoto Sato
Fixing the `/ by zero` exception with tick durations less than a millisecond. - Commit messages: - refactor return statement - 8310232: java.time.Clock$TickClock.millis() fails in runtime when tick is 1 microsecond Changes: https://git.openjdk.org/jdk/pull/14657/files Webrev:

Re: RFR: 8301492: Modernize equals() method of ResourceBundle.CacheKey and Bundles.CacheKey [v5]

2023-06-26 Thread Naoto Sato
On Mon, 26 Jun 2023 09:46:08 GMT, Sergey Tsypanov wrote: >> `ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire >> outdated. This simple clean-up modernizes them. > > Sergey Tsypanov has updated the pull request incrementally with one > additional commit since the last

Re: RFR: 8301492: Modernize equals() method of ResourceBundle.CacheKey and Bundles.CacheKey [v3]

2023-06-23 Thread Naoto Sato
On Wed, 1 Feb 2023 10:36:12 GMT, Sergey Tsypanov wrote: >> `ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire >> outdated. This simple clean-up modernizes them. > > Sergey Tsypanov has updated the pull request incrementally with one > additional commit since the last

Re: RFR: 8301492: Modernize equals() method of ResourceBundle.CacheKey and Bundles.CacheKey [v3]

2023-06-23 Thread Naoto Sato
On Fri, 23 Jun 2023 15:11:47 GMT, Pavel Rappo wrote: >> Yes: >> >> CacheKey(String baseName, Locale locale, Module module, Module caller) { >> Objects.requireNonNull(module); >> Objects.requireNonNull(caller); >> >> this.name = baseName; >> this.locale = locale; >>

Re: RFR: 8310234: Refactor Locale tests to use JUnit [v4]

2023-06-22 Thread Naoto Sato
On Thu, 22 Jun 2023 20:41:33 GMT, Justin Lu wrote: >> Please review this PR as apart of >> [JDK-8307843](https://bugs.openjdk.org/browse/JDK-8307843) which refactors >> some tests in Locale to use JUnit. Other cleanup and small changes are >> included as well. More refactoring in Locale tests

RFR: 8310182: DateTimeFormatter date formats (ISO_LOCAL_DATE) separated with hyphen, not dash

2023-06-22 Thread Naoto Sato
Replacing the ambiguous `dash` with `hyphen-minus` for more clarity. There are other locations than `ISO_LOCAL_DATE` that have the same description. Those are corrected too. - Commit messages: - 8310182: DateTimeFormatter date formats (ISO_LOCAL_DATE) separated with hyphen, not

Re: RFR: 8310234: Refactor Locale tests to use JUnit [v3]

2023-06-22 Thread Naoto Sato
On Thu, 22 Jun 2023 19:23:27 GMT, Justin Lu wrote: >> test/jdk/java/util/Locale/AvailableLocalesTest.java line 46: >> >>> 44: /** >>> 45: * Test that Locale.getAvailableLocales() is non-empty. >>> 46: * Print out the locales. >> >> If you combine two tests into a single one, I'd

Re: RFR: 8310234: Refactor Locale tests to use JUnit [v2]

2023-06-22 Thread Naoto Sato
On Thu, 22 Jun 2023 18:55:31 GMT, Justin Lu wrote: >> Please review this PR as apart of >> [JDK-8307843](https://bugs.openjdk.org/browse/JDK-8307843) which refactors >> some tests in Locale to use JUnit. Other cleanup and small changes are >> included as well. More refactoring in Locale tests

Re: RFR: 8309632: JDK 21 RDP1 L10n resource files update [v2]

2023-06-16 Thread Naoto Sato
On Fri, 16 Jun 2023 04:39:42 GMT, Justin Lu wrote: >> Please review this PR which updates the JDK's localized resources since the >> previous L10n translation drop (1/26). >> >> To help with reviewing the changes, @jonathan-gibbons created a tool which >> displays the localized changes next

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

2023-06-16 Thread Naoto Sato
On Fri, 16 Jun 2023 12:46:01 GMT, Brett Okken wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Addressing review comments > > src/java.base/share/classes/sun/util/locale/BaseL

Re: RFR: 8309632: JDK 21 RDP1 L10n resource files update [v2]

2023-06-16 Thread Naoto Sato
On Fri, 16 Jun 2023 15:06:30 GMT, Jonathan Gibbons wrote: >> Left some comments on the translations mainly in Japanese. It is now very >> easy to look at the l10n changes in the generated HTML. One small comment to >> the tool is that it would be nice if the order in HTML (alphabetically >>

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

2023-06-14 Thread Naoto Sato
On Wed, 14 Jun 2023 13:29:39 GMT, Daniel Fuchs 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

Re: RFR: 8309632: JDK 21 RDP1 L10n resource files update [v4]

2023-06-13 Thread Naoto Sato
On Tue, 13 Jun 2023 22:09:40 GMT, Justin Lu wrote: >> Please review this PR which updates the JDK's localized resources since the >> previous L10n translation drop (1/26). >> >> To help with reviewing the changes, @jonathan-gibbons created a tool which >> displays the localized changes next

Re: RFR: 8309632: JDK 21 RDP1 L10n resource files update [v2]

2023-06-13 Thread Naoto Sato
On Mon, 12 Jun 2023 22:32:14 GMT, Justin Lu wrote: >> Please review this PR which updates the JDK's localized resources since the >> previous L10n translation drop (1/26). >> >> To help with reviewing the changes, @jonathan-gibbons created a tool which >> displays the localized changes next

Re: RFR: 8309632: JDK 21 RDP1 L10n resource files update [v2]

2023-06-13 Thread Naoto Sato
On Mon, 12 Jun 2023 22:32:14 GMT, Justin Lu wrote: >> Please review this PR which updates the JDK's localized resources since the >> previous L10n translation drop (1/26). >> >> To help with reviewing the changes, @jonathan-gibbons created a tool which >> displays the localized changes next

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

2023-06-13 Thread Naoto Sato
On Tue, 13 Jun 2023 13:09:49 GMT, Andrey Turbanov wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Addressing comments (test grouping, synchronization), minor optimization >> on

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

2023-06-13 Thread Naoto Sato
On Tue, 13 Jun 2023 11:22:11 GMT, Alan Bateman wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Addressing comments (test grouping, synchronization), minor optimization >> on loop

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

2023-06-13 Thread Naoto Sato
aleOfavgt 20 62564.079 ± 406.697 ns/op > > (w/ fix) > Benchmark Mode Cnt Score Error Units > LocaleCache.testForLanguageTag avgt 20 4801.175 ± 371.830 ns/op > LocaleCache.testLocaleOf avgt 20 60394.652 ± 352.471 ns/op Naoto

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

2023-06-12 Thread Naoto Sato
On Mon, 12 Jun 2023 12:49:05 GMT, Albert Mingkun Yang wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Addressing comments (test grouping, synchronization), minor optimization >> o

Re: RFR: 8309622: Re-examine the cache mechanism in BaseLocale

2023-06-12 Thread Naoto Sato
On Mon, 12 Jun 2023 16:23:29 GMT, Roger Riggs wrote: > One other thing to consider... If the BaseLocale entries are being GC'd > sooner, then perhaps the value of the String.intern() is reduced. Eliminating > `.intern90` would make creating a normalized BaseLocale faster. Some code inside the

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

2023-06-12 Thread Naoto Sato
On Mon, 12 Jun 2023 14:35:15 GMT, Daniel Fuchs wrote: > One thing though - WeakHashMap is not thread safe - and I don't see any locks > or synchronized to protect access to CACHE. Is that going to cause trouble if > two threads compete to add a locale to the map? In other words - how >

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

2023-06-12 Thread Naoto Sato
aleOfavgt 20 62564.079 ± 406.697 ns/op > > (w/ fix) > Benchmark Mode Cnt Score Error Units > LocaleCache.testForLanguageTag avgt 20 4801.175 ± 371.830 ns/op > LocaleCache.testLocaleOf avgt 20 60394.652 ± 352.471 ns/op Naoto

RFR: 8309622: Re-examine the cache mechanism in BaseLocale

2023-06-09 Thread Naoto Sato
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 needed (thus the original NPE will no longer be possible). Also

Re: RFR: JDK-8309686: inconsistent URL for https://www.unicode.org/reports/tr35

2023-06-08 Thread Naoto Sato
On Thu, 8 Jun 2023 21:36:03 GMT, Jonathan Gibbons wrote: > Please review a trivial docs change to fix a URL in a `@spec` tag consistent > with equivalent URLs in other tags. > (Consistency will be required when the External Specifications page is > enabled.) My bad. Thanks for fixing the URL.

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

2023-06-07 Thread Naoto Sato
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

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

2023-06-05 Thread Naoto Sato
On Fri, 2 Jun 2023 01:07:27 GMT, SUN Guoyun wrote: >> SUN Guoyun has refreshed the contents of this pull request, and previous >> commits have been removed. The incremental views will show differences >> compared to the previous content of the PR. The pull request contains one >> new commit

Re: RFR: 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java [v2]

2023-06-02 Thread Naoto Sato
On Fri, 2 Jun 2023 22:18:45 GMT, Brian Burkhalter wrote: >> I just wonder if jchar is UTF-16 and char is platform encoding, would it >> work by simply casting the low 8bit to char? > > Probably not. This is only intended to cover the constrained case of this > test. Something like the macro

Re: RFR: 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java [v3]

2023-06-02 Thread Naoto Sato
On Fri, 2 Jun 2023 19:23:10 GMT, Brian Burkhalter wrote: >> For Unix, copy the `jchar`s into an allocated `char` array. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8309216: Move string release into common flow

Re: RFR: 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java [v2]

2023-06-02 Thread Naoto Sato
On Fri, 2 Jun 2023 18:36:56 GMT, Brian Burkhalter wrote: >> test/jdk/java/io/File/libGetXSpace.c line 142: >> >>> 140: for (int i = 0; i < len; i++) { >>> 141: chars[i] = (char)strchars[i]; >>> 142: } >> >> Is this `memcpy(chars, strchars, len);` > > I don't think so if `chars`

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

2023-06-01 Thread Naoto Sato
On Thu, 1 Jun 2023 08:58:23 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

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

2023-06-01 Thread Naoto Sato
On Thu, 1 Jun 2023 08:58:23 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

Re: RFR: 8308452: Extend internal Architecture enum with byte order and address size [v3]

2023-05-31 Thread Naoto Sato
On Wed, 31 May 2023 14:08:09 GMT, Roger Riggs wrote: >> The internal enum jdk.internal.util.Architecture does not provide >> information about the big or little endianness or the address size (64 or 32 >> bits). The endian-ness and address size are intrinsic to the architecture. >> >> The

Integrated: 8308316: Default decomposition mode in Collator

2023-05-31 Thread Naoto Sato
On Thu, 18 May 2023 18:02:32 GMT, Naoto Sato wrote: > Amending the description about the default decomposition mode in > `Collator.NO_DECOMPOSITION` javadoc. This pull request has now been integrated. Changeset: 12649025 Author: Naoto Sato URL: https://git.openjdk.org/jdk/

Re: RFR: 8308022: update for deprecated sprintf for java.base [v2]

2023-05-30 Thread Naoto Sato
On Wed, 24 May 2023 19:20:09 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this update reviewed? >> >> The sprintf is deprecated in Xcode 14, and Microsoft Virtual Studio, because >> of security concerns. The issue was addressed in >>

Re: RFR: 8308316: Default decomposition mode in Collator [v3]

2023-05-25 Thread Naoto Sato
> Amending the description about the default decomposition mode in > `Collator.NO_DECOMPOSITION` javadoc. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: use present tense - Changes: - all: https://git.openjdk.o

Re: RFR: 8308316: Default decomposition mode in Collator [v2]

2023-05-25 Thread Naoto Sato
> Amending the description about the default decomposition mode in > `Collator.NO_DECOMPOSITION` javadoc. Naoto Sato has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. Th

Integrated: 8308108: Support Unicode extension for collation settings

2023-05-25 Thread Naoto Sato
On Wed, 17 May 2023 19:40:04 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 bee

Re: RFR: 8308735: Typos in parameter names

2023-05-24 Thread Naoto Sato
On Wed, 24 May 2023 23:32:18 GMT, Pavel Rappo wrote: > Please review this simple fix. LGTM - Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/14136#pullrequestreview-1442893076

Re: RFR: 8174722: Wrong behavior of DecimalFormat with RoundingMode.UP in special case

2023-05-24 Thread Naoto Sato
On Wed, 24 May 2023 18:47:45 GMT, Joe Darcy wrote: >>> I just wonder if it is ok to reverse the rounding/truncation only in this >>> special case. If the truncation always comes first, then 0.00 would be >>> correct (then 1.01 may be something wrong). Looks to me that the original >>> comment

Re: RFR: 8174722: Wrong behavior of DecimalFormat with RoundingMode.UP in special case

2023-05-24 Thread Naoto Sato
On Tue, 23 May 2023 23:16:01 GMT, Justin Lu wrote: > Please review this PR, which addresses a case where Decimal Format would > violate certain RoundingMode contracts given the right pattern and double. > > For example, > > > DecimalFormat df = new DecimalFormat(); >

Re: RFR: 8159023: Engineering notation of DecimalFormat does not work as documented [v3]

2023-05-23 Thread Naoto Sato
On Tue, 23 May 2023 05:31:37 GMT, Justin Lu wrote: >> Please review this PR which updates the Scientific Notation section of >> Decimal Format. It aims to resolve >> [JDK-8159023](https://bugs.openjdk.org/browse/JDK-8159023) as well as >>

Re: RFR: 8300038: Make new version of JNU_GetStringPlatformChars which checks for null characters [v2]

2023-05-23 Thread Naoto Sato
On Tue, 23 May 2023 15:31:49 GMT, Michael McMahon wrote: >> This PR creates a new version of the JNI utility function >> JNU_GetStringPlatformChars called JNU_GetStringPlatformCharsStrict, which >> performs additional validation of the returned string, namely that it does >> not contain any

Re: RFR: 8159023: Engineering notation of DecimalFormat does not work as documented [v2]

2023-05-22 Thread Naoto Sato
On Mon, 22 May 2023 23:03:10 GMT, Justin Lu wrote: >> Please review this PR which updates the Scientific Notation section of >> Decimal Format. It aims to resolve >> [JDK-8159023](https://bugs.openjdk.org/browse/JDK-8159023) as well as >>

Re: RFR: 8159023: Engineering notation of DecimalFormat does not work as documented

2023-05-22 Thread Naoto Sato
On Sat, 20 May 2023 00:00:42 GMT, Justin Lu wrote: > Please review this PR which updates the Scientific Notation section of > Decimal Format. It aims to resolve > [JDK-8159023](https://bugs.openjdk.org/browse/JDK-8159023) as well as >

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

2023-05-22 Thread Naoto Sato
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 als

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

2023-05-22 Thread Naoto Sato
> 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. Naoto Sato has updated the pull request incr

Re: RFR: 8308046: Move Solaris related charsets from java.base to jdk.charsets module [v2]

2023-05-20 Thread Naoto Sato
On Sat, 20 May 2023 01:03:52 GMT, Ichiroh Takiguchi wrote: > I think the values are package-private. Even if class is changed to `public`, > the classes in`sun.nio.cs.ext` package could not access to these values in > `sun.nio.cs` package... I meant making those package-private fields

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

2023-05-19 Thread Naoto Sato
> 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. Naoto Sato has updated the pull request incr

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

2023-05-19 Thread Naoto Sato
On Fri, 19 May 2023 07:59:58 GMT, Alan Bateman wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Added a table for possible BCP47 values and their mappings > > src/java.base/share/classe

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

2023-05-18 Thread Naoto Sato
> 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. Naoto Sato has updated the pull request incr

RFR: 8308369: Default decomposition mode in Collator

2023-05-18 Thread Naoto Sato
Amending the description about the default decomposition mode in `Collator.NO_DECOMPOSITION` javadoc. - Commit messages: - 8308369: Default decomposition mode in Collator Changes: https://git.openjdk.org/jdk/pull/14049/files Webrev: https://webrevs.openjdk.org/?repo=jdk=14049=00

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

2023-05-18 Thread Naoto Sato
> 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. Naoto Sato has updated the pull request incr

Re: RFR: 8308046: Move Solaris related charsets from java.base to jdk.charsets module [v2]

2023-05-17 Thread Naoto Sato
On Wed, 17 May 2023 23:29:40 GMT, Naoto Sato wrote: >You can import classes in `java.base/sun.nio.cs` with the wild card so that it >would work on all platforms (`Big5` either in `java.base` or `jdk.charsets`) Scratch that, you've already did it. Then you can remove these:

Re: RFR: 8308046: Move Solaris related Japanese charsets from java.base to jdk.charsets module [v2]

2023-05-17 Thread Naoto Sato
On Tue, 16 May 2023 17:13:02 GMT, Naoto Sato wrote: >> Ichiroh Takiguchi has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8308046: Move Solaris related Japanese charsets from java.base to >> jdk.c

Re: RFR: 8308046: Move Solaris related Japanese charsets from java.base to jdk.charsets module [v2]

2023-05-17 Thread Naoto Sato
On Tue, 16 May 2023 15:14:03 GMT, Ichiroh Takiguchi wrote: >> According to "JDK 20 Internationalization Guide" >> https://docs.oracle.com/en/java/javase/20/intl/supported-encodings.html >> Following Solaris related Japanese charsets are in "contained in >> jdk.charsets module" list. >> >> -

RFR: 8308108: Support Unicode extension for collation settings

2023-05-17 Thread Naoto Sato
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. - Commit messages: - 8308108: Support Unicode

Integrated: 8307547: Support variant collations

2023-05-16 Thread Naoto Sato
On Wed, 10 May 2023 20:11:09 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` &g

Re: RFR: 8308046: Move Solaris related Japanese charsets from java.base to jdk.charsets module [v2]

2023-05-16 Thread Naoto Sato
On Tue, 16 May 2023 15:14:03 GMT, Ichiroh Takiguchi wrote: >> According to "JDK 20 Internationalization Guide" >> https://docs.oracle.com/en/java/javase/20/intl/supported-encodings.html >> Following Solaris related Japanese charsets are in "contained in >> jdk.charsets module" list. >> >> -

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

2023-05-16 Thread Naoto Sato
hat multiple implementations > for a locale can be provided. I would also like reviews for the corresponding > CSR. Naoto Sato has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase

Re: RFR: 7065228: To interpret case-insensitive string locale independently

2023-05-16 Thread Naoto Sato
On Tue, 16 May 2023 10:38:52 GMT, Darragh Clarke wrote: > Updated instances of `toLowerCase` and `toUpperCase` in several net and io > files to specify `Locale.ROOT` to ensure that case conversion issues don't > occur, > > I didn't add any new tests but ran tier 1-3 with no issues LGTM. Nice

Re: RFR: 8308022: update for deprecated sprintf for java.base

2023-05-15 Thread Naoto Sato
On Fri, 12 May 2023 17:57:43 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > May I have this update reviewed? > > The sprintf is deprecated in Xcode 14, and Microsoft Virtual Studio, because > of security concerns. The issue was addressed in >

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

2023-05-15 Thread Naoto Sato
On Sun, 14 May 2023 06:37:05 GMT, Alan Bateman wrote: >>> > I'm just wondering where a developer might go to get a definitive list, >>> > i.e. aside from this API note, how would they know that "-trad" or >>> > "-traditional" can be used to configure the ordering. >>> > Locale.forLanguageTag

Re: RFR: 8299340: CreateProcessW lpCommandLine must be mutable [v2]

2023-05-12 Thread Naoto Sato
On Fri, 12 May 2023 19:38:53 GMT, Roger Riggs wrote: >> Launching of processes on Windows using `ProcessCreateW` with a Unicode >> character set requires the buffer to be writable. An access violation might >> occur if `ProcessCreateW` writes to the command line string. The current >>

Re: RFR: 8308021: Update IANA Language Subtag Registry to Version 2023-05-11

2023-05-12 Thread Naoto Sato
On Fri, 12 May 2023 17:56:12 GMT, Justin Lu wrote: > Please review this trivial fix which updates the IANA data to version > 5/11/2023. As the update only includes variant sub-tags, there is no impact > to JDK tests. The update can be found >

Re: RFR: 8299340: CreateProcessW lpCommandLine must be mutable

2023-05-12 Thread Naoto Sato
On Tue, 9 May 2023 21:46:51 GMT, Roger Riggs wrote: > Launching of processes on Windows using `ProcessCreateW` with a Unicode > character set requires the buffer to be writable. An access violation might > occur if `ProcessCreateW` writes to the command line string. The current >

Re: RFR: 8306597: Improve string formatting in EquivMapsGenerator.java [v4]

2023-05-12 Thread Naoto Sato
On Fri, 12 May 2023 17:25:45 GMT, Justin Lu wrote: >> Please review changes to `EquivMapsGenerator.java` (which is used to >> generate the Locale equivalencies for the JDK). >> >> The file previously used large concatenated Strings, which are now replaced >> with text blocks, in addition to

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

2023-05-12 Thread Naoto Sato
On Fri, 12 May 2023 16:41:20 GMT, Steven Loomis wrote: >>> I'm just wondering where a developer might go to get a definitive list, >>> i.e. aside from this API note, how would they know that "-trad" or >>> "-traditional" can be used to configure the ordering. Locale.forLanguageTag >>>

<    2   3   4   5   6   7   8   9   10   11   >