Re: RFR: 8273140: Replace usages of Enum.class.getEnumConstants() with Enum.values() where possible [v4]

2021-09-01 Thread Thomas Schatzl
On Tue, 31 Aug 2021 20:04:23 GMT, Сергей Цыпанов wrote: >> Just a very tiny clean-up. >> >> There are some places in JDK code base where we call >> `Enum.class.getEnumConstants()` to get all the values of the referenced >> `enum`. This is excessive, less-readable and slower than just calling

Re: RFR: 8273111: Default timezone should return zone ID if /etc/localtime is valid but not canonicalization on linux

2021-09-01 Thread Alan Bateman
On Wed, 1 Sep 2021 06:45:26 GMT, Wu Yan wrote: > Hi, > Please help me review the change to enhance getting time zone ID from > /etc/localtime on linux. > > We use `realpath` instead of `readlink` to obtain the link name of > /etc/localtime, because `readlink` can only read the value of a symb

Re: RFR: 6957241: ClassLoader.getResources() returns only 1 instance when using jar indexing

2021-09-01 Thread Alan Bateman
On Tue, 31 Aug 2021 12:11:46 GMT, wxiang wrote: > Using jarIndex for Hibench, there is an unexpected behavior with the > exception "Exception in thread "main" > org.apache.hadoop.fs.UnsupportedFileSystemException: No FileSystem for scheme > "hdfs"". > > After investigating it, it is related

Re: RFR: 8273111: Default timezone should return zone ID if /etc/localtime is valid but not canonicalization on linux

2021-09-01 Thread Florian Weimer
On Wed, 1 Sep 2021 06:45:26 GMT, Wu Yan wrote: > Hi, > Please help me review the change to enhance getting time zone ID from > /etc/localtime on linux. > > We use `realpath` instead of `readlink` to obtain the link name of > /etc/localtime, because `readlink` can only read the value of a symb

Re: RFR: 6957241: ClassLoader.getResources() returns only 1 instance when using jar indexing

2021-09-01 Thread Daniel Fuchs
On Tue, 31 Aug 2021 12:11:46 GMT, wxiang wrote: > Using jarIndex for Hibench, there is an unexpected behavior with the > exception "Exception in thread "main" > org.apache.hadoop.fs.UnsupportedFileSystemException: No FileSystem for scheme > "hdfs"". > > After investigating it, it is related

Re: RFR: 8273111: Default timezone should return zone ID if /etc/localtime is valid but not canonicalization on linux

2021-09-01 Thread Naoto Sato
On Wed, 1 Sep 2021 06:45:26 GMT, Wu Yan wrote: > Hi, > Please help me review the change to enhance getting time zone ID from > /etc/localtime on linux. > > We use `realpath` instead of `readlink` to obtain the link name of > /etc/localtime, because `readlink` can only read the value of a symb

Re: RFR: 8272600: (test) Use native "sleep" in Basic.java [v3]

2021-09-01 Thread Roger Riggs
On Tue, 31 Aug 2021 01:26:17 GMT, David Holmes wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revised to use native /bin/sleep program on Unix* (non-Windows). >> For Windows, a native "BasicSleep" program is used

Re: RFR: 8272600: (test) Use native "sleep" in Basic.java [v3]

2021-09-01 Thread Roger Riggs
On Tue, 31 Aug 2021 01:12:40 GMT, David Holmes wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revised to use native /bin/sleep program on Unix* (non-Windows). >> For Windows, a native "BasicSleep" program is used

Re: RFR: 8272600: (test) Use native "sleep" in Basic.java [v3]

2021-09-01 Thread Roger Riggs
On Sat, 28 Aug 2021 02:34:48 GMT, Roger Riggs wrote: >> The intermittent test in java/lang/ProcessBuilder/Basic.java has identified >> unexpected messages from a child Java VM >> as the cause of the test failure. Attempts to control the output of the >> child VM have failed, the VM is unrepent

Re: RFR: 8273000: Remove WeakReference-based class initialisation barrier implementation [v2]

2021-09-01 Thread Vladimir Ivanov
On Tue, 31 Aug 2021 16:36:58 GMT, Mandy Chung wrote: > May i suggest that we add some JavaDoc to ensureClassInitialized Thanks, Paul. How does the latest version look? - PR: https://git.openjdk.java.net/jdk/pull/5258

Re: RFR: 8273000: Remove WeakReference-based class initialisation barrier implementation [v2]

2021-09-01 Thread Vladimir Ivanov
> Get rid of WeakReference-based logic in > DirectMethodHandle::checkInitialized() and reimplement it with > `Unsafe::ensureClassInitialized()`/`shouldBeInitialized()`. > > The key observation is that `Unsafe::ensureClassInitialized()` does not block > the initializing thread. > > Also, remo

Re: RFR: 8273000: Remove WeakReference-based class initialisation barrier implementation [v2]

2021-09-01 Thread Vladimir Ivanov
On Thu, 26 Aug 2021 23:49:07 GMT, David Holmes wrote: >> Vladimir Ivanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Improve comments > > src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java line 385: > >> 383:

Re: RFR: 8078641: MethodHandle.asTypeCache can retain classes from unloading [v2]

2021-09-01 Thread Vladimir Ivanov
> `MethodHandle.asTypeCache` keeps a strong reference to adapted `MethodHandle` > and it can introduce a class loader leak through its `MethodType`. > > Proposed fix introduces a 2-level cache (1 element each) where 1st level can > only contain `MethodHandle`s which are guaranteed to not introdu

Re: RFR: 8078641: MethodHandle.asTypeCache can retain classes from unloading

2021-09-01 Thread Vladimir Ivanov
On Wed, 25 Aug 2021 09:31:51 GMT, Vladimir Ivanov wrote: > `MethodHandle.asTypeCache` keeps a strong reference to adapted `MethodHandle` > and it can introduce a class loader leak through its `MethodType`. > > Proposed fix introduces a 2-level cache (1 element each) where 1st level can > only

RFR: 8273242: (test) Refactor to use TestNG for RuntimeTests ExecCommand tests

2021-09-01 Thread Roger Riggs
The ExecCommand test of Runtime.exec is difficult to maintain; the parallel arrays are hard to keep in sync. This cleanup converts to use TestNG DataProviders and other improvements. - Commit messages: - 8273242: Refactored ExecCommand to use TestNG DataProvider for cases Changes:

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-09-01 Thread CC007
On Mon, 9 Aug 2021 12:28:23 GMT, CC007 wrote: > create Streamable and ParallelStreamable interface and use them in Collection > and Optional > _Mailing list message from [Alan Snyder](mailto:javali...@cbfiddle.com) on > [core-libs-dev](mailto:core-libs-...@mail.openjdk.java.net):_ > > Ah, if

Re: RFR: 8078641: MethodHandle.asTypeCache can retain classes from unloading [v2]

2021-09-01 Thread Mandy Chung
On Wed, 1 Sep 2021 16:23:46 GMT, Vladimir Ivanov wrote: >> `MethodHandle.asTypeCache` keeps a strong reference to adapted >> `MethodHandle` and it can introduce a class loader leak through its >> `MethodType`. >> >> Proposed fix introduces a 2-level cache (1 element each) where 1st level can

RFR: 8273248: ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs

2021-09-01 Thread Daniel D . Daugherty
A trivial fix to ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs. - Commit messages: - 8273248: ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs Changes: https://git.openjdk.java.net/jdk/pull/5337/files Webrev:

Re: RFR: 8273248: ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs

2021-09-01 Thread Naoto Sato
On Wed, 1 Sep 2021 17:33:13 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList > java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs. Marked as reviewed by naoto (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/5337

Re: Integrated: 8273197: ProblemList 2 jtools tests due to JDK-8273187

2021-09-01 Thread Daniel D . Daugherty
On Tue, 31 Aug 2021 20:02:37 GMT, Naoto Sato wrote: >> Trivial fixes to reduce the noise in the JDK18 CI: >> JDK-8273197 ProblemList 2 jtools tests due to JDK-8273187 >> JDK-8273198 ProblemList >> java/lang/instrument/BootClassPath/BootClassPathTest.sh due to JDK-8273188 >> >> These failures ha

Integrated: 8273248: ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs

2021-09-01 Thread Daniel D . Daugherty
On Wed, 1 Sep 2021 17:33:13 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList > java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs. This pull request has now been integrated. Changeset: 4ee0dace Author:Daniel D. Daugherty URL: https://git.openjdk.ja

Re: RFR: 8273248: ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs

2021-09-01 Thread Daniel D . Daugherty
On Wed, 1 Sep 2021 17:35:12 GMT, Naoto Sato wrote: >> A trivial fix to ProblemList >> java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs. > > Marked as reviewed by naoto (Reviewer). @naotoj - Thanks for the review! - PR: https://git.openjdk.java.net/jdk/pull/53

Withdrawn: 8271602: Add Math.ceilDiv() family parallel to Math.floorDiv() family

2021-09-01 Thread Raffaello Giulietti
On Fri, 27 Aug 2021 18:53:23 GMT, Raffaello Giulietti wrote: > Please review this PR to add officially endorsed `ceilDiv()` and `ceilMod()` > methods do `j.l.[Strict]Math`. > > Beside adding fresh tests to `test/jdk/java/lang/Math/DivModTests.java`, this > PR also corrects small typos in it a

Re: RFR: 8273000: Remove WeakReference-based class initialisation barrier implementation [v2]

2021-09-01 Thread Paul Sandoz
On Wed, 1 Sep 2021 16:16:38 GMT, Vladimir Ivanov wrote: >> Get rid of WeakReference-based logic in >> DirectMethodHandle::checkInitialized() and reimplement it with >> `Unsafe::ensureClassInitialized()`/`shouldBeInitialized()`. >> >> The key observation is that `Unsafe::ensureClassInitialized

RFR: 8273250: Address javadoc issues in Deflater::setDictionationary

2021-09-01 Thread Lance Andersen
Hi, Please review this trivial fix to the javadoc which addresses an issue shown via Intellij where the error: "Symbol 'getAdler' is inaccessible from here" is generated for the "@See Inflater#getAlder" references. Best Lance - Commit messages: - Address JDK-8273250 Changes: htt

Re: RFR: 8214761: Bug in parallel Kahan summation implementation [v4]

2021-09-01 Thread Ian Graves
> 8214761: Bug in parallel Kahan summation implementation Ian Graves has updated the pull request incrementally with one additional commit since the last revision: Fixing compensation test - Changes: - all: https://git.openjdk.java.net/jdk/pull/4674/files - new: https://git.o

Re: RFR: 8273250: Address javadoc issues in Deflater::setDictionationary

2021-09-01 Thread Roger Riggs
On Wed, 1 Sep 2021 19:26:17 GMT, Lance Andersen wrote: > Hi, > > Please review this trivial fix to the javadoc which addresses an issue shown > via Intellij where the error: "Symbol 'getAdler' is inaccessible from here" > is generated for the "@See Inflater#getAlder" references. > > Best > La

Re: RFR: 8273250: Address javadoc issues in Deflater::setDictionationary

2021-09-01 Thread Naoto Sato
On Wed, 1 Sep 2021 19:26:17 GMT, Lance Andersen wrote: > Hi, > > Please review this trivial fix to the javadoc which addresses an issue shown > via Intellij where the error: "Symbol 'getAdler' is inaccessible from here" > is generated for the "@See Inflater#getAlder" references. > > Best > La

Re: RFR: 8273250: Address javadoc issues in Deflater::setDictionationary

2021-09-01 Thread Iris Clark
On Wed, 1 Sep 2021 19:26:17 GMT, Lance Andersen wrote: > Hi, > > Please review this trivial fix to the javadoc which addresses an issue shown > via Intellij where the error: "Symbol 'getAdler' is inaccessible from here" > is generated for the "@See Inflater#getAlder" references. > > Best > La

RFR: 8271602: Add Math.ceilDiv() family parallel to Math.floorDiv() family

2021-09-01 Thread Raffaello Giulietti
This PR ideally continues #5285, which has been closed as a consequence of inadvertently removing the branch on my repo. See there for initial discussion. Sorry for the mess. - Commit messages: - 8271602: Add Math.ceilDiv() family parallel to Math.floorDiv() family Changes: https:

RFR: JDK-8273194: Document the two possible cases when Lookup::ensureInitialized returns

2021-09-01 Thread Mandy Chung
Improve the specification to document the cases when `Lookup::ensureInitialized` returns as specified JVMS 5.5 and matches the implementation. Please also review CSR: https://bugs.openjdk.java.net/browse/JDK-8273253 - Commit messages: - JDK-8273194: Document the two possible cases

Re: RFR: 8273250: Address javadoc issues in Deflater::setDictionationary

2021-09-01 Thread Brian Burkhalter
On Wed, 1 Sep 2021 19:26:17 GMT, Lance Andersen wrote: > Hi, > > Please review this trivial fix to the javadoc which addresses an issue shown > via Intellij where the error: "Symbol 'getAdler' is inaccessible from here" > is generated for the "@See Inflater#getAlder" references. > > Best > La

Re: RFR: 8272600: (test) Use native "sleep" in Basic.java [v3]

2021-09-01 Thread David Holmes
On Wed, 1 Sep 2021 15:02:44 GMT, Roger Riggs wrote: >> test/jdk/java/lang/ProcessBuilder/Basic.java line 2665: >> >>> 2663: >>> 2664: Path exePath = >>> Path.of(TEST_NATIVEPATH).resolve("BasicSleep.exe"); >>> 2665: System.out.println("exePath: " + exePath + ", canExec:

Re: RFR: 8272600: (test) Use native "sleep" in Basic.java [v3]

2021-09-01 Thread David Holmes
On Wed, 1 Sep 2021 15:12:16 GMT, Roger Riggs wrote: > I've had very inconsistent results using the Windows 'timeout' command. > There appear to multiple versions. Some give an error message "Type "TIMEOUT > /?" for usage.", (Windows 10) > others a error message "Try 'timeout --help' for more inf

Re: RFR: 8272600: (test) Use native "sleep" in Basic.java [v3]

2021-09-01 Thread David Holmes
On Sat, 28 Aug 2021 02:34:48 GMT, Roger Riggs wrote: >> The intermittent test in java/lang/ProcessBuilder/Basic.java has identified >> unexpected messages from a child Java VM >> as the cause of the test failure. Attempts to control the output of the >> child VM have failed, the VM is unrepent

Re: RFR: 8273000: Remove WeakReference-based class initialisation barrier implementation [v2]

2021-09-01 Thread David Holmes
On Wed, 1 Sep 2021 18:28:30 GMT, Paul Sandoz wrote: >> Vladimir Ivanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Improve comments > > src/java.base/share/classes/jdk/internal/misc/Unsafe.java line 1152: > >> 1150: * The call

RFR: JDK-8273229: Update OS detection code to recognize Windows Server 2022

2021-09-01 Thread Matthias Baesken
Hello, please review this small change. The OS detection code of the JDK/JVM should recognize the new Windows server 2022 : https://docs.microsoft.com/en-us/lifecycle/products/windows-server-2022 https://docs.microsoft.com/en-us/windows-server/get-started/windows-server-release-info The build nu