Re: java.io.File#toPath() on Windows doesn't understand "NUL:" (null device)?

2021-03-16 Thread Jaikiran Pai
On 17/03/21 8:51 am, Jaikiran Pai wrote: Test results are from latest Java 16 release on a Windows setup. Just gave a quick try against Java 8 (java.version=1.8.0_252) and it fails on that version too with the same error: Exception in thread "main" java.nio.file.InvalidPathException:

java.io.File#toPath() on Windows doesn't understand "NUL:" (null device)?

2021-03-16 Thread Jaikiran Pai
Please consider this trivial code: import java.io.*; import java.nio.file.*; public class FileTest {     public static void main(final String[] args) throws Exception {     System.getProperties().list(System.out);     final File f = new File("NUL:");     try (final InputStream fis =

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM

2021-03-16 Thread David Holmes
On 16/03/2021 2:59 pm, David Holmes wrote: On 16/03/2021 11:58 am, Sergey Bylokhov wrote: On Sun, 14 Mar 2021 23:34:55 GMT, Henry Jen wrote: This patch ensure launcher won't crash JVM for the new static Methods from local/anonymous class on MacOS. As @dholmes-ora pointed out in the

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM [v3]

2021-03-16 Thread Henry Jen
> This patch ensure launcher won't crash JVM for the new static Methods from > local/anonymous class on MacOS. > > As @dholmes-ora pointed out in the analysis, this is a MacOS specific bug > when the launcher trying to grab class name to be displayed as the > Application name on the menu. > >

Re: RFR: 8261673: Move javadoc for the lookup mechanism to module-info [v2]

2021-03-16 Thread Iris Clark
On Tue, 16 Mar 2021 21:39:26 GMT, Joe Wang wrote: >> Consolidate and move javadoc for the lookup mechanism to the module summary. > > Joe Wang has updated the pull request incrementally with one additional > commit since the last revision: > > Fix typos: s/XMLEventFactory/XMLInputFactory >

Re: RFR: JDK-8263154: [macos] DMG builds have finder errors

2021-03-16 Thread Alexander Matveev
On Sat, 13 Mar 2021 14:39:40 GMT, Andy Herrick wrote: > JDK-8263154: [macos] DMG builds have finder errors Marked as reviewed by almatvee (Committer). - PR: https://git.openjdk.java.net/jdk/pull/2987

RFR: 8254979: Class.getSimpleName() returns non-empty for lambda and method

2021-03-16 Thread Joe Darcy
java.lang.Class has a number of methods to return some kind of textual token associated with the class, including a type name, canonical name, simple name, and separately the results of toString(). Bug 8254979 notes that getSimpleName mentions returning the name in source code, but

Re: RFR: 8261673: Move javadoc for the lookup mechanism to module-info [v2]

2021-03-16 Thread Joe Wang
On Tue, 16 Mar 2021 16:59:47 GMT, Naoto Sato wrote: >> Joe Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix typos: s/XMLEventFactory/XMLInputFactory >> s/XMLEventFactory/XMLOutputFactory > >

Re: RFR: 8261673: Move javadoc for the lookup mechanism to module-info [v2]

2021-03-16 Thread Naoto Sato
On Tue, 16 Mar 2021 21:39:26 GMT, Joe Wang wrote: >> Consolidate and move javadoc for the lookup mechanism to the module summary. > > Joe Wang has updated the pull request incrementally with one additional > commit since the last revision: > > Fix typos: s/XMLEventFactory/XMLInputFactory >

Re: RFR: 8261673: Move javadoc for the lookup mechanism to module-info [v2]

2021-03-16 Thread Lance Andersen
On Tue, 16 Mar 2021 21:36:40 GMT, Joe Wang wrote: >> Consolidate and move javadoc for the lookup mechanism to the module summary. > > Joe Wang has updated the pull request incrementally with one additional > commit since the last revision: > > Fix typos: s/XMLEventFactory/XMLInputFactory >

Re: RFR: 8261673: Move javadoc for the lookup mechanism to module-info [v2]

2021-03-16 Thread Joe Wang
> Consolidate and move javadoc for the lookup mechanism to the module summary. Joe Wang has updated the pull request incrementally with one additional commit since the last revision: Fix typos: s/XMLEventFactory/XMLInputFactory s/XMLEventFactory/XMLOutputFactory - Changes: -

Re: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators

2021-03-16 Thread Tommy Ettinger
On Mon, 15 Mar 2021 20:45:30 GMT, Paul Sandoz wrote: >> I still don't like the fact that the factory uses reflection but i don't see >> how to do better > > This is now looking very nicely structured. > > The only thing i am unsure are the details around `RandomGenerator` being a > service

Re: RFR: 8262807: Note assumptions of core reflection modeling and parameter handling [v2]

2021-03-16 Thread Joe Darcy
> Please review the javadoc change below, written in response to recent > discussion on core-libs. > > The bulk of the change is to add a discussion to java.lang.reflect's > package-info file about a language vs JVM model for core reflection. That > discussion is then linked to from several

Re: RFR: 8262807: Note assumptions of core reflection modeling and parameter handling

2021-03-16 Thread Roger Riggs
On Tue, 16 Mar 2021 17:22:13 GMT, Joe Darcy wrote: > Please review the javadoc change below, written in response to recent > discussion on core-libs. > > The bulk of the change is to add a discussion to java.lang.reflect's > package-info file about a language vs JVM model for core reflection.

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM [v2]

2021-03-16 Thread Sergey Bylokhov
On Tue, 16 Mar 2021 17:39:34 GMT, Henry Jen wrote: >> test/jdk/tools/launcher/8261785/CrashTheJVM.java line 1: >> >>> 1: import java.io.IOException; >> >> Copyright? > > This file is mostly based on the bug report as I just adjust static keyword > to make sure we cover different cases, thus I

Re: RFR: 8263358: Update java.lang to use instanceof pattern variable [v5]

2021-03-16 Thread Daniel Fuchs
On Tue, 16 Mar 2021 17:24:56 GMT, Mandy Chung wrote: >> Hi Rémi, >> There seems to be a deeper issue here - Patrick pointed that out to me - the >> specification of equals above speaks of comparing class names where the >> actual implementation compares classes. Maybe the specification should

Integrated: 8263536: Add @build tags to jpackage tests

2021-03-16 Thread Alexey Semenyuk
On Fri, 12 Mar 2021 17:52:30 GMT, Alexey Semenyuk wrote: > 8263536: Add @build tags to jpackage tests This pull request has now been integrated. Changeset: 422eba81 Author:Alexey Semenyuk URL: https://git.openjdk.java.net/jdk/commit/422eba81 Stats: 15 lines in 14 files changed:

Re: RFR: 8263536: Add @build tags to jpackage tests [v3]

2021-03-16 Thread Andy Herrick
On Tue, 16 Mar 2021 17:50:26 GMT, Alexey Semenyuk wrote: >> 8263536: Add @build tags to jpackage tests > > Alexey Semenyuk has refreshed the contents of this pull request, and previous > commits have been removed. The incremental views will show differences > compared to the previous content

Re: RFR: 8263536: Add @build tags to jpackage tests [v3]

2021-03-16 Thread Ioi Lam
On Tue, 16 Mar 2021 17:50:26 GMT, Alexey Semenyuk wrote: >> 8263536: Add @build tags to jpackage tests > > Alexey Semenyuk has refreshed the contents of this pull request, and previous > commits have been removed. The incremental views will show differences > compared to the previous content

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM [v2]

2021-03-16 Thread Henry Jen
> This patch ensure launcher won't crash JVM for the new static Methods from > local/anonymous class on MacOS. > > As @dholmes-ora pointed out in the analysis, this is a MacOS specific bug > when the launcher trying to grab class name to be displayed as the > Application name on the menu. > >

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM

2021-03-16 Thread Henry Jen
On Tue, 16 Mar 2021 15:33:37 GMT, Alan Bateman wrote: > Using an anonymous class for the main class looks strange and hard to believe > anyone is relying on this. I wonder if we should do more checking > LauncherHelper.validateMainClass to reject cases like this. I raised that same question,

Re: RFR: 8263536: Add @build tags to jpackage tests [v3]

2021-03-16 Thread Alexey Semenyuk
> 8263536: Add @build tags to jpackage tests Alexey Semenyuk has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM

2021-03-16 Thread Henry Jen
On Tue, 16 Mar 2021 01:59:33 GMT, Sergey Bylokhov wrote: >> This patch ensure launcher won't crash JVM for the new static Methods from >> local/anonymous class on MacOS. >> >> As @dholmes-ora pointed out in the analysis, this is a MacOS specific bug >> when the launcher trying to grab class

RFR: 8262807: Note assumptions of core reflection modeling and parameter handling

2021-03-16 Thread Joe Darcy
Please review the javadoc change below, written in response to recent discussion on core-libs. The bulk of the change is to add a discussion to java.lang.reflect's package-info file about a language vs JVM model for core reflection. That discussion is then linked to from several relevant

Integrated: JDK-8248904: Add support to jpackage for the Mac App Store

2021-03-16 Thread Andy Herrick
On Wed, 24 Feb 2021 21:59:22 GMT, Andy Herrick wrote: > Implementation of Mac App Support including three new mac specific CLI > options. This pull request has now been integrated. Changeset: 11c8c78c Author:Andy Herrick URL: https://git.openjdk.java.net/jdk/commit/11c8c78c Stats:

Re: RFR: 8263358: Update java.lang to use instanceof pattern variable [v5]

2021-03-16 Thread Mandy Chung
On Tue, 16 Mar 2021 11:13:50 GMT, Daniel Fuchs wrote: >> src/java.base/share/classes/java/lang/StackTraceElement.java line 413: >> >>> 411: && Objects.equals(moduleName, e.moduleName) >>> 412: && Objects.equals(moduleVersion, e.moduleVersion) >>> 413:

Re: RFR: 8261673: Move javadoc for the lookup mechanism to module-info

2021-03-16 Thread Naoto Sato
On Tue, 16 Mar 2021 00:52:24 GMT, Joe Wang wrote: > Consolidate and move javadoc for the lookup mechanism to the module summary. src/java.xml/share/classes/javax/xml/stream/XMLInputFactory.java line 172: > 170:* Creates a new instance of the factory. This method uses the > 171:* JAXP

Re: RFR: 8263536: Add @compile tags to jpackage tests [v2]

2021-03-16 Thread Ioi Lam
On Tue, 16 Mar 2021 16:18:48 GMT, Alexey Semenyuk wrote: > > @compile will always run javac every time you run the test > > Didn't know that. Thank you for explanation. Would this be OK to leave > > `@compile` tags? Since you're making changes, I think we should do it correctly. We should use

Re: RFR: 8263536: Add @compile tags to jpackage tests [v2]

2021-03-16 Thread Alexey Semenyuk
On Mon, 15 Mar 2021 20:02:02 GMT, Ioi Lam wrote: > @compile will always run javac every time you run the test Didn't know that. Thank you for explanation. Would this be OK to leave `@compile` tags? - PR: https://git.openjdk.java.net/jdk/pull/2975

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM

2021-03-16 Thread Alan Bateman
On Tue, 16 Mar 2021 07:43:54 GMT, Sergey Bylokhov wrote: >> This bug is similar to https://bugs.openjdk.java.net/browse/JDK-8076264, and >> the fix looks fine. > >> Maybe the AWT folk should decide what name should be displayed in this >> case. The canonical name was chosen when all main

Integrated: 8263450: Simplify LambdaForm.useCount

2021-03-16 Thread Claes Redestad
On Thu, 11 Mar 2021 14:50:46 GMT, Claes Redestad wrote: > Simplify useCount and avoid calling lastUseIndex for a small startup win. This pull request has now been integrated. Changeset: e33bfb39 Author:Claes Redestad URL: https://git.openjdk.java.net/jdk/commit/e33bfb39 Stats:

Re: RFR: 8263450: Simplify LambdaForm.useCount

2021-03-16 Thread Claes Redestad
On Mon, 15 Mar 2021 15:29:47 GMT, Roger Riggs wrote: >> Simplify useCount and avoid calling lastUseIndex for a small startup win. > > Marked as reviewed by rriggs (Reviewer). Thanks, Roger! - PR: https://git.openjdk.java.net/jdk/pull/2940

Re: RFR: 8263108: Class initialization deadlock in java.lang.constant [v4]

2021-03-16 Thread Jaikiran Pai
On Tue, 16 Mar 2021 12:19:11 GMT, Peter Levart wrote: > Perhaps you could just add a warning to the DynamicConstantDesc.ofCanonical() > method javadoc/comment about what NOT to do in order to not fall into the > deadlock trap again... (like: don't call this method from static initializer > of

Re: RFR: 8263108: Class initialization deadlock in java.lang.constant [v5]

2021-03-16 Thread Jaikiran Pai
> Can I please get a review for this proposed patch for the issue reported in > https://bugs.openjdk.java.net/browse/JDK-8263108? > > As noted in that issue, the `java.lang.constant.DynamicConstantDesc` and > `java.lang.constant.ConstantDescs` can end up in a classloading deadlock due > to the

Re: RFR: JDK-8263154: [macos] DMG builds have finder errors

2021-03-16 Thread Andy Herrick
On Mon, 15 Mar 2021 21:39:15 GMT, Alexander Matveev wrote: > > > Can you explain what problem is and how it is fixed? Does it fails when > "install-dir" is specified? "install-dir" is not relevant for DMG image and > we should ignore it. 1.) The problem is, at least on Catalina, when in

Re: RFR: 8263108: Class initialization deadlock in java.lang.constant [v4]

2021-03-16 Thread Peter Levart
On Tue, 16 Mar 2021 07:29:34 GMT, Vyom Tewari wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use Chris' suggested solution of avoiding deadlock > > Looks good to me. Holder pattern is easier to understand, I

Re: RFR: 8263358: Update java.lang to use instanceof pattern variable [v5]

2021-03-16 Thread Daniel Fuchs
On Mon, 15 Mar 2021 09:35:27 GMT, Rémi Forax wrote: >> Patrick Concannon has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8263358: Refactored missed equals method > > src/java.base/share/classes/java/lang/StackTraceElement.java line

Re: RFR: 8261673: Move javadoc for the lookup mechanism to module-info

2021-03-16 Thread Lance Andersen
On Tue, 16 Mar 2021 00:52:24 GMT, Joe Wang wrote: > Consolidate and move javadoc for the lookup mechanism to the module summary. Marked as reviewed by lancea (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/3020

Integrated: 8263509: LdapSchemaParser.readNextTag checks array length incorrectly

2021-03-16 Thread Aleksey Shipilev
On Fri, 12 Mar 2021 13:25:31 GMT, Aleksey Shipilev wrote: > SonarCloud rightfully says: > The length of "values" is always ">=0", so update this test to either "==0" > or ">0". > > // make sure at least one value was returned > if(values.length < 0) { // <--- here >

Re: RFR: 8263509: LdapSchemaParser.readNextTag checks array length incorrectly

2021-03-16 Thread Aleksei Efimov
On Tue, 16 Mar 2021 08:56:29 GMT, Aleksey Shipilev wrote: >> Seems fine. Lets hope no caller relies on this throwing AIOOBE. >> >> ..Thomas > >> This looks right but I'm surprised it isn't caught by tests (@AlekseiEfimov >> - do you have suggests for tests that would be useful to add here?) >

Re: RFR: 8263509: LdapSchemaParser.readNextTag checks array length incorrectly

2021-03-16 Thread Aleksey Shipilev
On Tue, 16 Mar 2021 10:52:25 GMT, Aleksei Efimov wrote: >> SonarCloud rightfully says: >> The length of "values" is always ">=0", so update this test to either >> "==0" or ">0". >> >> // make sure at least one value was returned >> if(values.length < 0) { // <--- here >>

Re: RFR: 8263509: LdapSchemaParser.readNextTag checks array length incorrectly

2021-03-16 Thread Aleksei Efimov
On Fri, 12 Mar 2021 13:25:31 GMT, Aleksey Shipilev wrote: > SonarCloud rightfully says: > The length of "values" is always ">=0", so update this test to either "==0" > or ">0". > > // make sure at least one value was returned > if(values.length < 0) { // <--- here >

Integrated: 8080272 Refactor I/O stream copying to use InputStream.transferTo/readAllBytes and Files.copy

2021-03-16 Thread Andrey Turbanov
On Sun, 20 Dec 2020 17:05:21 GMT, Andrey Turbanov wrote: > 8080272 Refactor I/O stream copying to use > InputStream.transferTo/readAllBytes and Files.copy This pull request has now been integrated. Changeset: 68deb24b Author:Andrey Turbanov Committer: Julia Boes URL:

Re: RFR: 8263509: LdapSchemaParser.readNextTag checks array length incorrectly

2021-03-16 Thread Aleksey Shipilev
On Fri, 12 Mar 2021 15:28:03 GMT, Thomas Stuefe wrote: >> SonarCloud rightfully says: >> The length of "values" is always ">=0", so update this test to either >> "==0" or ">0". >> >> // make sure at least one value was returned >> if(values.length < 0) { // <--- here >>

Re: RFR: 8261785: Calling "main" method in anonymous nested class crashes the JVM

2021-03-16 Thread Sergey Bylokhov
On Tue, 16 Mar 2021 01:55:49 GMT, Sergey Bylokhov wrote: >> This patch ensure launcher won't crash JVM for the new static Methods from >> local/anonymous class on MacOS. >> >> As @dholmes-ora pointed out in the analysis, this is a MacOS specific bug >> when the launcher trying to grab class

Re: RFR: 8263108: Class initialization deadlock in java.lang.constant [v4]

2021-03-16 Thread Vyom Tewari
On Tue, 16 Mar 2021 02:37:24 GMT, Jaikiran Pai wrote: >> Can I please get a review for this proposed patch for the issue reported in >> https://bugs.openjdk.java.net/browse/JDK-8263108? >> >> As noted in that issue, the `java.lang.constant.DynamicConstantDesc` and >>