Re: RFR: 8263560: Remove needless wrapping with BufferedInputStream [v6]

2021-03-15 Thread Sergey Bylokhov
On Mon, 15 Mar 2021 18:04:26 GMT, Сергей Цыпанов wrote: >> In some cases wrapping of `InputStream` with `BufferedInputStream` is >> redundant, e.g. in case the wrapped one is `ByteArrayOutputStream` which >> does not require any buffer having one within. >> >> Other cases are related to

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

2021-03-15 Thread Joe Wang
Consolidate and move javadoc for the lookup mechanism to the module summary. - Commit messages: - 8261673: Move javadoc for the lookup mechanism to module-info Changes: https://git.openjdk.java.net/jdk/pull/3020/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=3020=00

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

2021-03-15 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: 8263108: Class initialization deadlock in java.lang.constant [v2]

2021-03-15 Thread Jaikiran Pai
On Mon, 15 Mar 2021 17:15:59 GMT, Chris Hegarty wrote: >>> What you have is probably fine, but has any consideration been given to >>> using the initialization-on-demand holder idiom? e.g. >>> >>> ``` >>> static private class CanonicalMapHolder { >>> static final Map, >>> ConstantDesc>>

Re: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v31]

2021-03-15 Thread Joe Darcy
On Mon, 15 Mar 2021 12:54:32 GMT, Jim Laskey wrote: >> This PR is to introduce a new random number API for the JDK. The primary API >> is found in RandomGenerator and RandomGeneratorFactory. Further description >> can be found in the JEP https://openjdk.java.net/jeps/356 . >> >> javadoc can

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

2021-03-15 Thread Sergey Bylokhov
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 analysis, this is a MacOS specific bug > when the launcher trying to grab class name to be

Re: RFR: JDK-8263545: Convert jpackage to use Stream.toList() [v3]

2021-03-15 Thread Ian Graves
> This converts jpackage to use `Stream.toList()` instead of > `Stream.collect(Collectors.toList())`. One piece of code was modified to not > mutate a list in addition to one test that used a mutating sort on a list. > The rest of the changes are simple substitutions. Ian Graves has updated

Re: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v31]

2021-03-15 Thread Joe Darcy
On Mon, 15 Mar 2021 12:54:32 GMT, Jim Laskey wrote: >> This PR is to introduce a new random number API for the JDK. The primary API >> is found in RandomGenerator and RandomGeneratorFactory. Further description >> can be found in the JEP https://openjdk.java.net/jeps/356 . >> >> javadoc can

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

2021-03-15 Thread David Holmes
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 analysis, this is a MacOS specific bug when the

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

2021-03-15 Thread Sergey Bylokhov
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 analysis, this is a MacOS specific bug > when the launcher trying to grab class name to be

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

2021-03-15 Thread Jaikiran Pai
On Tue, 16 Mar 2021 02:34:39 GMT, Jaikiran Pai wrote: >>> If you and others think that we can ignore this case, then your proposed >>> approach of using this lazy holder for initialization, IMO, is much cleaner >>> and natural to read and I will go ahead and update this PR to use it. >> >>

Re: RFR: 8263556: remove `@modules java.base` from tests

2021-03-15 Thread Daniel D . Daugherty
On Sat, 13 Mar 2021 20:26:42 GMT, Igor Ignatyev wrote: > Hi all, > > could you please review this trivial cleanup? > from JBS: > >> jtreg `@modules X` directive does two things: >> - exclude a test from execution if JDK under test doesn't have module X >> - if JDK under test has module X,

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

2021-03-15 Thread Rémi Forax
On Mon, 15 Mar 2021 11:39:20 GMT, Jan Lahoda wrote: >> We have considered generics, that why parameterized generics with another >> type arguments are forbidden, but i think we have forgotten raw types. > > I don't think that cast from `Object` to a raw type is unchecked, so as error > does

Re: RFR: 8263560: Remove needless wrapping with BufferedInputStream [v5]

2021-03-15 Thread Alan Bateman
On Mon, 15 Mar 2021 12:19:19 GMT, Сергей Цыпанов wrote: >> In some cases wrapping of `InputStream` with `BufferedInputStream` is >> redundant, e.g. in case the wrapped one is `ByteArrayOutputStream` which >> does not require any buffer having one within. >> >> Other cases are related to

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

2021-03-15 Thread Julia Boes
On Thu, 18 Feb 2021 07:12:34 GMT, Andrey Turbanov wrote: >> Hi @turbanoff, I'm happy to sponsor but I see two comments by @marschall - >> have they been addressed? >> https://github.com/openjdk/jdk/pull/1853#discussion_r572815422 >>

Re: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v31]

2021-03-15 Thread Jim Laskey
> This PR is to introduce a new random number API for the JDK. The primary API > is found in RandomGenerator and RandomGeneratorFactory. Further description > can be found in the JEP https://openjdk.java.net/jeps/356 . > > javadoc can be found at >

Re: RFR: 8148937: (str) Adapt StringJoiner for Compact Strings

2021-03-15 Thread Сергей Цыпанов
On Mon, 15 Mar 2021 12:36:24 GMT, Claes Redestad wrote: >> Hi @cl4es, >>> Some of these changes conflict with #2334, which suggest removing the >>> `coder` and `isLatin1` methods from `String`. >> >> I've checked out Aleksey's branch and applied my changes onto it, the only >> thing that I

Re: RFR: 8148937: (str) Adapt StringJoiner for Compact Strings

2021-03-15 Thread Claes Redestad
On Mon, 15 Mar 2021 13:52:57 GMT, Сергей Цыпанов wrote: >> A less intrusive alternative would be to use a `StringBuilder`, see changes >> in this branch: >> https://github.com/openjdk/jdk/compare/master...cl4es:stringjoin_improvement?expand=1 >> (I adapted your StringJoinerBenchmark to work

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

2021-03-15 Thread Pavel Rappo
On Mon, 15 Mar 2021 13:34:45 GMT, Rémi Forax wrote: >> I don't think that cast from `Object` to a raw type is unchecked, so as >> error does not seem warranted to me. >> >> However, I agree javac should produce the rawtype warning for rawtypes in >> pattern matching instanceof, because we

Re: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v3]

2021-03-15 Thread Rémi Forax
On Wed, 18 Nov 2020 13:45:46 GMT, Jim Laskey wrote: >> Need rebase > > Created new PR because of forced push: > https://github.com/openjdk/jdk/pull/1292 LGTM - PR: https://git.openjdk.java.net/jdk/pull/1273

Re: RFR: 8263560: Remove needless wrapping with BufferedInputStream [v4]

2021-03-15 Thread Сергей Цыпанов
> In some cases wrapping of `InputStream` with `BufferedInputStream` is > redundant, e.g. in case the wrapped one is `ByteArrayOutputStream` which does > not require any buffer having one within. > > Other cases are related to reading either a byte or short `byte[]`: in both > cases

Re: RFR: 8263560: Remove needless wrapping with BufferedInputStream [v3]

2021-03-15 Thread Сергей Цыпанов
On Sun, 14 Mar 2021 22:48:18 GMT, Sergey Bylokhov wrote: >> Сергей Цыпанов has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Use InputStream.readNBytes() and fix JLinkNegativeTest > >

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

2021-03-15 Thread Rémi Forax
On Mon, 15 Mar 2021 09:21:22 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my code for updating the code in the `java.lang` >> package to make use of the `instanceof` pattern variable? >> >> Kind regards, >> Patrick > > Patrick Concannon has updated the pull request

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

2021-03-15 Thread Patrick Concannon
On Fri, 12 Mar 2021 17:38:30 GMT, Chris Hegarty wrote: >> Patrick Concannon has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8263358: Refactored equals methods > > src/java.base/share/classes/java/lang/ProcessHandleImpl.java line 525: >

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

2021-03-15 Thread Patrick Concannon
> Hi, > > Could someone please review my code for updating the code in the `java.lang` > package to make use of the `instanceof` pattern variable? > > Kind regards, > Patrick Patrick Concannon has updated the pull request incrementally with one additional commit since the last revision:

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

2021-03-15 Thread Chris Hegarty
On Mon, 15 Mar 2021 09:21:22 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my code for updating the code in the `java.lang` >> package to make use of the `instanceof` pattern variable? >> >> Kind regards, >> Patrick > > Patrick Concannon has updated the pull request

Re: RFR: 8263552: Use String.valueOf() for char-to-String conversion in ObjectStreamClass

2021-03-15 Thread Alexander Zvegintsev
On Sat, 20 Feb 2021 12:17:32 GMT, Сергей Цыпанов wrote: > This is a very simple and trivial improvement about getting rid of pointless > char wrapping into array Marked as reviewed by azvegint (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/2660

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

2021-03-15 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: 8263108: Class initialization deadlock in java.lang.constant [v2]

2021-03-15 Thread Jaikiran Pai
On Fri, 12 Mar 2021 14:53:45 GMT, Chris Hegarty wrote: > What you have is probably fine, but has any consideration been given to using > the initialization-on-demand holder idiom? e.g. > > ``` > static private class CanonicalMapHolder { > static final Map, > ConstantDesc>> CANONICAL_MAP

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

2021-03-15 Thread Patrick Concannon
> Hi, > > Could someone please review my code for updating the code in the `java.lang` > package to make use of the `instanceof` pattern variable? > > Kind regards, > Patrick Patrick Concannon has updated the pull request with a new target base due to a merge or a rebase. The incremental

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-03-15 Thread Alan Bateman
On Sun, 14 Mar 2021 17:26:07 GMT, Alan Bateman wrote: >> Looks like it's never specified in JavaDoc which particular implementation >> of List is used in fields of affected classes, so it's quite odd to me that >> someone would rely on that when using reflection. But your point about >>

Re: RFR: 8263552: Use String.valueOf() for char-to-String conversions

2021-03-15 Thread Chris Hegarty
On Sat, 20 Feb 2021 12:17:32 GMT, Сергей Цыпанов wrote: > This is a very simple and trivial improvement about getting rid of pointless > char wrapping into array Marked as reviewed by chegar (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/2660

Integrated: 8263552: Use String.valueOf() for char-to-String conversions

2021-03-15 Thread Сергей Цыпанов
On Sat, 20 Feb 2021 12:17:32 GMT, Сергей Цыпанов wrote: > This is a very simple and trivial improvement about getting rid of pointless > char wrapping into array This pull request has now been integrated. Changeset: c0176c42 Author:Sergey Tsypanov Committer: Claes Redestad URL:

Re: RFR: 8148937: (str) Adapt StringJoiner for Compact Strings

2021-03-15 Thread Claes Redestad
On Thu, 18 Feb 2021 20:14:12 GMT, Сергей Цыпанов wrote: >> Some of these changes conflict with #2334, which suggest removing the >> `coder` and `isLatin1` methods from `String`. >> >> As a more general point I think it would be good to explore options that >> does not increase leakage of

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

2021-03-15 Thread Rémi Forax
On Mon, 15 Mar 2021 10:18:26 GMT, Pavel Rappo wrote: >> src/java.base/share/classes/java/lang/constant/DynamicConstantDesc.java line >> 360: >> >>> 358: public final boolean equals(Object o) { >>> 359: if (this == o) return true; >>> 360: return (o instanceof

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

2021-03-15 Thread Jan Lahoda
On Mon, 15 Mar 2021 11:09:45 GMT, Rémi Forax wrote: >>> I think it's a bug in javac, it should not even raise a warning but an >>> error. >>> But the spec is not fully clear. >> >> If you think that it's a bug, consider providing feedback to authors of JEP >> 394: >> >>> Other refinements

Re: RFR: 8263552: Use String.valueOf() for char-to-String conversions

2021-03-15 Thread Сергей Цыпанов
On Mon, 15 Mar 2021 11:11:21 GMT, Claes Redestad wrote: >> Marked as reviewed by chegar (Reviewer). > > It seems the bots haven't seen that I changed the bug summary to match yet. @cl4es could you try `/sponsor` again? I think this time it should be fine. - PR:

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

2021-03-15 Thread Pavel Rappo
On Mon, 15 Mar 2021 10:47:10 GMT, Rémi Forax wrote: > I think it's a bug in javac, it should not even raise a warning but an error. > But the spec is not fully clear. If you think that it's a bug, consider providing feedback to authors of JEP 394: > Other refinements may be incorporated based

Re: RFR: 8263560: Remove needless wrapping with BufferedInputStream [v5]

2021-03-15 Thread Сергей Цыпанов
On Mon, 15 Mar 2021 11:41:07 GMT, Alan Bateman wrote: >> Done > >> Done > > I think I'd prefer if the exception message would say that the JMOD is > invalid or that the JMOD file is truncated (because I don't think anyone > seeing this exception will know anything about the header). Fixed

Re: RFR: 8263560: Remove needless wrapping with BufferedInputStream [v5]

2021-03-15 Thread Сергей Цыпанов
> In some cases wrapping of `InputStream` with `BufferedInputStream` is > redundant, e.g. in case the wrapped one is `ByteArrayOutputStream` which does > not require any buffer having one within. > > Other cases are related to reading either a byte or short `byte[]`: in both > cases

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

2021-03-15 Thread Pavel Rappo
On Mon, 15 Mar 2021 09:32:33 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 > >

Re: RFR: 8263552: Use String.valueOf() for char-to-String conversions

2021-03-15 Thread Claes Redestad
On Mon, 15 Mar 2021 09:29:00 GMT, Alexander Zvegintsev wrote: >> This is a very simple and trivial improvement about getting rid of pointless >> char wrapping into array > > Marked as reviewed by azvegint (Reviewer). Ok if we change the summary to "Use String.valueOf() for char-to-String

Re: RFR: 8263552: Use String.valueOf() for char-to-String conversions

2021-03-15 Thread Сергей Цыпанов
On Mon, 15 Mar 2021 10:51:08 GMT, Claes Redestad wrote: >> Marked as reviewed by azvegint (Reviewer). > > Ok if we change the summary to "Use String.valueOf() for char-to-String > conversions"? @cl4es done - PR: https://git.openjdk.java.net/jdk/pull/2660

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

2021-03-15 Thread Rémi Forax
On Mon, 15 Mar 2021 11:01:48 GMT, Pavel Rappo wrote: >> The problem is that `desc` is a raw type and raw types doesn't play well >> with the rest of the language (in particular with inference). >> >> I think it's a bug in javac, it should not even raise a warning but an error. >> But the spec

Re: RFR: 8263560: Remove needless wrapping with BufferedInputStream [v4]

2021-03-15 Thread Alan Bateman
On Sun, 14 Mar 2021 19:32:11 GMT, Сергей Цыпанов wrote: > Done I think I'd prefer if the exception message would say that the JMOD is invalid or that the JMOD file is truncated (because I don't think anyone seeing this exception will know anything about the header). - PR:

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

2021-03-15 Thread Rémi Forax
On Mon, 15 Mar 2021 09:21:22 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my code for updating the code in the `java.lang` >> package to make use of the `instanceof` pattern variable? >> >> Kind regards, >> Patrick > > Patrick Concannon has updated the pull request

Integrated: 8263508: Remove dead code in MethodHandleImpl

2021-03-15 Thread Claes Redestad
On Fri, 12 Mar 2021 13:27:39 GMT, Claes Redestad wrote: > Remove unused methods. This pull request has now been integrated. Changeset: fac39fe9 Author:Claes Redestad URL: https://git.openjdk.java.net/jdk/commit/fac39fe9 Stats: 103 lines in 1 file changed: 0 ins; 103 del; 0 mod

Re: RFR: 8263552: Use String.valueOf() for char-to-String conversions

2021-03-15 Thread Claes Redestad
On Mon, 15 Mar 2021 10:55:12 GMT, Chris Hegarty wrote: >> This is a very simple and trivial improvement about getting rid of pointless >> char wrapping into array > > Marked as reviewed by chegar (Reviewer). It seems the bots haven't seen that I changed the bug summary to match yet.

Re: java.io.Serial vs java.io.Serializable javadoc

2021-03-15 Thread Roger Riggs
Hi, The serialVersionUID is recommended to be declared as "private" and warrant a warning. There's no value to it being public or protected and it is just noise in the javadoc of the class. The Serialized Form of each class documents the value of the serialVersionUID regardless of the access

Re: RFR: 8080272 Refactor I/O stream copying to use InputStream.transferTo/readAllBytes and Files.copy [v13]

2021-03-15 Thread Andrey Turbanov
> 8080272 Refactor I/O stream copying to use > InputStream.transferTo/readAllBytes and Files.copy Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8080272 Refactor I/O stream copying to use InputStream.transferTo/readAllBytes

Re: RFR: 8263560: Remove needless wrapping with BufferedInputStream [v5]

2021-03-15 Thread Daniel Fuchs
On Mon, 15 Mar 2021 12:19:19 GMT, Сергей Цыпанов wrote: >> In some cases wrapping of `InputStream` with `BufferedInputStream` is >> redundant, e.g. in case the wrapped one is `ByteArrayOutputStream` which >> does not require any buffer having one within. >> >> Other cases are related to

Re: RFR: 8263450: Simplify LambdaForm.useCount

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

Re: RFR: 8263556: remove `@modules java.base` from tests

2021-03-15 Thread Naoto Sato
On Sat, 13 Mar 2021 20:26:42 GMT, Igor Ignatyev wrote: > Hi all, > > could you please review this trivial cleanup? > from JBS: > >> jtreg `@modules X` directive does two things: >> - exclude a test from execution if JDK under test doesn't have module X >> - if JDK under test has module X,

Re: RFR: JDK-8262277: java.net.URLClassLoader.getResource throws undocumented IllegalArgumentException [v5]

2021-03-15 Thread Kevin Rushforth
On Mon, 15 Mar 2021 16:19:20 GMT, Craig Andrews wrote: >> Marked as reviewed by psadhukhan (Reviewer). > > What's the next step in the process for this PR? You need to fix this error: > Title mismatch between PR and JBS for issue JDK-8262277 by changing the title of this PR to match the JBS

Re: RFR: 8263556: remove `@modules java.base` from tests

2021-03-15 Thread Iris Clark
On Sat, 13 Mar 2021 20:26:42 GMT, Igor Ignatyev wrote: > Hi all, > > could you please review this trivial cleanup? > from JBS: > >> jtreg `@modules X` directive does two things: >> - exclude a test from execution if JDK under test doesn't have module X >> - if JDK under test has module X,

Re: RFR: JDK-8262277: URLClassLoader.getResource throws undocumented IllegalArgumentException [v5]

2021-03-15 Thread Kevin Rushforth
On Mon, 15 Mar 2021 16:29:54 GMT, Craig Andrews wrote: >> You need to fix this error: >> >>> Title mismatch between PR and JBS for issue JDK-8262277 >> >> by changing the title of this PR to match the JBS title. Then you should be >> able to integrate it. > >> You need to fix this error: >>

Re: RFR: 8263556: remove `@modules java.base` from tests

2021-03-15 Thread Igor Ignatyev
On Mon, 15 Mar 2021 16:25:48 GMT, Iris Clark wrote: >> Hi all, >> >> could you please review this trivial cleanup? >> from JBS: >> >>> jtreg `@modules X` directive does two things: >>> - exclude a test from execution if JDK under test doesn't have module X >>> - if JDK under test has

Integrated: 8263556: remove `@modules java.base` from tests

2021-03-15 Thread Igor Ignatyev
On Sat, 13 Mar 2021 20:26:42 GMT, Igor Ignatyev wrote: > Hi all, > > could you please review this trivial cleanup? > from JBS: > >> jtreg `@modules X` directive does two things: >> - exclude a test from execution if JDK under test doesn't have module X >> - if JDK under test has module X,

Re: RFR: JDK-8263545: Convert jpackage to use Stream.toList()

2021-03-15 Thread Ian Graves
On Mon, 15 Mar 2021 17:31:10 GMT, Alexey Semenyuk wrote: >> This converts jpackage to use `Stream.toList()` instead of >> `Stream.collect(Collectors.toList())`. One piece of code was modified to not >> mutate a list in addition to one test that used a mutating sort on a list. >> The rest of

Re: Comment on CSR 8251991: Hex formatting and parsing utility

2021-03-15 Thread Raffaello Giulietti
Hi, the javadoc of most of the methods listed in my previous post below reads: "The delimiter, prefix, suffix, and uppercase parameters are not used." As these eventually constitute the whole state of an instance of this final class and as the state is not involved, it is possible to

Re: RFR: JDK-8262277: java.net.URLClassLoader.getResource throws undocumented IllegalArgumentException [v5]

2021-03-15 Thread Craig Andrews
On Tue, 9 Mar 2021 08:40:47 GMT, Prasanta Sadhukhan wrote: >> Craig Andrews 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 >>

Re: RFR: JDK-8262277: URLClassLoader.getResource throws undocumented IllegalArgumentException [v5]

2021-03-15 Thread Craig Andrews
On Mon, 15 Mar 2021 16:26:35 GMT, Kevin Rushforth wrote: > You need to fix this error: > > > Title mismatch between PR and JBS for issue JDK-8262277 > > by changing the title of this PR to match the JBS title. Then you should be > able to integrate it. Done - how's it look now?

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

2021-03-15 Thread Chris Hegarty
On Mon, 15 Mar 2021 08:53:43 GMT, Jaikiran Pai wrote: > If you and others think that we can ignore this case, then your proposed > approach of using this lazy holder for initialization, IMO, is much cleaner > and natural to read and I will go ahead and update this PR to use it. For me, at

Re: RFR: JDK-8263545: Convert jpackage to use Stream.toList()

2021-03-15 Thread Alexey Semenyuk
On Sun, 14 Mar 2021 18:22:50 GMT, Ian Graves wrote: > This converts jpackage to use `Stream.toList()` instead of > `Stream.collect(Collectors.toList())`. One piece of code was modified to not > mutate a list in addition to one test that used a mutating sort on a list. > The rest of the

Re: RFR: 8263560: Remove needless wrapping with BufferedInputStream [v5]

2021-03-15 Thread Сергей Цыпанов
On Mon, 15 Mar 2021 15:04:49 GMT, Daniel Fuchs wrote: >> Сергей Цыпанов has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix error message > > src/java.base/share/classes/sun/net/www/http/HttpClient.java line 434: > >> 432:

Re: RFR: 8148937: (str) Adapt StringJoiner for Compact Strings [v2]

2021-03-15 Thread Сергей Цыпанов
> Hello, > > as of now `java.util.StringJoiner` still uses `char[]` as a storage for > joined Strings. > > This applies for the cases when all joined Strings as well as delimiter, > prefix and suffix contain only ASCII symbols. > > As a result when `StringJoiner.toString()` is called `byte[]`

Re: RFR: 8260605: Various java.lang.invoke cleanups [v5]

2021-03-15 Thread Mandy Chung
On Wed, 10 Mar 2021 16:34:39 GMT, Claes Redestad wrote: >> - Remove unused code >> - Inline and simplify the bootstrap method invocation code (remove pointless >> reboxing checks etc) >> - Apply pattern matching to make some code more readable > > Claes Redestad has updated the pull request

Re: RFR: 8148937: (str) Adapt StringJoiner for Compact Strings

2021-03-15 Thread Сергей Цыпанов
On Mon, 15 Mar 2021 14:07:29 GMT, Claes Redestad wrote: >> I was thinking about `StringBuilder` at the very beginning but then decided >> to have no bounds checks and reallocations. Indeed from maintainability >> point of view your solution is much more attractive. I have one minor >> comment

Re: RFR: JDK-8263545: Convert jpackage to use Stream.toList() [v2]

2021-03-15 Thread Ian Graves
> This converts jpackage to use `Stream.toList()` instead of > `Stream.collect(Collectors.toList())`. One piece of code was modified to not > mutate a list in addition to one test that used a mutating sort on a list. > The rest of the changes are simple substitutions. Ian Graves has updated

Re: RFR: JDK-8263545: Convert jpackage to use Stream.toList() [v2]

2021-03-15 Thread Ian Graves
On Mon, 15 Mar 2021 17:29:46 GMT, Alexey Semenyuk wrote: >> Ian Graves has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Clarifying type argument and shorting a toArray invocation > >

Re: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v12]

2021-03-15 Thread Anton Kozlov
On Thu, 11 Mar 2021 20:27:51 GMT, Stefan Karlsson wrote: >> The thread_bsd_aarch64.hpp describes a part of JavaThread, while this block >> belongs to Thread for now. Since W^X is an attribute of any operating system >> thread, I assumed Thread to be the right place for W^X bookkeeping. >> >>

Re: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v28]

2021-03-15 Thread Anton Kozlov
On Sat, 13 Mar 2021 05:49:53 GMT, David Holmes wrote: >> Anton Kozlov has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 114 commits: >> >> - JDK-8262491: bsd_aarch64 part >> - JDK-8263002: bsd_aarch64 part >> - Merge

Re: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v21]

2021-03-15 Thread Anton Kozlov
On Wed, 10 Mar 2021 11:21:44 GMT, Andrew Haley wrote: >> We always check for `R18_RESERVED` with `#if(n)def`, is there any reason to >> define the value for the macro? > > Robustness, clarity, maintainability, convention. Why not? I've tried to implement the suggestion, but it pulled more

Re: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v28]

2021-03-15 Thread Anton Kozlov
> Please review the implementation of JEP 391: macOS/AArch64 Port. > > It's heavily based on existing ports to linux/aarch64, macos/x86_64, and > windows/aarch64. > > Major changes are in: > * src/hotspot/cpu/aarch64: support of the new calling convention (subtasks > JDK-8253817, JDK-8253818)

Integrated: JDK-8262277: URLClassLoader.getResource throws undocumented IllegalArgumentException

2021-03-15 Thread Craig Andrews
On Sat, 20 Feb 2021 19:20:48 GMT, Craig Andrews wrote: > `java.net.URLClassLoader.getResource` can throw an undocumented > `IllegalArgumentException`. > > According to the javadoc for the `getResource` and `findResource` methods, > neither should be throwing `IllegalArgumentException` - they

Re: Comment on CSR 8251991: Hex formatting and parsing utility

2021-03-15 Thread Roger Riggs
Hi, The question about static vs instance methods was raised during the review. At the time, my rationale for the current API is summarized in this email. https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-October/070317.html It comes down to choosing one kind of consistency vs another.

Re: RFR: 8263560: Remove needless wrapping with BufferedInputStream [v6]

2021-03-15 Thread Daniel Fuchs
On Mon, 15 Mar 2021 18:01:20 GMT, Сергей Цыпанов wrote: >> In some cases wrapping of `InputStream` with `BufferedInputStream` is >> redundant, e.g. in case the wrapped one is `ByteArrayOutputStream` which >> does not require any buffer having one within. >> >> Other cases are related to

Re: RFR: 8263560: Remove needless wrapping with BufferedInputStream [v6]

2021-03-15 Thread Сергей Цыпанов
> In some cases wrapping of `InputStream` with `BufferedInputStream` is > redundant, e.g. in case the wrapped one is `ByteArrayOutputStream` which does > not require any buffer having one within. > > Other cases are related to reading either a byte or short `byte[]`: in both > cases

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

2021-03-15 Thread Julia Boes
On Thu, 18 Feb 2021 07:12:34 GMT, Andrey Turbanov wrote: >> Hi @turbanoff, I'm happy to sponsor but I see two comments by @marschall - >> have they been addressed? >> https://github.com/openjdk/jdk/pull/1853#discussion_r572815422 >>

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

2021-03-15 Thread Alexander Matveev
On Sat, 13 Mar 2021 14:39:40 GMT, Andy Herrick wrote: > JDK-8263154: [macos] DMG builds have finder errors 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. -

Re: RFR: 8148937: (str) Adapt StringJoiner for Compact Strings [v2]

2021-03-15 Thread Сергей Цыпанов
On Mon, 15 Mar 2021 20:54:54 GMT, Claes Redestad wrote: >> Сергей Цыпанов has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains three additional >>

Re: RFR: 8148937: (str) Adapt StringJoiner for Compact Strings [v3]

2021-03-15 Thread Сергей Цыпанов
> Hello, > > as of now `java.util.StringJoiner` still uses `char[]` as a storage for > joined Strings. > > This applies for the cases when all joined Strings as well as delimiter, > prefix and suffix contain only ASCII symbols. > > As a result when `StringJoiner.toString()` is called `byte[]`

Re: RFR: JDK-8263545: Convert jpackage to use Stream.toList() [v2]

2021-03-15 Thread Alexey Semenyuk
On Mon, 15 Mar 2021 18:53:26 GMT, Ian Graves wrote: >> This converts jpackage to use `Stream.toList()` instead of >> `Stream.collect(Collectors.toList())`. One piece of code was modified to not >> mutate a list in addition to one test that used a mutating sort on a list. >> The rest of the

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

2021-03-15 Thread Kevin Rushforth
On Mon, 15 Mar 2021 19:43:12 GMT, Alexey Semenyuk wrote: >> Changes requested by iklam (Reviewer). > > @kevinrushforth I plan to resolve JDK-8263474 manually as "Delivered". Would > this work? Yes, that should work. - PR: https://git.openjdk.java.net/jdk/pull/2975

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

2021-03-15 Thread Alexey Semenyuk
On Sat, 13 Mar 2021 08:38:16 GMT, Ioi Lam wrote: >> Alexey Semenyuk has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains one commit: >> >> 8263536: Add missing @compile tags to jpackage tests > > Changes requested by iklam

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

2021-03-15 Thread Ioi Lam
On Mon, 15 Mar 2021 19:41:06 GMT, Alexey Semenyuk wrote: >> test/jdk/tools/jpackage/windows/WinDirChooserTest.java line 44: >> >>> 42: * @requires (os.family == "windows") >>> 43: * @modules jdk.jpackage/jdk.jpackage.internal >>> 44: * @compile WinDirChooserTest.java >> >> Changes like this

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

2021-03-15 Thread Ioi Lam
On Mon, 15 Mar 2021 19:55:03 GMT, Ioi Lam wrote: >> It is better to have `@compile` everywhere for consistency. >> >> The proper way to run tests is by passing test class name as an argument for >> test runner, test class should not have `main()` and should have `@Test` >> annotation for

Re: Comment on CSR 8251991: Hex formatting and parsing utility

2021-03-15 Thread Raffaello Giulietti
Hello, I understand your points expressed in https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-October/070317.html On the other hand, it kind of hurts when the javadoc spec implies that the fromXXX() methods do not logically depend on the state and yet one has to invoke them on

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

2021-03-15 Thread Mandy Chung
On Mon, 15 Mar 2021 09:21:22 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my code for updating the code in the `java.lang` >> package to make use of the `instanceof` pattern variable? >> >> Kind regards, >> Patrick > > Patrick Concannon has updated the pull request

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

2021-03-15 Thread Paul Sandoz
On Fri, 26 Feb 2021 13:15:28 GMT, Rémi Forax wrote: >> Looking for some final code reviews. > > 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

Re: RFR: 8148937: (str) Adapt StringJoiner for Compact Strings [v2]

2021-03-15 Thread Claes Redestad
On Mon, 15 Mar 2021 18:00:27 GMT, Сергей Цыпанов wrote: >> Hello, >> >> as of now `java.util.StringJoiner` still uses `char[]` as a storage for >> joined Strings. >> >> This applies for the cases when all joined Strings as well as delimiter, >> prefix and suffix contain only ASCII symbols.

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

2021-03-15 Thread Iris Clark
On Mon, 15 Mar 2021 09:21:22 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my code for updating the code in the `java.lang` >> package to make use of the `instanceof` pattern variable? >> >> Kind regards, >> Patrick > > Patrick Concannon has updated the pull request

Re: RFR: 8148937: (str) Adapt StringJoiner for Compact Strings [v3]

2021-03-15 Thread Claes Redestad
On Mon, 15 Mar 2021 21:47:28 GMT, Сергей Цыпанов wrote: >> Hello, >> >> as of now `java.util.StringJoiner` still uses `char[]` as a storage for >> joined Strings. >> >> This applies for the cases when all joined Strings as well as delimiter, >> prefix and suffix contain only ASCII symbols.

Re: RFR: JDK-8263545: Convert jpackage to use Stream.toList() [v2]

2021-03-15 Thread Alexander Matveev
On Mon, 15 Mar 2021 18:53:26 GMT, Ian Graves wrote: >> This converts jpackage to use `Stream.toList()` instead of >> `Stream.collect(Collectors.toList())`. One piece of code was modified to not >> mutate a list in addition to one test that used a mutating sort on a list. >> The rest of the