Re: RFR: 8288979: Improve CLDRConverter run time

2022-06-22 Thread Roger Riggs
On Wed, 22 Jun 2022 14:24:05 GMT, Daniel Jeliński wrote: > This PR improves the performance of deduplication done by > ResourceBundleGenerator. > > The original implementation compared every pair of values, requiring O(n^2) > time. The new implementation uses a HashMap to find duplicates, trad

Re: RFR: 8288979: Improve CLDRConverter run time [v2]

2022-06-22 Thread Roger Riggs
On Wed, 22 Jun 2022 17:07:11 GMT, Daniel Jeliński wrote: >> make/jdk/src/classes/build/tools/cldrconverter/ResourceBundleGenerator.java >> line 146: >> >>> 144: // generic reduction of duplicated values >>> 145: Map newMap = new HashMap<>(map); >>> 146: Map d

Re: RFR: 8288979: Improve CLDRConverter run time [v3]

2022-06-23 Thread Roger Riggs
On Thu, 23 Jun 2022 08:53:37 GMT, Daniel Jeliński wrote: >> This PR improves the performance of deduplication done by >> ResourceBundleGenerator. >> >> The original implementation compared every pair of values, requiring O(n^2) >> time. The new implementation uses a HashMap to find duplicates,

Re: [jdk19] RFR: 8289252: Recommend Locale.of() method instead of the constructor

2022-06-28 Thread Roger Riggs
On Tue, 28 Jun 2022 17:11:31 GMT, Naoto Sato wrote: > This is a leftover documentation fix to the deprecation of `Locale` > constructors. `Locale.Builder` class had some texts that suggested using one > of those constructors, which need to be replaced with a `Locale.of()` method. > A correspon

Re: [jdk19] RFR: 8289252: Recommend Locale.of() method instead of the constructor [v2]

2022-06-28 Thread Roger Riggs
On Tue, 28 Jun 2022 20:17:21 GMT, Naoto Sato wrote: >> This is a leftover documentation fix to the deprecation of `Locale` >> constructors. `Locale.Builder` class had some texts that suggested using one >> of those constructors, which need to be replaced with a `Locale.of()` >> method. A corre

Re: RFR: 8288723: Avoid redundant ConcurrentHashMap.get call in java.time [v2]

2022-07-06 Thread Roger Riggs
On Sun, 3 Jul 2022 22:06:58 GMT, Attila Szegedi wrote: >> src/java.base/share/classes/java/time/format/DateTimeTextProvider.java line >> 312: >> >>> 310: private Object findStore(TemporalField field, Locale locale) { >>> 311: Entry key = createEntry(field, locale); >>> 312:

Re: RFR: 8288723: Avoid redundant ConcurrentHashMap.get call in java.time [v2]

2022-07-06 Thread Roger Riggs
On Tue, 5 Jul 2022 21:27:16 GMT, Attila Szegedi wrote: >> Can there be some JMH tests to confirm the performance? >> The value domain of the keys is pretty limited (7 * 7) max; and I'm not sure >> that the combination of creating a new record and the hashcode and equals >> methods would be fast

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

2022-07-18 Thread Roger Riggs
On Mon, 18 Jul 2022 18:40:51 GMT, Сергей Цыпанов wrote: >> Simplify code with `String.join()` > > Сергей Цыпанов has updated the pull request incrementally with one additional > commit since the last revision: > > 8290300: Revert erroneous changes Marked as reviewed by rriggs (Reviewer). --

Re: RFR: 8288723: Avoid redundant ConcurrentHashMap.get call in java.time [v4]

2022-07-20 Thread Roger Riggs
On Wed, 20 Jul 2022 11:19:07 GMT, Andrey Turbanov wrote: >> Instead of separate ConcurrentHashMap.get call, we can use result of >> previous putIfAbsent call. > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8288723: Avo

Re: RFR: 8289227: Support for BCP 47 Extension T - Transformed Content [v3]

2022-07-26 Thread Roger Riggs
On Tue, 26 Jul 2022 17:17:46 GMT, Naoto Sato wrote: >> This PR is to propose supporting the `T` extension to the BCP 47 to which >> `java.util.Locale` class conforms. There are two extensions to the BCP 47, >> one is `Unicode Locale Extension` which has been supported since JDK7, the >> other

Re: RFR: 8289227: Support for BCP 47 Extension T - Transformed Content [v3]

2022-08-01 Thread Roger Riggs
On Tue, 26 Jul 2022 20:52:20 GMT, Naoto Sato wrote: > > I would suggest deferring the APIs for `getTransformedContentFields()` and > > `getTransformedContentSource()`. > > OK, removed those two convenient APIs. I expected much of the complexity of parsing and storing content transformed exten

Re: RFR: 8293008: Replace uses of StringBuffer with StringBuilder in MergeCollation

2022-08-29 Thread Roger Riggs
On Wed, 24 Aug 2022 19:31:23 GMT, Andrey Turbanov wrote: > Couple of package-private classes in `java.text` package still use > `StringBuffer`: `MergeCollation` and `PatternEntry`. > StringBuffer is a legacy synchronized class. StringBuilder is a direct > replacement to StringBuffer which gener

Re: RFR: 8293008: Replace uses of StringBuffer with StringBuilder in MergeCollation [v2]

2022-08-31 Thread Roger Riggs
On Wed, 31 Aug 2022 08:46:32 GMT, Andrey Turbanov wrote: >> Couple of package-private classes in `java.text` package still use >> `StringBuffer`: `MergeCollation` and `PatternEntry`. >> StringBuffer is a legacy synchronized class. StringBuilder is a direct >> replacement to StringBuffer which g

Re: RFR: 8293154: TemporalQueries java doc error

2022-08-31 Thread Roger Riggs
On Wed, 31 Aug 2022 17:08:28 GMT, Naoto Sato wrote: > Simple doc fix. Marked as reviewed by rriggs (Reviewer). - PR: https://git.openjdk.org/jdk/pull/10103

Re: RFR: 8293146: Strict DateTimeFormatter fails to report an invalid week 53 [v2]

2022-09-07 Thread Roger Riggs
On Tue, 6 Sep 2022 19:06:45 GMT, Naoto Sato wrote: >> Fixed the max week number on parsing the week of week-based year field in >> strict mode. It used to be always returning the largest maximum, which >> should be adjusted by the actual week-based year. > > Naoto Sato has updated the pull requ

Re: RFR: 8294397: Replace StringBuffer with StringBuilder within java.text [v3]

2022-09-30 Thread Roger Riggs
On Fri, 30 Sep 2022 16:52:40 GMT, Brent Christian wrote: >> Due to some [bootstrapping >> issues](https://stackoverflow.com/questions/71834059/why-invokedynamic-based-string-concatenation-is-not-available-for-javac-in-java) >> in `java.base` explicit String concatenation is not translated into

Re: RFR: 8295232: "java.locale.useOldISOCodes" property is read lazily

2022-10-12 Thread Roger Riggs
On Wed, 12 Oct 2022 20:03:05 GMT, Naoto Sato wrote: > Fixed to utilize `StaticProperty` so that the system property value for > `java.locale.useOldISOCodes` set on the command line is honored even with > lazy `Locale` initialization. Marked as reviewed by rriggs (Reviewer). - PR:

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

2022-11-16 Thread Roger Riggs
On Mon, 14 Nov 2022 17:51:24 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 evalu

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

2022-11-17 Thread Roger Riggs
On Wed, 16 Nov 2022 20:33:50 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 evalu

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

2022-11-18 Thread Roger Riggs
On Fri, 18 Nov 2022 14:10:11 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 evalu

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

2022-11-18 Thread Roger Riggs
On Thu, 17 Nov 2022 17:12:53 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/template/StringTemplate.java line 233: >> >>> 231: >>> 232: /** >>> 233: * Returns a StringTemplate with the given fragments and values. >> >> Suggestion: >> >> * Returns a {@code String

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

2022-11-22 Thread Roger Riggs
On Mon, 21 Nov 2022 17:43:16 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 evalu

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

2022-11-23 Thread Roger Riggs
On Wed, 23 Nov 2022 13:55:38 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 evalu

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

2022-11-23 Thread Roger Riggs
On Tue, 22 Nov 2022 20:17:41 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/util/FormatProcessor.java line 64: >> >>> 62: * >>> 63: * @implSpec Since, values are found within the string template, >>> argument indexing >>> 64: * specifiers are unsupported. >> >> What is the behav

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

2022-11-23 Thread Roger Riggs
On Wed, 23 Nov 2022 13:55:38 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 evalu

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

2022-11-23 Thread Roger Riggs
On Wed, 23 Nov 2022 16:40:10 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/util/FormatProcessor.java line 85: >> >>> 83: >>> 84: /** >>> 85: * {@inheritDoc} >> >> The javadoc should describe in more detail what `process` does and the >> errors than can occur. >> That wil

Re: RFR: 8299571: ZoneRulesProvider.registerProvider() can leave inconsistent state on failure

2023-01-10 Thread Roger Riggs
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

Re: RFR: 8298047: Remove all non-significant trailing whitespace from properties files [v2]

2023-01-16 Thread Roger Riggs
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 sourc

Re: RFR: JDK-8300133: Use generalized see and link tags in core libs [v2]

2023-01-16 Thread Roger Riggs
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

Re: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v2]

2023-01-27 Thread Roger Riggs
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

Re: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v2]

2023-01-27 Thread Roger Riggs
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 i

Re: RFR: 8301552: Use AtomicReferenceArray for caching instead of CHM in ZoneOffset [v6]

2023-02-03 Thread Roger Riggs
On Thu, 2 Feb 2023 15:44:54 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 `ConcurrentH

Re: RFR: 8301552: Use AtomicReferenceArray for caching instead of CHM in ZoneOffset [v8]

2023-02-10 Thread Roger Riggs
On Thu, 9 Feb 2023 13:46:14 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 `ConcurrentH

Re: RFR: 8282319: java.util.Locale method to stream available Locales [v3]

2023-02-24 Thread Roger Riggs
On Fri, 24 Feb 2023 21:57:41 GMT, Justin Lu wrote: >> OK but then we should be consistent and update all of the methods to use the >> new tag or revert the change for consistency > > Makes sense, will look at both Locale and LocaleServiceProviderPool and > update the methods that are applicabl

Re: RFR: 8282319: java.util.Locale method to stream available Locales [v4]

2023-02-27 Thread Roger Riggs
On Mon, 27 Feb 2023 17:37:48 GMT, Justin Lu wrote: >> This PR adds a new method to java.util.Locale which returns Stream >> >> The contents of the Stream are composed of the same underlying elements as >> Locale.getAvailableLocales(). >> >> This method allows streaming of the Locale array with

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

2023-03-03 Thread Roger Riggs
On Mon, 27 Feb 2023 12:47:03 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 evalu

Re: RFR: 8303440: The "ZonedDateTime.parse" may not accept the "UTC+XX" zone id [v3]

2023-03-06 Thread Roger Riggs
On Sat, 4 Mar 2023 02:22:39 GMT, Naoto Sato wrote: >> This change is to fix a regression caused by the fix to >> [JDK-8234347](https://bugs.openjdk.org/browse/JDK-8234347). The previous fix >> was simply disabling offset-based parsing if the parser was text-based. >> Instead, check if it is an

Re: RFR: 8303480: Miscellaneous fixes to mostly invisible doc comments [v2]

2023-03-06 Thread Roger Riggs
On Mon, 6 Mar 2023 20:22:48 GMT, Pavel Rappo wrote: >> Please review this superficial documentation cleanup that was triggered by >> unrelated analysis of doc comments in JDK API. >> >> The only effect that this multi-area PR has on the JDK API Documentation >> (i.e. the observable effect on t

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

2023-03-14 Thread Roger Riggs
On Tue, 14 Mar 2023 15:49:56 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 >> cur

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

2023-03-15 Thread Roger Riggs
On Wed, 15 Mar 2023 18:21:11 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 >> cur

Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v2]

2023-03-24 Thread Roger Riggs
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,

Re: RFR: 8304993: bad sentence break in DateFormat

2023-03-28 Thread Roger Riggs
On Tue, 28 Mar 2023 21:01:45 GMT, Justin Lu wrote: > This PR fixes a bad sentence break in DateFormat.FIELD AM_PM that caused > incomplete API > > Before: > src="https://user-images.githubusercontent.com/67398801/228359165-f8c66ca2-745b-47ea-bca9-9c4afc7af914.png";> > > After: > src="https:/

RFR: 8304911: Use OperatingSystem enum in some modules

2023-04-04 Thread Roger Riggs
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, - jdk.net, - jdk.zipfs - Commit messages: - In jd

Re: RFR: 8305107: Emoji related binary properties in RegEx [v2]

2023-04-04 Thread Roger Riggs
On Tue, 4 Apr 2023 17:10:09 GMT, Naoto Sato wrote: >> Introducing new regex constructs that match those 6 new Unicode Emoji >> properties implemented in the `Character` class >> (https://bugs.openjdk.org/browse/JDK-8303018). A corresponding CSR has been >> drafted. > > Naoto Sato has updated t

Re: RFR: 8305107: Emoji related binary properties in RegEx [v3]

2023-04-04 Thread Roger Riggs
On Tue, 4 Apr 2023 20:15:52 GMT, Naoto Sato wrote: >> Introducing new regex constructs that match those 6 new Unicode Emoji >> properties implemented in the `Character` class >> (https://bugs.openjdk.org/browse/JDK-8303018). A corresponding CSR has been >> drafted. > > Naoto Sato has updated t

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

2023-04-05 Thread Roger Riggs
On Wed, 5 Apr 2023 08:39:35 GMT, Alan Bateman 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.

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

2023-04-05 Thread Roger Riggs
On Wed, 5 Apr 2023 08:37:27 GMT, Alan Bateman 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.

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

2023-04-05 Thread Roger Riggs
> 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, > - jdk.net, > -

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

2023-04-05 Thread Roger Riggs
> 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, > - jdk.net, > -

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

2023-04-07 Thread Roger Riggs
> 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, > - jdk.net, > -

Integrated: 8304911: Use OperatingSystem enum in some modules

2023-04-10 Thread Roger Riggs
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, >

Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v3]

2023-04-12 Thread Roger Riggs
On Mon, 10 Apr 2023 14:01:53 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,

Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v2]

2023-04-12 Thread Roger Riggs
On Fri, 24 Mar 2023 19:28:57 GMT, Sergey Tsypanov wrote: >> 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(

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

2023-04-13 Thread Roger Riggs
On Wed, 12 Apr 2023 19:02:22 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 evalu

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

2023-04-13 Thread Roger Riggs
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: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v57]

2023-04-13 Thread Roger Riggs
On Wed, 12 Apr 2023 19:02:22 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 evalu

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

2023-04-13 Thread Roger Riggs
On Thu, 13 Apr 2023 17:09:13 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 evalu

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

2023-04-13 Thread Roger Riggs
On Thu, 13 Apr 2023 19:45:59 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 evalu

Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v2]

2023-04-17 Thread Roger Riggs
On Sun, 16 Apr 2023 11:44:52 GMT, Sergey Tsypanov wrote: >> Special casing for len == 0 and keeping the existing buf.insert for len == 1 >> would avoid object creation except when it would improve performance. > > @RogerRiggs sorry I don't get it. Maybe you mean speacial casing for > `padWidth

Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v5]

2023-04-19 Thread Roger Riggs
On Tue, 18 Apr 2023 18:49:54 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,

Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v6]

2023-04-20 Thread Roger Riggs
On Thu, 20 Apr 2023 15:05:18 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,

Re: RFR: 8305207: Calendar.aggregateStamp(int, int) return value can be simplified

2023-04-20 Thread Roger Riggs
On Thu, 20 Apr 2023 06:32:41 GMT, Justin Lu wrote: > Small cleanup / tweak spotted in Calendar to improve readability. Marked as reviewed by rriggs (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/13554#pullrequestreview-1394537788

Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v7]

2023-04-21 Thread Roger Riggs
On Fri, 21 Apr 2023 17:45:50 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,

Re: RFR: 8159337: Introduce a method in Locale class to return the language tags as per RFC 5646 convention [v4]

2023-05-03 Thread Roger Riggs
On Tue, 2 May 2023 21:42:09 GMT, Justin Lu wrote: >> Please review this PR which adds the method `caseFoldLanguageTag(String >> languageTag)` to java.util.Locale. >> >> This method case folds a language tag to adhere to _[section 2.1.1. >> Formatting of Language Tags of >> RFC5646](https://ww

Re: RFR: 8159337: Introduce a method in Locale class to return the language tags as per RFC 5646 convention [v6]

2023-05-04 Thread Roger Riggs
On Wed, 3 May 2023 20:32:25 GMT, Justin Lu wrote: >> Please review this PR which adds the method `caseFoldLanguageTag(String >> languageTag)` to java.util.Locale. >> >> This method case folds a language tag to adhere to _[section 2.1.1. >> Formatting of Language Tags of >> RFC5646](https://ww

Re: RFR: 8281103: Give example for Locale that is English and follows the ISO standards

2023-05-09 Thread Roger Riggs
On Tue, 9 May 2023 20:39:19 GMT, Justin Lu wrote: > Please review this PR which adds an example snippet to > `java.time.temporal.WeekFields.of(Locale locale)` > > The snippet demonstrates how to create a Locale that has English Locale > qualities with an ISO-8601 first day of the week. > > T

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

2023-05-18 Thread Roger Riggs
On Thu, 18 May 2023 16:42:23 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-18 Thread Roger Riggs
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: 8308316: Default decomposition mode in Collator [v3]

2023-05-30 Thread Roger Riggs
On Thu, 25 May 2023 22:19:18 GMT, Naoto Sato wrote: >> 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 tens

Re: RFR: 8295555: Primitive wrapper caches could be `@Stable`

2023-06-12 Thread Roger Riggs
On Mon, 12 Jun 2023 14:25:42 GMT, Per Minborg wrote: > This PR proposes adding `@Stable` to certain wrapper classes' cache arrays > (e.g. `Integer` and `Long`). > > Comments are welcome as to how to improve the VM's handling now that the > backing cache array is `@Stable`. Are there simplifica

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

2023-06-12 Thread Roger Riggs
On Fri, 9 Jun 2023 22:17:39 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 > needed

RFR: 8310033: Clarify return value of Java Time compareTo methods

2023-06-16 Thread Roger Riggs
In java.time packages, clarify timeline order javadoc to mention "before" and "after" in the value of the `compareTo` method return values. Add javadoc @see tags to isBefore and isAfter methods Replace use of "negative" and positive with "less than zero" and "greater than zero" in javadoc @retu

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

2023-06-22 Thread Roger Riggs
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. Correcting the description of the delimiter seems like the bes

Re: RFR: 8310890: Normalize identifier names

2023-06-26 Thread Roger Riggs
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 > pronoun,

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

2023-06-27 Thread Roger Riggs
On Tue, 27 Jun 2023 03:39:30 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. > > Naoto Sato has updated the pull request incrementally wi

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

2023-06-27 Thread Roger Riggs
> > The commit being backported was authored by Naoto Sato on 27 Jun 2023 and was > reviewed by Roger Riggs, Joe Darcy, Iris Clark and Lance Andersen. > > Thanks! Marked as reviewed by rriggs (Reviewer). - PR Review: https://git.openjdk.org/jdk21/pull/70#pullrequestreview-1501531725

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

2023-06-28 Thread Roger Riggs
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. Looks ok; was this a tool detected race? - Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pu

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

2023-06-29 Thread Roger Riggs
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. Given all the comments, I don't think this is ready to integrate. - Changes requested by rriggs (Reviewer). PR Review: https:

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

2023-07-05 Thread Roger Riggs
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 tr

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

2023-07-05 Thread Roger Riggs
On Tue, 4 Jul 2023 22:03:58 GMT, John R Rose wrote: >>> Hmm, I think that issue refers to code that have explicit non-Object >>> parameter types (like `X::equals(Object)boolean` in the issue's sample). >>> This method already have both arguments as `Object`, so I don't think >>> there's any ty

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

2023-07-05 Thread Roger Riggs
On Wed, 5 Jul 2023 16:27:38 GMT, Pavel Rappo wrote: >> src/java.base/share/classes/java/text/DecimalFormat.java line 2930: >> >>> 2928: DecimalFormat other = (DecimalFormat) obj; >>> 2929: return ((posPrefixPattern == other.posPrefixPattern && >>> 2930: positiveP

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

2023-07-05 Thread Roger Riggs
On Wed, 5 Jul 2023 16:39:58 GMT, Pavel Rappo wrote: >> src/java.base/share/classes/java/text/CompactNumberFormat.java line 2364: >> >>> 2362: return true; >>> 2363: } >>> 2364: >> >> Moving this before the `super.equals` call performance-wise would favor the >> equals cas

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

2023-07-18 Thread Roger Riggs
On Mon, 17 Jul 2023 23:33:37 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

Re: RFR: 8041488: Locale-Dependent List Patterns [v5]

2023-08-08 Thread Roger Riggs
On Tue, 8 Aug 2023 17:19:55 GMT, Naoto Sato wrote: >> Introducing a new formatting class for locale-dependent list patterns. The >> class is to provide the functionality from the Unicode Consortium's LDML >> specification for [list >> patterns](https://www.unicode.org/reports/tr35/tr35-general

Re: RFR: 8041488: Locale-Dependent List Patterns [v8]

2023-08-18 Thread Roger Riggs
On Thu, 10 Aug 2023 17:31:28 GMT, Naoto Sato wrote: >> Introducing a new formatting class for locale-dependent list patterns. The >> class is to provide the functionality from the Unicode Consortium's LDML >> specification for [list >> patterns](https://www.unicode.org/reports/tr35/tr35-genera

Re: RFR: 8041488: Locale-Dependent List Patterns [v8]

2023-08-18 Thread Roger Riggs
On Thu, 10 Aug 2023 17:31:28 GMT, Naoto Sato wrote: >> Introducing a new formatting class for locale-dependent list patterns. The >> class is to provide the functionality from the Unicode Consortium's LDML >> specification for [list >> patterns](https://www.unicode.org/reports/tr35/tr35-genera

Re: RFR: 8315097: Rename createJavaProcessBuilder [v2]

2023-08-29 Thread Roger Riggs
On Tue, 29 Aug 2023 09:12:51 GMT, Leo Korinth wrote: >> Rename createJavaProcessBuilder so that it is not used by mistake instead of >> createTestJvm. >> >> I have used the following sed script: `find -name "*.java" | xargs -n 1 sed >> -i -e >> "s/createJavaProcessBuilder(/createJavaProcessBu

Re: RFR: 8315097: Rename createJavaProcessBuilder [v2]

2023-08-29 Thread Roger Riggs
On Tue, 29 Aug 2023 14:06:01 GMT, Roger Riggs wrote: >> Leo Korinth has updated the pull request incrementally with one additional >> commit since the last revision: >> >> copyright > > I don't think this is the best change across so many files. > It g

Re: RFR: 8315097: Rename createJavaProcessBuilder [v3]

2023-08-30 Thread Roger Riggs
On Wed, 30 Aug 2023 09:23:55 GMT, Leo Korinth wrote: >> Rename createJavaProcessBuilder so that it is not used by mistake instead of >> createTestJvm. >> >> I have used the following sed script: `find -name "*.java" | xargs -n 1 sed >> -i -e >> "s/createJavaProcessBuilder(/createJavaProcessBu

Re: RFR: 8315097: Rename createJavaProcessBuilder [v3]

2023-09-05 Thread Roger Riggs
On Mon, 4 Sep 2023 11:01:23 GMT, Leo Korinth wrote: > What do you prefer? Do you have a better alternative? Do someone still think > the current code is good? I think what we have today is inferior to all these > improvements, and I would like to make it harder to develop bad test ca The curre

Re: RFR: 8041488: Locale-Dependent List Patterns [v12]

2023-09-05 Thread Roger Riggs
On Tue, 5 Sep 2023 19:50:20 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/text/ListFormat.java line 46: >> >>> 44: * defined in Unicode Consortium's LDML specification for >>> 45: * >> href="https://www.unicode.org/reports/tr35/tr35-general.html#ListPatterns";> >>> 46: * List Pat

Re: RFR: 8041488: Locale-Dependent List Patterns [v12]

2023-09-05 Thread Roger Riggs
On Tue, 5 Sep 2023 19:50:23 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/text/ListFormat.java line 48: >> >>> 46: * List Patterns. >>> 47: * >>> 48: * Three types of concatenation are provided: {@link Type#STANDARD >>> STANDARD}, >> >> A "Type" and "Style" together make up a

Re: RFR: 8041488: Locale-Dependent List Patterns [v12]

2023-09-05 Thread Roger Riggs
On Tue, 5 Sep 2023 19:50:29 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/text/ListFormat.java line 521: >> >>> 519: var sb = new StringBuilder(256).append(patterns[START]); >>> 520: IntStream.range(2, count - 1).forEach(i -> >>> sb.append(middleBetween).append("{")

Re: RFR: 8041488: Locale-Dependent List Patterns [v12]

2023-09-05 Thread Roger Riggs
On Tue, 29 Aug 2023 16:51:49 GMT, Naoto Sato wrote: >> Introducing a new formatting class for locale-dependent list patterns. The >> class is to provide the functionality from the Unicode Consortium's LDML >> specification for [list >> patterns](https://www.unicode.org/reports/tr35/tr35-genera

Re: RFR: 8041488: Locale-Dependent List Patterns [v14]

2023-09-07 Thread Roger Riggs
On Tue, 5 Sep 2023 22:47:01 GMT, Naoto Sato wrote: >> Introducing a new formatting class for locale-dependent list patterns. The >> class is to provide the functionality from the Unicode Consortium's LDML >> specification for [list >> patterns](https://www.unicode.org/reports/tr35/tr35-general

Re: RFR: 8041488: Locale-Dependent List Patterns [v15]

2023-09-08 Thread Roger Riggs
e unrelated changes brought in > by the merge/rebase. The pull request contains 24 additional commits since > the last revision: > > - Reflects review comments > - Merge branch 'master' into JDK-8041488-ListPatterns-PR > - Incorporating suggested changes > -

Re: RFR: 8296246: Update Unicode Data Files to Version 15.1.0 [v3]

2023-09-19 Thread Roger Riggs
On Mon, 18 Sep 2023 18:33:20 GMT, Naoto Sato wrote: >> This PR is to incorporate the latest Unicode 15.1, which was released >> yesterday. Besides the usual character data update, an upgraded >> implementation of RegEx which reflects the Indic Conjunct Break specified in >> the latest [Unicode

Re: RFR: 8316974: ListFormat creation is unsuccessful for some of the supported Locales [v2]

2023-09-27 Thread Roger Riggs
On Tue, 26 Sep 2023 22:27:55 GMT, Naoto Sato wrote: >> Some CLDR locales have partial list patterns, such as only the "end" >> pattern, and expect "start" and "middle" patterns to be inherited from >> parent locales. Made the code capable of the inheritance. > > Naoto Sato has updated the pull

Re: RFR: 8316974: ListFormat creation is unsuccessful for some of the supported Locales [v3]

2023-09-27 Thread Roger Riggs
On Wed, 27 Sep 2023 19:06:26 GMT, Naoto Sato wrote: >> Some CLDR locales have partial list patterns, such as only the "end" >> pattern, and expect "start" and "middle" patterns to be inherited from >> parent locales. Made the code capable of the inheritance. > > Naoto Sato has updated the pull

Re: RFR: 8317979: Use TZ database style abbreviations in the CLDR locale provider [v2]

2023-10-16 Thread Roger Riggs
On Mon, 16 Oct 2023 23:37:51 GMT, Naoto Sato wrote: >> CLDR provides very few short names for time zones, such as PST/PDT. This >> will typically end up substituting names from the COMPAT provider. Once the >> COMPAT is removed, they will be displayed in the GMT format, i.e., >> GMT+XX:YY. Alt

  1   2   3   >