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

2022-07-06 Thread Weijun Wang
On Wed, 6 Jul 2022 05:32:29 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list >> of disabled warnings

Re: [jdk19] RFR: 8289601: SegmentAllocator::allocateUtf8String(String str) should be clarified for strings containing \0 [v2]

2022-07-06 Thread Paul Sandoz
On Wed, 6 Jul 2022 11:09:33 GMT, Jorn Vernee wrote: >> This PR updates the spec and implementation to throw an >> `IllegalArgumentException` when an attempt is made to convert a Java string >> containing null characters to a C string. >> >> Testing: local run of the `jdk_foreign` test suite. >

Integrated: 8288706: Unused parameter 'boolean newln' in method java.lang.VersionProps#print(boolean, boolean)

2022-07-06 Thread Lance Andersen
On Tue, 5 Jul 2022 18:38:57 GMT, Lance Andersen wrote: > Hi all, > > This PR cleans up `VersionProps::print` removing the unused parameter `newln`. > > Mach5 tiers1-3 are currently running. > > Best, > Lance This pull request has now been integrated. Changeset: 9f37ba44 Author:Lance Ande

Re: RFR: 8288984: Simplification in java.lang.Runtime::exit [v5]

2022-07-06 Thread David Holmes
On Tue, 5 Jul 2022 18:43:26 GMT, Ryan Ernst wrote: >> This is a followup to simplify Shutdown.exit after the removal of >> finalizers (https://bugs.openjdk.org/browse/JDK-8198250). Once agreement >> on the approach has been reached in this PR, a CSR will be filed to >> propose the spec change to

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v14]

2022-07-06 Thread Сергей Цыпанов
On Thu, 30 Jun 2022 16:41:36 GMT, iaroslavski wrote: >> Sorting: >> >> - adopt radix sort for sequential and parallel sorts on >> int/long/float/double arrays (almost random and length > 6K) >> - fix tryMergeRuns() to better handle case when the last run is a single >> element >> - minor javad

Re: RFR: JDK-8289730 : Deprecated code sample in java.lang.ClassCastException

2022-07-06 Thread ScientificWare
On Mon, 4 Jul 2022 06:57:12 GMT, ScientificWare wrote: > - Correct a deprecated code. > - Update Copyright. > - More wide question : How are you dealing with deprecated codes in snippets ? > ``` > @deprecated(since="9") > public Integer​(int value) > ``` @turbanoff Thanks.

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v14]

2022-07-06 Thread iaroslavski
On Thu, 30 Jun 2022 16:41:36 GMT, iaroslavski wrote: >> Sorting: >> >> - adopt radix sort for sequential and parallel sorts on >> int/long/float/double arrays (almost random and length > 6K) >> - fix tryMergeRuns() to better handle case when the last run is a single >> element >> - minor javad

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

2022-07-06 Thread Daniel Fuchs
On Wed, 6 Jul 2022 05:32:29 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list >> of disabled warnings

Re: RFR: 8289711: Add container configuration data to mbeans [v2]

2022-07-06 Thread Alan Bateman
On Wed, 6 Jul 2022 03:52:30 GMT, xpbob wrote: >> Container configuration information is useful for troubleshooting >> problems,Exposing information in MBeans is ideal for monitoring, jConsole, >> and other scenarios. >> Results the following >> ![图片](https://user-images.githubusercontent.com/78

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v14]

2022-07-06 Thread iaroslavski
On Thu, 30 Jun 2022 16:41:36 GMT, iaroslavski wrote: >> Sorting: >> >> - adopt radix sort for sequential and parallel sorts on >> int/long/float/double arrays (almost random and length > 6K) >> - fix tryMergeRuns() to better handle case when the last run is a single >> element >> - minor javad

Re: RFR: 8289711: Add container configuration data to mbeans [v2]

2022-07-06 Thread xpbob
> Container configuration information is useful for troubleshooting > problems,Exposing information in MBeans is ideal for monitoring, jConsole, > and other scenarios. > Results the following > ![图片](https://user-images.githubusercontent.com/7837910/177248834-50beefe9-4db6-470c-8f15-df5a93892804.

Re: [jdk19] RFR: 8289601: SegmentAllocator::allocateUtf8String(String str) should be clarified for strings containing \0

2022-07-06 Thread Maurizio Cimadamore
On Mon, 4 Jul 2022 13:01:34 GMT, Jorn Vernee wrote: > This PR updates the spec and implementation to throw an > `IllegalArgumentException` when an attempt is made to convert a Java string > containing null characters to a C string. > > Testing: local run of the `jdk_foreign` test suite. After

Re: RFR: 8288984: Simplification in Shutdown.exit [v3]

2022-07-06 Thread David Holmes
On Tue, 5 Jul 2022 04:47:40 GMT, Ryan Ernst wrote: >> First, the signal handlers actually invoke Shutdown.exit, not >> Shutdown.shutdown - see Terminator.setup(). (If they did the latter, like >> DestroyJavaVM, then an exit(status) call from another thread could still do >> the final VM halt(

RFR: Merge jdk19

2022-07-06 Thread Jesper Wilhelmsson
Forwardport JDK 19 -> JDK 20 - Commit messages: - Merge - 8289477: Memory corruption with CPU_ALLOC, CPU_FREE on muslc - 8289439: Clarify relationship between ThreadStart/ThreadEnd and can_support_virtual_threads capability - 8288128: S390X: Fix crashes after JDK-8284161 (Virtual

Re: RFR: 8289711: Add container configuration data to mbeans

2022-07-06 Thread xpbob
On Tue, 5 Jul 2022 04:21:55 GMT, xpbob wrote: > Container configuration information is useful for troubleshooting > problems,Exposing information in MBeans is ideal for monitoring, jConsole, > and other scenarios. > Results the following > ![图片](https://user-images.githubusercontent.com/7837910

Integrated: JDK-8289730 : Deprecated code sample in java.lang.ClassCastException

2022-07-06 Thread ScientificWare
On Mon, 4 Jul 2022 06:57:12 GMT, ScientificWare wrote: > - Correct a deprecated code. > - Update Copyright. > - More wide question : How are you dealing with deprecated codes in snippets ? > ``` > @deprecated(since="9") > public Integer​(int value) > ``` This pull request has now been i

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

2022-07-06 Thread Attila Szegedi
On Tue, 5 Jul 2022 15:26:06 GMT, Roger Riggs wrote: >> Well, if you _really_ want to noodle this for performance, you can also >> store a `this`-bound lambda in a `private final` instance field, so then >> it's only created once too. I wouldn't put it past `javac` to do this, but >> I'd have

Re: RFR: JDK-8289775: Update java.lang.invoke.MethodHandle[s] to use snippets

2022-07-06 Thread liach
On Tue, 5 Jul 2022 22:22:46 GMT, Joe Darcy wrote: > Update existing examples in java.lang.invoke.{MethodHandle, MethodHandles} > to use snippets rather than the older markup idiom. In addition, I believe we can add link in many examples, but I am not sure if this is part of this issue or if i

Re: RFR: 8288984: Simplification in java.lang.Runtime::exit [v2]

2022-07-06 Thread Kim Barrett
On Mon, 4 Jul 2022 12:19:27 GMT, David Holmes wrote: > > Let's say we've run shutdown so run all the hooks but not halted. Then > > someone calls exit(0). That seems to suggest the call will block > > indefinitely, which is neither desirable nor what was actually implemented. > > If the hook t

Integrated: 8287596: Reorg jdk.test.lib.util.ForceGC

2022-07-06 Thread Xue-Lei Andrew Fan
On Wed, 1 Jun 2022 19:08:03 GMT, Xue-Lei Andrew Fan wrote: > This is a follow up update per comments in [JDK-8287384 > PR](https://github.com/openjdk/jdk/pull/8907). The tier1 and tier2 test in > open part looks good to me. Please help to run Mach5 just case the closed > test cases are impac

Re: RFR: 8288706: Unused parameter 'boolean newln' in method java.lang.VersionProps#print(boolean, boolean)

2022-07-06 Thread Alan Bateman
On Tue, 5 Jul 2022 18:38:57 GMT, Lance Andersen wrote: > Hi all, > > This PR cleans up `VersionProps::print` removing the unused parameter `newln`. > > Mach5 tiers1-3 are currently running. > > Best, > Lance Marked as reviewed by alanb (Reviewer). - PR: https://git.openjdk.org/j

[jdk19] RFR: 8289779: Map::replaceAll javadoc has redundant @throws clauses

2022-07-06 Thread Stuart Marks
Simple javadoc fix of an editorial nature. - Commit messages: - 8289779: Map::replaceAll javadoc has redundant @throws clauses Changes: https://git.openjdk.org/jdk19/pull/111/files Webrev: https://webrevs.openjdk.org/?repo=jdk19&pr=111&range=00 Issue: https://bugs.openjdk.org/bro

RFR: JDK-8289775: Update java.lang.invoke.MethodHandle[s] to use snippets

2022-07-06 Thread Joe Darcy
Update existing examples in java.lang.invoke.{MethodHandle, MethodHandles} to use snippets rather than the older markup idiom. - Commit messages: - JDK-8289775: Update java.lang.invoke.MethodHandle[s] to use snippets Changes: https://git.openjdk.org/jdk/pull/9385/files Webrev: ht

Re: [jdk19] RFR: 8289601: SegmentAllocator::allocateUtf8String(String str) should be clarified for strings containing \0 [v2]

2022-07-06 Thread Jorn Vernee
> This PR updates the spec and implementation to throw an > `IllegalArgumentException` when an attempt is made to convert a Java string > containing null characters to a C string. > > Testing: local run of the `jdk_foreign` test suite. Jorn Vernee has updated the pull request incrementally with

Re: [jdk19] RFR: 8289601: SegmentAllocator::allocateUtf8String(String str) should be clarified for strings containing \0

2022-07-06 Thread Jim Laskey
On Mon, 4 Jul 2022 13:01:34 GMT, Jorn Vernee wrote: > This PR updates the spec and implementation to throw an > `IllegalArgumentException` when an attempt is made to convert a Java string > containing null characters to a C string. > > Testing: local run of the `jdk_foreign` test suite. Is UT

Re: RFR: 8288838: jpackage: file association additional arguments [v4]

2022-07-06 Thread Alex Kasko
On Mon, 4 Jul 2022 23:38:08 GMT, Alex Kasko wrote: >> jpackage implementation of file association on Windows currently passes a >> selected filename as an only argument to associated executable. >> >> It is proposed to introduce additional option in file association property >> file to allow o

Re: RFR: 8288706: Unused parameter 'boolean newln' in method java.lang.VersionProps#print(boolean, boolean)

2022-07-06 Thread Iris Clark
On Tue, 5 Jul 2022 18:38:57 GMT, Lance Andersen wrote: > Hi all, > > This PR cleans up `VersionProps::print` removing the unused parameter `newln`. > > Mach5 tiers1-3 are currently running. > > Best, > Lance Marked as reviewed by iris (Reviewer). - PR: https://git.openjdk.org/jd

Re: RFR: 8288984: Simplification in java.lang.Runtime::exit [v4]

2022-07-06 Thread Chris Hegarty
On Tue, 5 Jul 2022 13:30:40 GMT, Ryan Ernst wrote: >> This is a followup to simplify Shutdown.exit after the removal of >> finalizers (https://bugs.openjdk.org/browse/JDK-8198250). Once agreement >> on the approach has been reached in this PR, a CSR will be filed to >> propose the spec change to

RFR: 8289711: Add container configuration data to mbeans

2022-07-06 Thread xpbob
Container configuration information is useful for troubleshooting problems,Exposing information in MBeans is ideal for monitoring, jConsole, and other scenarios. Results the following ![图片](https://user-images.githubusercontent.com/7837910/177248834-50beefe9-4db6-470c-8f15-df5a93892804.png)

Re: RFR: 8283335 : Add exists and readAttributesIfExists methods to FileSystemProvider [v6]

2022-07-06 Thread Lance Andersen
On Mon, 4 Jul 2022 19:30:50 GMT, Alan Bateman wrote: > The updated TestDelegation test is looking a bit better now but I think it > would be simplified a lot more by getting rid of the data providers, just > aren't needed in this test. Unless you feel this is a must, I would prefer to keep the

Re: [jdk19] RFR: 8289148: j.l.foreign.VaList::nextVarg call could throw IndexOutOfBoundsException or even crash the VM

2022-07-06 Thread Maurizio Cimadamore
On Wed, 29 Jun 2022 13:40:01 GMT, Jorn Vernee wrote: > This patch changes all VaList implementations to throw > `NoSuchElementException` when out of bounds reads occur on a VaList that is > created using the Java builder API. The docs are updated accordingly. > > For VaLists that are created f

Re: [jdk19] RFR: 8289148: j.l.foreign.VaList::nextVarg call could throw IndexOutOfBoundsException or even crash the VM

2022-07-06 Thread Jorn Vernee
On Tue, 5 Jul 2022 11:13:15 GMT, Maurizio Cimadamore wrote: >> This patch changes all VaList implementations to throw >> `NoSuchElementException` when out of bounds reads occur on a VaList that is >> created using the Java builder API. The docs are updated accordingly. >> >> For VaLists that

Re: [jdk19] RFR: 8289148: j.l.foreign.VaList::nextVarg call could throw IndexOutOfBoundsException or even crash the VM

2022-07-06 Thread Jorn Vernee
On Tue, 5 Jul 2022 11:03:30 GMT, Maurizio Cimadamore wrote: >> This patch changes all VaList implementations to throw >> `NoSuchElementException` when out of bounds reads occur on a VaList that is >> created using the Java builder API. The docs are updated accordingly. >> >> For VaLists that

Re: RFR: JDK-8289741 : Remove unused imports from DTDBuilder.java

2022-07-06 Thread Julian Waters
On Mon, 4 Jul 2022 07:04:40 GMT, ScientificWare wrote: > This is tracked in JBS as > > [JDK-8289741](https://bugs.openjdk.org/browse/JDK-8289741) > >> **Remove unused imports from DTDBuilder.java** > Some imports are no more used. > > - java.io.FileNotFoundException; > - java.io.BufferedInputS

Re: RFR: 8288984: Simplification in Shutdown.exit [v2]

2022-07-06 Thread Ryan Ernst
On Mon, 4 Jul 2022 16:47:28 GMT, Chris Hegarty wrote: >> I think the wording in the latest commit (9d972b) is problematic. One reason >> is that you've changed it to "will run shutdown hooks" but it doesn't run >> the hooks, it starts them, and so conflicts with the previous paragraph. I >> al

Re: RFR: 8288984: Simplification in Shutdown.exit [v2]

2022-07-06 Thread Chris Hegarty
On Tue, 5 Jul 2022 07:23:49 GMT, David Holmes wrote: >> I like the new suggested wording, but I would slightly tweak it. As Alan >> mentioned in another comment the first paragraph makes clear the method >> never returns normally. How does the following sound? >> >>> If this method is invoked

Re: RFR: 8288984: Simplification in java.lang.Runtime::exit [v4]

2022-07-06 Thread Ryan Ernst
> This is a followup to simplify Shutdown.exit after the removal of > finalizers (https://bugs.openjdk.org/browse/JDK-8198250). Once agreement > on the approach has been reached in this PR, a CSR will be filed to > propose the spec change to Runtime.exit. Ryan Ernst has updated the pull request in

RFR: JDK-8289741 : Remove unused imports from DTDBuilder.java

2022-07-06 Thread ScientificWare
This is tracked in JBS as [JDK-8289741](https://bugs.openjdk.org/browse/JDK-8289741) > **Remove unused imports from DTDBuilder.java** Some imports are no more used. - java.io.FileNotFoundException; - java.io.BufferedInputStream; - java.io.OutputStream; - java.util.BitSet; - java.util.StringToken

Re: RFR: 8288984: Simplification in Shutdown.exit [v3]

2022-07-06 Thread David Holmes
On Tue, 5 Jul 2022 03:24:28 GMT, Ryan Ernst wrote: >> src/java.base/share/classes/java/lang/Runtime.java line 88: >> >>> 86: * Shutdown is serialized such that only one invocation will run >>> 87: * shutdown hooks and terminate the VM with the given status code. >>> That >>> 88:

Re: RFR: 8283335 : Add exists and readAttributesIfExists methods to FileSystemProvider [v6]

2022-07-06 Thread Alan Bateman
On Tue, 5 Jul 2022 09:54:15 GMT, Lance Andersen wrote: > Unless you feel this is a must, I would prefer to keep the DataProviders. The > benefit I see is the test code does not need to be duplicated per parameter, > each test scenario can be run as an individual test so that you do not need >