Re: RFR: 8304913: Use OperatingSystem, Architecture, and Version in jlink [v4]

2023-05-09 Thread Roger Riggs
On Tue, 9 May 2023 11:16:32 GMT, Glavo wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Correct Platform.is64Bit() to report address size of the architecture >> enum, not the running

Re: RFR: 8304913: Use OperatingSystem, Architecture, and Version in jlink [v5]

2023-05-09 Thread Roger Riggs
s.name nor os.arch should be assumed to be changeable; > one test case is removed because it assumes os.name can be changed on the > command line. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: The CDS plugin supports only

Re: RFR: JDK-8133773: clarify specification of Spliterator.tryAdvance [v2]

2023-05-08 Thread Roger Riggs
On Mon, 8 May 2023 19:07:17 GMT, Viktor Klang wrote: >> Attempting to make the "at-most once" nature, of invoking the supplied >> action to tryAdvance, clearer in the JavaDoc. > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision: > >

Re: RFR: 8307466: java.time.Instant calculation bug in until and between methods [v2]

2023-05-08 Thread Roger Riggs
On Mon, 8 May 2023 19:05:43 GMT, Raffaello Giulietti wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Slight perf improvement using int instead of long for local nanosDiff > >

Re: RFR: 8307466: java.time.Instant calculation bug in until and between methods [v2]

2023-05-08 Thread Roger Riggs
On Sun, 7 May 2023 17:58:26 GMT, Roger Riggs wrote: >> The implementation of java.time.Instant.until(I2, ChronoUnit) in some cases >> did not correctly borrow or carry from the nanos to the seconds when >> computing using ChronoUnit.MILLIS or ChronoUnit.MICROS. >>

Re: RFR: 8304913: Use OperatingSystem, Architecture, and Version in jlink [v4]

2023-05-08 Thread Roger Riggs
s.name nor os.arch should be assumed to be changeable; > one test case is removed because it assumes os.name can be changed on the > command line. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Correct Platform.is64Bit(

Re: RFR: 8305486: Add split() variants that keep the delimiters to String and j.u.r.Pattern [v6]

2023-05-08 Thread Roger Riggs
On Mon, 8 May 2023 14:04:27 GMT, Raffaello Giulietti wrote: >> Add `split()` overloads to `String` and `java.util.regex.Pattern` that, in >> addition to the substrings returned by current `split()` variants, also >> return the delimiters matching the regular expression. > > Raffaello

Re: RFR: 8305486: Add split() variants that keep the delimiters to String and j.u.r.Pattern [v5]

2023-05-08 Thread Roger Riggs
On Mon, 8 May 2023 13:45:53 GMT, Roger Riggs wrote: >> I mean the usual juxtaposition in maths to signify multiplication, like in >> _a_ _b_ instead of _a_·_b_ >> >>> the array's length will be no greater than 2 _limit_ - 1 > > I would replace c

Re: RFR: 8305486: Add split() variants that keep the delimiters to String and j.u.r.Pattern [v5]

2023-05-08 Thread Roger Riggs
On Mon, 8 May 2023 12:30:45 GMT, Raffaello Giulietti wrote: >>> Alternatively, one could remove the multiplication sign altogether... >> >> Do you mean rewording it to something like: >> >>> the array's length will be no greater than 2 times limit - 1 > > I mean the usual juxtaposition in

Re: RFR: 8305950: Have -XshowSettings option display tzdata version

2023-05-08 Thread Roger Riggs
On Mon, 8 May 2023 13:14:34 GMT, Sean Coffey wrote: > minor enhancement to have -XshowSettings launcher option display the version > of tzdata installed in the JDK > > example output of the new tzdata info : > > > > Locale settings: > default locale = English > default display

Re: RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions [v6]

2023-05-08 Thread Roger Riggs
On Tue, 2 May 2023 18:02:41 GMT, Volker Simonis wrote: >> This issue was reported by: Yakov Shafranovich >> ([yako...@amazon.com](mailto:yako...@amazon.com)) >> >> Currently, `ObjectInputStream::readObject()` doesn't explicitly checks for a >> negative array length in the deserialization

Re: RFR: 8307466: java.time.Instant calculation bug in until and between methods [v2]

2023-05-07 Thread Roger Riggs
ugs.openjdk.org/browse/JDK-8273369). Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Slight perf improvement using int instead of long for local nanosDiff - Changes: - all: https://git.openjdk.org/jdk/pull/13846/files

RFR: 8307466: java.time.Instant calculation bug in until and between methods

2023-05-05 Thread Roger Riggs
The implementation of java.time.Instant.until(I2, ChronoUnit) in some cases did not correctly borrow or carry from the nanos to the seconds when computing using ChronoUnit.MILLIS or ChronoUnit.MICROS. The errant computation was introduced by

Re: Time difference calculation bug

2023-05-05 Thread Roger Riggs
:10 PM, Roger Riggs wrote: Hi, I created a Jira issue: 8307466 <https://bugs.openjdk.org/browse/JDK-8307466> java.time.Instant Time difference calculation bug The root cause of the bug is in the code that manages the representation of Instant as seconds and nanoseconds. The borrow/carry

Re: RFR: 8304913: Use OperatingSystem, Architecture, and Version in jlink [v3]

2023-05-05 Thread Roger Riggs
On Thu, 4 May 2023 12:36:32 GMT, Jaikiran Pai wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Source code cleanup suggested by reviewers > > src/jdk.jlink/share/classes/jdk/tools/jli

Re: RFR: 8304914: Use OperatingSystem, Architecture, and Version in jpackage [v2]

2023-05-05 Thread Roger Riggs
y not be needed if OpenJDK no > longer supports them. > > It is recommended to remove os version checks that apply only to Mac versions > before 10.15. > Mac OS X 10.15 is the oldest version supported. Roger Riggs has updated the pull request incrementally with one additional

Re: RFR: 8304913: Use OperatingSystem, Architecture, and Version in jlink [v3]

2023-05-05 Thread Roger Riggs
s.name nor os.arch should be assumed to be changeable; > one test case is removed because it assumes os.name can be changed on the > command line. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Source code cleanu

Re: RFR: 8304913: Use OperatingSystem, Architecture, and Version in jlink [v2]

2023-05-04 Thread Roger Riggs
s.name nor os.arch should be assumed to be changeable; > one test case is removed because it assumes os.name can be changed on the > command line. Roger Riggs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 28 commits: - Remo

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 >>

Re: Time difference calculation bug

2023-05-04 Thread Roger Riggs
thing, but at the moment I can't understand what that is. Regards, Stuart From: core-libs-dev On Behalf Of Roger Riggs Sent: 03 May 2023 20:58 To:core-libs-dev@openjdk.org Subject: Re: Time difference calculation bug Hi, The seconds and nano-seconds are computed separately. The repres

RFR: 8304913: Use OperatingSystem, Architecture, and Version in jlink

2023-05-03 Thread Roger Riggs
Refactor the Platform class of jlink to use jdk.internal.util OperatingSystem and Architecture instead of os.name and os.arch. They are direct replacements for the Platform enums except for UNKNOWN; its use is refactored to report errors via exceptions. Neither os.name nor os.arch should be

Re: Time difference calculation bug

2023-05-03 Thread Roger Riggs
Hi, The seconds and nano-seconds are computed separately. The representation of Instant holds seconds and nanoseconds separately. The computation is performed on the nano-seconds of the Instant and truncated to milliseconds. The value of 0.000999 becomes 0 when truncated to MILLIS. Regards,

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 >>

RFR: 8304914: Use OperatingSystem, Architecture, and Version in jpackage

2023-05-02 Thread Roger Riggs
Refactor the Platform class in jdk.jpackage to use the internal OperatingSystem, Architecture, and Version classes. The OperatingSystem.isXXX() and Architecture.isYYY() methods replace comparisons in the Platform class. The checks of the os.version are replaced but may not be needed if OpenJDK

Re: RFR: 8303919: Instant.ofEpochMilli says it can throw an exception that it can't [v2]

2023-05-02 Thread Roger Riggs
On Tue, 2 May 2023 19:54:14 GMT, Eamonn McManus wrote: >> Instant.ofEpochMilli says this: >> >> >> @throws DateTimeException if the instant exceeds the maximum or minimum >> instant >> >> >> But that can't happen. Even given `Long.MIN_VALUE` or `Long.MAX_VALUE` it >> does not throw. That's

Re: RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions [v4]

2023-05-02 Thread Roger Riggs
On Tue, 2 May 2023 13:26:31 GMT, Volker Simonis wrote: >> This issue was reported by: Yakov Shafranovich >> ([yako...@amazon.com](mailto:yako...@amazon.com)) >> >> Currently, `ObjectInputStream::readObject()` doesn't explicitly checks for a >> negative array length in the deserialization

Integrated: 8306678: Replace use of os.version with an internal Version record

2023-05-01 Thread Roger Riggs
On Fri, 21 Apr 2023 16:44:13 GMT, Roger Riggs wrote: > Create an internal Version record to hold and compare versions of the form > (major, minor, micro). > Add `OperatingSystem.version()` to return the version of the running OS. > Replace uses of os.version in java.base. >

Re: RFR: 8306678: Replace use of os.version with an internal Version record [v5]

2023-05-01 Thread Roger Riggs
ding, jdk.jlink, > jdk.jpackage, and java.desktop. Roger Riggs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 28 commits: - Merge branch 'master' into 8306678-os-version - Merge branch '8304915-arch-enum' into 8306678-os-version

Re: RFR: 8306678: Replace use of os.version with an internal Version record [v4]

2023-05-01 Thread Roger Riggs
ding, jdk.jlink, > jdk.jpackage, and java.desktop. Roger Riggs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 27 commits: - Merge branch '8304915-arch-enum' into 8306678-os-version - Correct comment on isPPC64() and refer to isLitt

Integrated: 8304915: Create jdk.internal.util.Architecture enum and apply

2023-05-01 Thread Roger Riggs
On Wed, 5 Apr 2023 15:58:08 GMT, Roger Riggs wrote: > Define an internal jdk.internal.util.Architecture enumeration and static > methods to replace uses of the system property `os.arch`. > The enumeration values are defined to match those used in the build. > The initial values ar

Re: RFR: 8296935: Arrays.asList() can return a List that throws undocumented ArrayStoreException

2023-04-28 Thread Roger Riggs
On Thu, 27 Apr 2023 18:36:53 GMT, Stuart Marks wrote: > … Marked as reviewed by rriggs (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/13698#pullrequestreview-1406036844

Re: RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions [v3]

2023-04-27 Thread Roger Riggs
On Wed, 26 Apr 2023 11:55:23 GMT, Volker Simonis wrote: >> This issue was reported by: Yakov Shafranovich >> ([yako...@amazon.com](mailto:yako...@amazon.com)) >> >> Currently, `ObjectInputStream::readObject()` doesn't explicitly checks for a >> negative array length in the deserialization

Integrated: 8298993: (process) java/lang/ProcessBuilder/UnblockSignals.java fails

2023-04-27 Thread Roger Riggs
On Tue, 25 Apr 2023 21:43:54 GMT, Roger Riggs wrote: > It appears that -Xcomp causes the relative timing of the commands to be > disturbed enough to prevent the correct operation of the test. The test > should not be run with -Xcomp This pull request has now been integrated.

Re: RFR: 8298993: (process) java/lang/ProcessBuilder/UnblockSignals.java fails [v2]

2023-04-27 Thread Roger Riggs
> It appears that -Xcomp causes the relative timing of the commands to be > disturbed enough to prevent the correct operation of the test. The test > should not be run with -Xcomp Roger Riggs has updated the pull request incrementally with one additional commit since the last

Re: RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions [v3]

2023-04-26 Thread Roger Riggs
On Wed, 26 Apr 2023 11:55:23 GMT, Volker Simonis wrote: >> This issue was reported by: Yakov Shafranovich >> ([yako...@amazon.com](mailto:yako...@amazon.com)) >> >> Currently, `ObjectInputStream::readObject()` doesn't explicitly checks for a >> negative array length in the deserialization

RFR: 8298993: (process) java/lang/ProcessBuilder/UnblockSignals.java fails

2023-04-25 Thread Roger Riggs
It appears that -Xcomp causes the relative timing of the commands to be disturbed enough to prevent the correct operation of the test. The test should not be run with -Xcomp - Commit messages: - 8298993: (process) java/lang/ProcessBuilder/UnblockSignals.java fails Changes:

Re: RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions [v2]

2023-04-25 Thread Roger Riggs
On Mon, 24 Apr 2023 15:58:41 GMT, Aleksey Shipilev wrote: >> Volker Simonis has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Addresed review comments of @turbanoff, @shipilev and @RogerRiggs > >

Re: RFR: 8306678: Replace use of os.version with an internal Version record [v3]

2023-04-25 Thread Roger Riggs
ding, jdk.jlink, > jdk.jpackage, and java.desktop. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Simplify initialization in ClassLoaderHelper and fix VersionTest. - Changes: - all: https://git.openjdk.org/jdk/pull/1

Re: RFR: 8306678: Replace use of os.version with an internal Version record [v2]

2023-04-24 Thread Roger Riggs
ding, jdk.jlink, > jdk.jpackage, and java.desktop. Roger Riggs has updated the pull request incrementally with two additional commits since the last revision: - Revert changes to MacOsX sun.nio.fs.BsdFileStore; the version check is being removed in another PR. - Review comment updates

Re: RFR: 8306678: Replace use of os.version with an internal Version record

2023-04-24 Thread Roger Riggs
On Sat, 22 Apr 2023 09:21:09 GMT, ExE Boss wrote: >> Create an internal Version record to hold and compare versions of the form >> (major, minor, micro). >> Add `OperatingSystem.version()` to return the version of the running OS. >> Replace uses of os.version in java.base. >> Subsequent PRs

Re: RFR: 8306678: Replace use of os.version with an internal Version record

2023-04-24 Thread Roger Riggs
On Fri, 21 Apr 2023 17:02:23 GMT, Alan Bateman wrote: >> Create an internal Version record to hold and compare versions of the form >> (major, minor, micro). >> Add `OperatingSystem.version()` to return the version of the running OS. >> Replace uses of os.version in java.base. >> Subsequent PRs

Re: RFR: 8306729: Add nominal descriptors of modules and packages to Constants API [v2]

2023-04-24 Thread Roger Riggs
On Mon, 24 Apr 2023 13:18:09 GMT, Adam Sotona wrote: >> Constants API already provides models for all loadable constants to help >> programs manipulating class files and modelling bytecode instructions. >> However no models of module and package constants are provided by Constants >> API.

Re: RFR: 8306678: Replace use of os.version with an internal Version record

2023-04-21 Thread Roger Riggs
On Fri, 21 Apr 2023 20:21:33 GMT, Christian Stein wrote: >> Create an internal Version record to hold and compare versions of the form >> (major, minor, micro). >> Add `OperatingSystem.version()` to return the version of the running OS. >> Replace uses of os.version in java.base. >> Subsequent

Re: RFR: 8306678: Replace use of os.version with an internal Version record

2023-04-21 Thread Roger Riggs
On Fri, 21 Apr 2023 16:44:13 GMT, Roger Riggs wrote: > Create an internal Version record to hold and compare versions of the form > (major, minor, micro). > Add `OperatingSystem.version()` to return the version of the running OS. > Replace uses of os.version in java.base. >

Re: RFR: 8306678: Replace use of os.version with an internal Version record

2023-04-21 Thread Roger Riggs
On Fri, 21 Apr 2023 20:15:50 GMT, Christian Stein wrote: >> Create an internal Version record to hold and compare versions of the form >> (major, minor, micro). >> Add `OperatingSystem.version()` to return the version of the running OS. >> Replace uses of os.version in java.base. >> Subsequent

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v17]

2023-04-21 Thread Roger Riggs
and a few others are included but other modules will be > done in separate PRs. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Correct comment on isPPC64() and refer to isLittleEndian() instead of mentioning PPC64LE -

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:") >>

RFR: 8306678 os version

2023-04-21 Thread Roger Riggs
Create an internal Version record to hold and compare versions of the form (major, minor, micro). Add `OperatingSystem.version()` to return the version of the running OS. Replace uses of os.version in java.base. Subsequent PRs will apply to uses in other modules including, jdk.jlink,

Re: RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions

2023-04-20 Thread Roger Riggs
On Thu, 20 Apr 2023 10:57:07 GMT, Aleksey Shipilev wrote: >> This issue was reported by: Yakov Shafranovich >> ([yako...@amazon.com](mailto:yako...@amazon.com)) >> >> Currently, `ObjectInputStream::readObject()` doesn't explicitly checks for a >> negative array length in the deserialization

Re: RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions

2023-04-20 Thread Roger Riggs
On Wed, 19 Apr 2023 16:47:33 GMT, Volker Simonis wrote: > This issue was reported by: Yakov Shafranovich > ([yako...@amazon.com](mailto:yako...@amazon.com)) > > Currently, `ObjectInputStream::readObject()` doesn't explicitly checks for a > negative array length in the deserialization stream.

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 [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:") >>

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v16]

2023-04-19 Thread Roger Riggs
and a few others are included but other modules will be > done in separate PRs. Roger Riggs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 19 commits: - Use and test of "s390" verified by reviewer. - Merge branch 'mas

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:") >>

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v15]

2023-04-18 Thread Roger Riggs
On Mon, 17 Apr 2023 20:59:06 GMT, Roger Riggs wrote: >> Define an internal jdk.internal.util.Architecture enumeration and static >> methods to replace uses of the system property `os.arch`. >> The enumeration values are defined to match those used in the build. >> The

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v15]

2023-04-17 Thread Roger Riggs
and a few others are included but other modules will be > done in separate PRs. Roger Riggs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 17 commits: - Merge branch 'master' into 8304915-arch-enum - ArchTest on Debian RISC-V 64 confi

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v13]

2023-04-17 Thread Roger Riggs
On Sat, 15 Apr 2023 17:17:13 GMT, Glavo wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed isPPC64(). >> Consolidated switch cases in ArchTest. >> Moved mapping of build T

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v14]

2023-04-17 Thread Roger Riggs
and a few others are included but other modules will be > done in separate PRs. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: ArchTest on Debian RISC-V 64 confirmed by reviewer - Changes: - all: https://git.openjdk

Re: RFR: 8306075: Micro-optimize Enum.hashCode [v6]

2023-04-17 Thread Roger Riggs
On Mon, 17 Apr 2023 16:42:38 GMT, olivergillespie wrote: >> Improve the speed of Enum.hashCode by caching the identity hashcode on first >> use. I've seen an application where Enum.hashCode is a hot path, and this is >> fairly simple speedup. The memory overhead is low; in enums with no extra

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: 8306075: Micro-optimize Enum.hashCode [v4]

2023-04-17 Thread Roger Riggs
On Mon, 17 Apr 2023 15:05:46 GMT, Pavel Rappo wrote: >> The @implNote is more appropriate for an internal comment. It is not needed >> to be in the published javadoc; its only useful to someone viewing the >> source code. > >> The @implNote is more appropriate for an internal comment. It is

Re: RFR: 8306075: Micro-optimize Enum.hashCode [v4]

2023-04-17 Thread Roger Riggs
On Mon, 17 Apr 2023 14:23:01 GMT, Pavel Rappo wrote: >> olivergillespie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix two typos > > src/java.base/share/classes/java/lang/Enum.java line 177: > >> 175: * HotSpot's identity

Re: RFR: 8306075: Micro-optimize Enum.hashCode [v4]

2023-04-17 Thread Roger Riggs
On Mon, 17 Apr 2023 14:15:39 GMT, olivergillespie wrote: >> Improve the speed of Enum.hashCode by caching the identity hashcode on first >> use. I've seen an application where Enum.hashCode is a hot path, and this is >> fairly simple speedup. The memory overhead is low; in enums with no extra

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v13]

2023-04-14 Thread Roger Riggs
On Fri, 14 Apr 2023 17:08:10 GMT, Erik Joelsson wrote: >> make/modules/java.base/gensrc/GensrcMisc.gmk line 72: >> >>> 70: endif >>> 71: >>> 72: $(eval $(call SetupTextFileProcessing, BUILD_PLATFORMPROPERTIES_JAVA, \ >> >> @erikj79 Is there a better/good way to do these mappings, or select

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch

2023-04-14 Thread Roger Riggs
On Fri, 14 Apr 2023 16:36:59 GMT, Jan Lahoda wrote: >> FWIW... an observation from working on >> [JDK-7176515](https://bugs.openjdk.org/browse/JDK-7176515). This is probably >> redundant but here goes anyway. >> >> In the compiler there are currently three different ways of handling enums >>

Re: RFR: 8041676: remove the java.compiler system property [v2]

2023-04-14 Thread Roger Riggs
On Fri, 14 Apr 2023 14:34:39 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which removes the `java.compiler` >> system property? This addresses https://bugs.openjdk.org/browse/JDK-8041676. >> >> A CSR has been filed for this change and is available at >>

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v13]

2023-04-14 Thread Roger Riggs
On Wed, 12 Apr 2023 17:31:49 GMT, Roger Riggs wrote: >> Define an internal jdk.internal.util.Architecture enumeration and static >> methods to replace uses of the system property `os.arch`. >> The enumeration values are defined to match those used in the build. >> The

Re: RFR: 8041676: remove the java.compiler system property [v2]

2023-04-14 Thread Roger Riggs
On Fri, 14 Apr 2023 14:21:56 GMT, Jaikiran Pai wrote: >> src/hotspot/share/runtime/arguments.cpp line 1313: >> >>> 1311: " use -Xint if you want to run the application in >>> interpreted-only mode."); >>> 1312: } else { >>> 1313: warning("The java.compiler system

Re: RFR: 8305762: FileInputStream and FileOutputStream implSpec should be corrected or removed

2023-04-14 Thread Roger Riggs
On Fri, 14 Apr 2023 07:54:39 GMT, Alan Bateman wrote: >> With the removal of the AltFinalizer mechanism from `FileInputStream` and >> `FileOutputStream` in >> [JDK-8192939](https://bugs.openjdk.org/browse/JDK-8192939), this portion of >> the Implementation Requirement in the class JavaDoc is

Re: RFR: 8041676: remove the java.compiler system property

2023-04-14 Thread Roger Riggs
On Fri, 14 Apr 2023 12:19:41 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which removes the `java.compiler` > system property? This addresses https://bugs.openjdk.org/browse/JDK-8041676. > > A CSR has been filed for this change and is available at >

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

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

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

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

Re: Draft: Deprecate toLowerCase()/toUpperCase() and provide locale insensitive alternative

2023-04-13 Thread Roger Riggs
)`/`toUpperCase(Locale.ROOT)` with the new API. This work is not urgent and can be carried out at any time. Glavo On Thu, Apr 13, 2023 at 4:27 AM Roger Riggs wrote: Hi, The status quo takes a balance between trying do the right thing and creating a headache for lots of developers

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

Re: Draft: Deprecate toLowerCase()/toUpperCase() and provide locale insensitive alternative

2023-04-12 Thread Roger Riggs
Hi, The status quo takes a balance between trying do the right thing and creating a headache for lots of developers. Deprecating the existing methods would cause lots of warnings and provide little actual improvement. Except in a few locales, the output would be the same as today. If you're

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v12]

2023-04-12 Thread Roger Riggs
On Wed, 12 Apr 2023 09:07:34 GMT, Martin Doerr wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Correct mapping and test of ppc64 > > Works on PPC64 Big Endian, now. However,

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:") >>

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:") >>

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v13]

2023-04-12 Thread Roger Riggs
and a few others are included but other modules will be > done in separate PRs. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Fixed isPPC64(). Consolidated switch cases in ArchTest. Moved mapping of build TARGET_OS and TARGET_CPU

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v12]

2023-04-11 Thread Roger Riggs
and a few others are included but other modules will be > done in separate PRs. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Correct mapping and test of ppc64 - Changes: - all: https://git.openjdk.org/jd

Re: RFR: 8305486: Add split() variants that keep the delimiters to String and j.u.r.Pattern [v4]

2023-04-11 Thread Roger Riggs
On Tue, 11 Apr 2023 09:14:29 GMT, Raffaello Giulietti wrote: >> Add `split()` overloads to `String` and `java.util.regex.Pattern` that, in >> addition to the substrings returned by current `split()` variants, also >> return the delimiters matching the regular expression. > > Raffaello

Re: RFR: 8305486: Add split() variants that keep the delimiters to String and j.u.r.Pattern [v2]

2023-04-11 Thread Roger Riggs
On Tue, 11 Apr 2023 08:58:36 GMT, Raffaello Giulietti wrote: >> src/java.base/share/classes/java/lang/String.java line 3302: >> >>> 3300: * >>> 3301: * 0 >>> 3302: * {@code { "b", "o", "", "o", ":::and::f", "o", "", "o" >>> }} >> >> These cases might be a bit easier

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v9]

2023-04-11 Thread Roger Riggs
On Tue, 11 Apr 2023 19:33:28 GMT, Roger Riggs wrote: >>> > Would be great if you could support "os.arch = ppc64" for AIX and legacy >>> > linux, too. >>> >>> Changing os.arch is out of scope for this PR. The best way for that would &g

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v9]

2023-04-11 Thread Roger Riggs
On Tue, 11 Apr 2023 18:37:11 GMT, Glavo wrote: >>> Would be great if you could support "os.arch = ppc64" for AIX and legacy >>> linux, too. >> >> Changing os.arch is out of scope for this PR. >> The best way for that would someone supporting ppc to develop and propose a >> PR. > >> > Would be

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v11]

2023-04-11 Thread Roger Riggs
and a few others are included but other modules will be > done in separate PRs. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Add ppc64 as mapping to PPC64 Architecture - Changes: - all: https://git.openjdk.org/jd

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v10]

2023-04-11 Thread Roger Riggs
and a few others are included but other modules will be > done in separate PRs. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Modified test to check Architecture is64bits() and isLittleEndian() against Unsafe respective values.

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v9]

2023-04-11 Thread Roger Riggs
On Tue, 11 Apr 2023 10:39:39 GMT, Martin Doerr wrote: >> This should (probably) be correct: >> Suggestion: >> >> case PPC64 -> !OperatingSystem.isAix() && >> Architecture.isLittleEndian(); > > Looks correct, but makes the test pointless for any linux on PPC64. Will change to

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v9]

2023-04-11 Thread Roger Riggs
On Tue, 11 Apr 2023 11:41:24 GMT, Glavo wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove unused static and import of Stabile > > src/java.base/share/classes/jdk/internal/ut

Re: RFR: 8305808: Typo in javadoc of ConstantDescs::BSM_VARHANDLE_STATIC_FIELD

2023-04-10 Thread Roger Riggs
On Mon, 10 Apr 2023 18:24:08 GMT, Mandy Chung wrote: > `s/ConstantBootstraps.staticVarHandle/ConstantBootstraps.staticFieldVarHandle` LGTM - Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/13411#pullrequestreview-1377951177

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: 8305486: Add split() variants that keep the delimiters to String and j.u.r.Pattern [v2]

2023-04-10 Thread Roger Riggs
On Fri, 7 Apr 2023 14:11:36 GMT, Raffaello Giulietti wrote: >> Add `split()` overloads to `String` and `java.util.regex.Pattern` that, in >> addition to the substrings returned by current `split()` variants, also >> return the delimiters matching the regular expression. > > Raffaello

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v9]

2023-04-08 Thread Roger Riggs
s in `java.base` and a few others are included but other modules will be > done in separate PRs. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Remove unused static and import of Stabile - Changes: - all: https://

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-07 Thread Roger Riggs
On Fri, 7 Apr 2023 12:05:28 GMT, Lutz Schmidt wrote: >> Okay, Lutz is the expert here. Sorry for the noise. > > Just to let my voice be heard directly after being cited several times: s390 > is used to designate the CPU architecture. The arch-specific files are stored > in src/hotspot/cpu/s390

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v8]

2023-04-07 Thread Roger Riggs
On Fri, 7 Apr 2023 21:13:03 GMT, Roger Riggs wrote: >> Define an internal jdk.internal.util.Architecture enumeration and static >> methods to replace uses of the system property `os.arch`. >> The enumeration values are defined to match those used in the build. >> The

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-07 Thread Roger Riggs
On Fri, 7 Apr 2023 06:03:11 GMT, Thomas Stuefe wrote: >>> What did you use as the example that would not compile on the other >>> architecture? >> >>

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v8]

2023-04-07 Thread Roger Riggs
s in `java.base` and a few others are included but other modules will be > done in separate PRs. Roger Riggs has updated the pull request incrementally with three additional commits since the last revision: - Rename OperatingSystemProps to PlatformProps. Refactor OperatingSystem i

Re: RFR: 8303919: Instant.ofEpochMilli says it can throw an exception that it can't

2023-04-07 Thread Roger Riggs
On Thu, 9 Mar 2023 19:49:29 GMT, Eamonn McManus wrote: > Instant.ofEpochMilli says this: > > > @throws DateTimeException if the instant exceeds the maximum or minimum > instant > > > But that can't happen. Even given `Long.MIN_VALUE` or `Long.MAX_VALUE` it > does not throw. That's already

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-07 Thread Roger Riggs
On Thu, 6 Apr 2023 22:44:52 GMT, Phil Race wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove unneeded qualified export from java.base to jdk.attach > > src/jdk.accessibilit

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