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

2022-07-05 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

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

2022-07-05 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: 8288984: Simplification in java.lang.Runtime::exit [v2]

2022-07-05 Thread Ryan Ernst
On Mon, 4 Jul 2022 12:19:27 GMT, David Holmes wrote: >> Ryan Ernst has updated the pull request incrementally with one additional >> commit since the last revision: >> >> better clarify multiple threads behavior > >> Let's say we've run shutdown so run all the hooks but not halted. Then >>

RFR: 8289768: Clean up unused code

2022-07-05 Thread Daniel Jeliński
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 for

RFR: JDK-8289730 : Deprecated code in src/java.base/share/classes/java/lang/ClassCastException.java

2022-07-05 Thread ScientificWare
- 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) ``` - Commit messages: - Merge branch 'openjdk:master' into patch-2 - Merge branch

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

2022-07-05 Thread Alan Bateman
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: 8288984: Simplification in Shutdown.exit [v3]

2022-07-05 Thread David Holmes
On Mon, 4 Jul 2022 16:17:27 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: 8288723: Avoid redundant ConcurrentHashMap.get call in java.time [v2]

2022-07-05 Thread Andrey Turbanov
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-8289741 : Remove unused imports from DTDBuilder.java

2022-07-05 Thread Julian Waters
On Tue, 5 Jul 2022 03:40:51 GMT, Julian Waters 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; >> -

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

2022-07-05 Thread ScientificWare
On Tue, 5 Jul 2022 01:53:33 GMT, Julian Waters 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; >> -

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

2022-07-05 Thread Alan Bateman
On Tue, 5 Jul 2022 19:17:27 GMT, Lance Andersen wrote: >> Hi, >> >> Please review the following patch which will: >> >> - Enhance the java.nio.file.spi.FileSystemProvider abstract class to include >> the methods >> >> - public boolean exists(Path path, LinkOption... options) >> - public

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

2022-07-05 Thread Lance Andersen
> Hi, > > Please review the following patch which will: > > - Enhance the java.nio.file.spi.FileSystemProvider abstract class to include > the methods > > - public boolean exists(Path path, LinkOption... options) > - public A readAttributesIfExists(Path > path, Class type, LinkOption...

Re: RFR: JDK-8289730 : Deprecated code in src/java.base/share/classes/java/lang/ClassCastException.java

2022-07-05 Thread Joe Darcy
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) > ``` Looks fine. There is as of yet

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

2022-07-05 Thread Lance Andersen
Hi all, This PR cleans up `VersionProps::print` removing the unused parameter `newln`. Mach5 tiers1-3 are currently running. Best, Lance - Commit messages: - Address unused parameter in VersionProps::print Changes: https://git.openjdk.org/jdk/pull/9382/files Webrev:

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

2022-07-05 Thread ScientificWare
On Tue, 5 Jul 2022 17:27:03 GMT, Joe Darcy 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) >> ``` > > Looks fine. > > There

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

2022-07-05 Thread Paul Sandoz
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. It's

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

2022-07-05 Thread Lance Andersen
On Tue, 5 Jul 2022 10:56:45 GMT, Alan Bateman 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

Re: RFR: JDK-8289730 : Deprecated code in src/java.base/share/classes/java/lang/ClassCastException.java

2022-07-05 Thread ScientificWare
On Tue, 5 Jul 2022 17:27:03 GMT, Joe Darcy 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) >> ``` > > Looks fine. > > There

Integrated: 8283335 : Add exists and readAttributesIfExists methods to FileSystemProvider

2022-07-05 Thread Lance Andersen
On Wed, 22 Jun 2022 19:05:41 GMT, Lance Andersen wrote: > Hi, > > Please review the following patch which will: > > - Enhance the java.nio.file.spi.FileSystemProvider abstract class to include > the methods > > - public boolean exists(Path path, LinkOption... options) > - public A

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

2022-07-05 Thread Jorn Vernee
> 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 from native addresses, we don't know their > bounds,

Re: [jdk19] RFR: 8289486: Improve XSLT XPath operators count efficiency

2022-07-05 Thread Naoto Sato
On Fri, 1 Jul 2022 17:04:10 GMT, Joe Wang wrote: > To improve efficiency, this patch moves the limit check to within the Lexer > and reports any overlimit situation as soon as it happens. > > Note the change in XPathParser: diff (and also webrevs) showed the whole > error-report block was

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

2022-07-05 Thread Jorn Vernee
> 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 from native addresses, we don't know their > bounds,

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

2022-07-05 Thread Jorn Vernee
On Tue, 5 Jul 2022 15:14:20 GMT, Jorn Vernee wrote: >> This seems a bit too much. >> >> The class javadoc further up already describes a va list as "a stateful >> cursor used to iterate over a set of arguments". If that description is >> insufficient, I think it should be amended at that

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

2022-07-05 Thread David Holmes
On Mon, 4 Jul 2022 16:17:27 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: 8288838: jpackage: file association additional arguments [v4]

2022-07-05 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

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

2022-07-05 Thread Alex Kasko
> 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 optionally support additional arguments using `%*` batch

Re: RFR: 8288327: Executable.hasRealParameterData should not be volatile [v7]

2022-07-05 Thread Peter Levart
On Thu, 30 Jun 2022 12:08:19 GMT, Сергей Цыпанов wrote: >> If there are two threads calling `Executable.hasRealParameterData()` under >> race and the first one writes into volatile `Executable.parameters` field >> (doing _releasing store_) and the second thread reads non-null value from >>

Re: RFR: 8288327: Executable.hasRealParameterData should not be volatile [v7]

2022-07-05 Thread Peter Levart
On Mon, 4 Jul 2022 10:06:12 GMT, Сергей Цыпанов wrote: >> A more realistic use case would be something in the lines of checking >> whether the method is an expected one: >> >> >> @Benchmark >> public boolean isFoo() { >> return matches(method, "foo", int.class, String.class); >> }

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

2022-07-05 Thread Andrey Turbanov
On Sun, 3 Jul 2022 19:47:16 GMT, Attila Szegedi wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8288723: Avoid redundant ConcurrentHashMap.get call in java.time >> use computeIfAbsent where lambda could be

Integrated: 8289484: Cleanup unnecessary null comparison before instanceof check in java.rmi

2022-07-05 Thread Andrey Turbanov
On Wed, 29 Jun 2022 21:11:09 GMT, Andrey Turbanov wrote: > Update code checks both non-null and instance of a class in jdk.hotspot.agent > module classes. > The checks and explicit casts could also be replaced with pattern matching > for the instanceof operator. > > For example, the following

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

2022-07-05 Thread Alan Bateman
On Mon, 4 Jul 2022 19:30:40 GMT, Lance Andersen wrote: >> Hi, >> >> Please review the following patch which will: >> >> - Enhance the java.nio.file.spi.FileSystemProvider abstract class to include >> the methods >> >> - public boolean exists(Path path, LinkOption... options) >> - public

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

2022-07-05 Thread Lance Andersen
> Hi, > > Please review the following patch which will: > > - Enhance the java.nio.file.spi.FileSystemProvider abstract class to include > the methods > > - public boolean exists(Path path, LinkOption... options) > - public A readAttributesIfExists(Path > path, Class type, LinkOption...

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

2022-07-05 Thread Lance Andersen
> Hi, > > Please review the following patch which will: > > - Enhance the java.nio.file.spi.FileSystemProvider abstract class to include > the methods > > - public boolean exists(Path path, LinkOption... options) > - public A readAttributesIfExists(Path > path, Class type, LinkOption...

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

2022-07-05 Thread Chris Hegarty
On Mon, 4 Jul 2022 16:31:22 GMT, Alan Bateman wrote: >> I reworded with the suggested text in mind. I also added another sentence >> referencing native signal handlers, which may also initiate shutdown. I >> think this clarification is important so that it is clear the status code of >> all

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

2022-07-05 Thread Alan Bateman
On Mon, 4 Jul 2022 16:13:10 GMT, Ryan Ernst wrote: >> David's refinement looks good. The sentence on deadlock is accurate as >> shutdown hooks run on other threads, not the thread calling System.ext. > > I reworded with the suggested text in mind. I also added another sentence > referencing