Proposal: Replace foreach loop with Iterable.forEach in String.join(CharSequence, Iterable)

2021-08-16 Thread Donald Raab
The following code: for (CharSequence cs: elements) { joiner.add(cs); } Can be replaced with: elements.forEach(joiner::add); This would have the minor benefit of making it safe to use String.join with synchronized collections without requiring a client side lock. There are likely other

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

2021-08-16 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 The List and Collection interface was almost directly taken from java.util (apart from the small feature interfaces, that I extracted from them), so it

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

2021-08-16 Thread liach
On Mon, 9 Aug 2021 12:28:23 GMT, CC007 wrote: > create Streamable and ParallelStreamable interface and use them in Collection > and Optional You can view the mailing lists at https://mail.openjdk.java.net/mailman/listinfo and subscribe there. If you want to send a mail, just send one to say

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

2021-08-16 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 Also, sorry for my Millennial lack of knowledge of older communication methods, but if I wanted to reply to a specific thread in a mailing list, how

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

2021-08-16 Thread CC007
On Mon, 16 Aug 2021 03:39:02 GMT, Tagir F. Valeev wrote: >> create Streamable and ParallelStreamable interface and use them in >> Collection and Optional > > Mostly agreed with Brian. Judging from 7 years of using Stream API, I can say > that this abstraction would not solve any real problem.

RFR: 8272369: java/io/File/GetXSpace.java failed with "RuntimeException: java.nio.file.NoSuchFileException: /run/user/0"

2021-08-16 Thread Brian Burkhalter
This change proposes to exclude `/run/user` mounts from the test when run on Linux as they can "disappear" while the test is running. - Commit messages: - 8272369: java/io/File/GetXSpace.java failed with "RuntimeException: java.nio.file.NoSuchFileException: /run/user/0" Changes:

Re: RFR: 8272398: Update DockerTestUtils.buildJdkDockerImage()

2021-08-16 Thread Mikhailo Seledtsov
On Mon, 16 Aug 2021 23:48:46 GMT, Igor Ignatyev wrote: >> Please review this change that updates the buildJdkDockerImage() test >> library API. >> >> This work originated while working on "8195809: [TESTBUG] jps and jcmd -l >> support for containers is not tested". >> The initial intent was

Re: RFR: 8272124: Cgroup v1 initialization causes NullPointerException when path contains colon

2021-08-16 Thread Mikhailo Seledtsov
On Mon, 16 Aug 2021 17:25:57 GMT, Harold Seigel wrote: > Please review this small fix for JDK-8272124. The fix puts a limit of 3 when > splitting self cgroup lines by ':' so that Cgroup paths won't get truncated > if they contain embedded ':'s. For example, an entry of >

Re: RFR: 8272398: Update DockerTestUtils.buildJdkDockerImage()

2021-08-16 Thread Igor Ignatyev
On Mon, 16 Aug 2021 23:31:41 GMT, Mikhailo Seledtsov wrote: > Please review this change that updates the buildJdkDockerImage() test library > API. > > This work originated while working on "8195809: [TESTBUG] jps and jcmd -l > support for containers is not tested". > The initial intent was

Re: RFR: 8272398: Update DockerTestUtils.buildJdkDockerImage()

2021-08-16 Thread Igor Ignatyev
On Mon, 16 Aug 2021 23:47:04 GMT, Igor Ignatyev wrote: >> Please review this change that updates the buildJdkDockerImage() test >> library API. >> >> This work originated while working on "8195809: [TESTBUG] jps and jcmd -l >> support for containers is not tested". >> The initial intent was

Withdrawn: 8272137: Make Collection and Optional classes streamable

2021-08-16 Thread Kevin Rushforth
On Mon, 9 Aug 2021 12:28:23 GMT, CC007 wrote: > create Streamable and ParallelStreamable interface and use them in Collection > and Optional This pull request has been closed without being integrated. - PR: https://git.openjdk.java.net/jdk/pull/5050

Re: RFR: 8272398: Update DockerTestUtils.buildJdkDockerImage()

2021-08-16 Thread Mikhailo Seledtsov
On Mon, 16 Aug 2021 23:31:41 GMT, Mikhailo Seledtsov wrote: > Please review this change that updates the buildJdkDockerImage() test library > API. > > This work originated while working on "8195809: [TESTBUG] jps and jcmd -l > support for containers is not tested". > The initial intent was

JPackage and ask for microphone permissions broken on OSX...

2021-08-16 Thread Filteredaccount1
Hi Core-libs-dev, I’m trying to report an issue with JPackage on recent versions of OSX. Problem is, the microphone permissions aren’t granted to applications created by jpackage. The resulting recorded 16 bit PCM line in samples files are the correct duration, but don’t have any sound

RFR: 8272398: Update DockerTestUtils.buildJdkDockerImage()

2021-08-16 Thread Mikhailo Seledtsov
Please review this change that updates the buildJdkDockerImage() test library API. This work originated while working on "8195809: [TESTBUG] jps and jcmd -l support for containers is not tested". The initial intent was to extend the buildJdkDockerImage() API of DockerTestUtils to accept custom

RFR: 8269559: AArch64: Implement string_compare intrinsic in SVE

2021-08-16 Thread TatWai Chong
This patch implements string_compare intrinsic in SVE. It supports all LL, LU, UL and UU comparisons. As we haven't found an existing benchmark to measure performance impact, we created a benchmark derived from the test [1] for this evaluation. This benchmark is attached to this patch. Besides,

RFR: 8272541: Incorrect overflow test in Toom-Cook branch of BigInteger multiplication

2021-08-16 Thread Brian Burkhalter
Please consider this change which would modify a conditional `a + b > c` where the left side variables are `int`s and the right side is `(long)Integer.MAX_VALUE + 1`. The change is to cast the left side variables to `long`s. - Commit messages: - 8272541: Incorrect overflow test

Re: 'Condition is always false' in 'BigInteger#multiply(BigInteger, boolean)'

2021-08-16 Thread Brian Burkhalter
Hello Andrey, Indeed that appears to be incorrect. I filed [1] to track it. Thanks, Brian [1] https://bugs.openjdk.java.net/browse/JDK-8272541 On Aug 15, 2021, at 2:12 AM, Andrey Turbanov mailto:turban...@gmail.com>> wrote: I found suspicious condition in method

Re: RFR: 8153490: Cannot setBytes() if incoming buffer's length is bigger than number of elements we want to insert. [v4]

2021-08-16 Thread Lance Andersen
On Mon, 24 May 2021 11:18:57 GMT, Mitsuru Kariya wrote: >> Fix `SerialBlob.setBytes(long pos, byte[] bytes, int offset, int length)` in >> the following cases: >> >> 1. `pos - 1 + bytes.length - offset > this.length() && pos - 1 + length <= >> this.length()` >>The original implementation

RFR: 8272124: Cgroup v1 initialization causes NullPointerException when path contains colon

2021-08-16 Thread Harold Seigel
Please review this small fix for JDK-8272124. The fix puts a limit of 3 when splitting self cgroup lines by ':' so that Cgroup paths won't get truncated if they contain embedded ':'s. For example, an entry of "11:memory:/user.sli:ce" in a /proc/self/cgroup file will now result in a Cgroup

Re: RFR: 8268788: Annotations with lambda expressions can still cause AnnotationFormatError [v3]

2021-08-16 Thread Sergei Ustimenko
On Mon, 16 Aug 2021 13:56:44 GMT, Sergei Ustimenko wrote: >> Change #3294 helps to avoid `AnnotaionFormatException` in >> `sun.reflect.annotation.AnnotationInvocationHandler.validateAnnotationMethods`. >> While it fixes the case with e.g. `Runnable` that generates the synthetic >> method

Integrated: 8272297: FileInputStream should override transferTo() for better performance

2021-08-16 Thread Brian Burkhalter
On Thu, 12 Aug 2021 01:16:04 GMT, Brian Burkhalter wrote: > Please consider this request to add an override > `java.io.FileInputStream.transferTo(OutputStream)` with improved performance > if the parameter is a `FileOutputStream`. This pull request has now been integrated. Changeset:

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

2021-08-16 Thread Paul Sandoz
On Sun, 15 Aug 2021 01:43:32 GMT, Brian Goetz wrote: > To reiterate: These issues were explored in the JSR 335 EG and it was agreed > that this abstraction did not carry its weight. Yes, we explored this when the Stream API was being designed. It's hard, if not impossible, to capture all

Re: RFR: 8268788: Annotations with lambda expressions can still cause AnnotationFormatError [v3]

2021-08-16 Thread Sergei Ustimenko
> Change #3294 helps to avoid `AnnotaionFormatException` in > `sun.reflect.annotation.AnnotationInvocationHandler.validateAnnotationMethods`. > While it fixes the case with e.g. `Runnable` that generates the synthetic > method without parameters, validation still fails on synthetic methods

RFR: JDK-8272326 java/util/Random/RandomTestMoments.java had two Gaussian fails

2021-08-16 Thread Jim Laskey
RandomTestMoments.java and RandomTestChiSquared.java expect successive calls to nextLong to reproduce the same sequence of values. SecureRandom, by its nature, does not follow this requirement. The patch filters out SecureRandom from these tests. - Commit messages: - Filter out

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

2021-08-16 Thread Kevin Rushforth
On Sun, 15 Aug 2021 02:45:17 GMT, CC007 wrote: >> create Streamable and ParallelStreamable interface and use them in >> Collection and Optional > > I read through [these > posts](http://mail.openjdk.java.net/pipermail/lambda-libs-spec-experts/2013-June/thread.html#1910) > and while I did see

Re: RFR: 8272297: FileInputStream should override transferTo() for better performance [v2]

2021-08-16 Thread Alan Bateman
On Sun, 15 Aug 2021 16:51:59 GMT, Roman Kennke wrote: > Having followed both #4263 and this PR from the sidelines, may I ask why for > #4263 much more rigorous testing is asked but not here? E.g. test for NPE, > random-sized files/buffers, random position, return value, comprehensive JMH >