Re: Collections.shuffle to accept RandomGenerator

2022-10-01 Thread Jason Mehrens
Tagir, Yes I have mixed feeling about promoting shuffle to List. I did notice that java.util.Arrays doesn't have a shuffle method. Perhaps adding RandomGenerator shuffle and slice variant of shuffle to that class would be something to consider. Array backed lists could then use that method t

Re: RFR: 8279283 - BufferedInputStream should override transferTo [v11]

2022-10-01 Thread Markus KARG
On Sun, 11 Sep 2022 08:04:36 GMT, Markus KARG wrote: > I think you are asking if is safe to leak a reference to the internal buffer. > If there is no mark then it might be okay because there is no replay for an > evil output stream to attack. However, I think it would require wider review > to

RFR: 8294696 - draining buffer instead of falling back to super.transferTo

2022-10-01 Thread Markus KARG
This PR implements JDK-8294696. - Commit messages: - draining buffer instead of falling back to super.transferTo Changes: https://git.openjdk.org/jdk/pull/10525/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10525&range=00 Issue: https://bugs.openjdk.org/browse/JDK-829469

Re: RFR: 8294695: Remove redundant deprecation suppression in ThreadGroup

2022-10-01 Thread Alan Bateman
On Sat, 1 Oct 2022 16:17:58 GMT, Andrey Turbanov wrote: > This suppression were added with Loom integration, but method > `Thread.getThreadGroup()` is not deprecated. > Let's cleanup code a bit. > https://mail.openjdk.org/pipermail/core-libs-dev/2022-September/094907.html Marked as reviewed by

RFR: 8294541 - java/io/BufferedInputStream/TransferTo.java fails with OOME

2022-10-01 Thread Markus KARG
Fixes 8294541 - Commit messages: - Fixed 8294541 Changes: https://git.openjdk.org/jdk/pull/10524/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10524&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8294541 Stats: 3 lines in 2 files changed: 0 ins; 1 del; 2 mod Pat

RFR: 8294695: Remove redundant deprecation suppression in ThreadGroup

2022-10-01 Thread Andrey Turbanov
This suppression were added with Loom integration, but method `Thread.getThreadGroup()` is not deprecated. Let's cleanup code a bit. https://mail.openjdk.org/pipermail/core-libs-dev/2022-September/094907.html - Commit messages: - [PATCH] Remove redundant deprecation suppression in T

Re: RFR: JDK-8294618: Update openjdk.java.net => openjdk.org [v4]

2022-10-01 Thread Weijun Wang
On Fri, 30 Sep 2022 17:38:54 GMT, Phil Race wrote: >> Why do we need to link to a URL? Why not `../../bridge/AccessBridgeCalls.c`? > > This is correct. > AccessBridge.h is published with the include/header files of the JDK and > anyone reading it there can't exactly make use of "../" Thanks @pr

Re: RFR: 8294397: Replace StringBuffer with StringBuilder within java.text [v4]

2022-10-01 Thread Lance Andersen
On Fri, 30 Sep 2022 20:08:10 GMT, Justin Lu wrote: >> Problem: Unnecessary instances of StringBuffer within java.text (internal >> only) >> >> Fix: StringBuffer Replaced with StringBuilder, and adjusted variable/method >> names > > Justin Lu has updated the pull request incrementally with two

Code for Console for Java JAR programs.

2022-10-01 Thread Amit
Code for Console for Java JAR programs in case someone needs it. Description: When you run a jar file by double-clicking on it, you don't get console so all your input/output have to be on GUI. This program solves this problem and gives users/programmers a console which can be used for input/outpu

RFR: 8294693: Add Collections.shuffle overload that accepts RandomGenerator interface

2022-10-01 Thread Tagir F . Valeev
Java 17 added RandomGenerator interface. However, existing method Collections.shuffle accepts old java.util.Random class. While since Java 19, it's possible to use Random.from(RandomGenerator) wrapper, it would be more convenient to provide direct overload shuffle(List list, RandomGenerator rnd

Re: Collections.shuffle to accept RandomGenerator

2022-10-01 Thread Tagir Valeev
Thanks, Paul, Jason. I've filed an issue: https://bugs.openjdk.org/browse/JDK-8294693 I'm not sure about the lifting shuffle() and making it an instance method of List interface. The shuffle() is used much less often, compared to sort(). Also, it produces an unspecified side-effect. Namely, it upd

Re: RFR: 8290036: Define and specify Runtime shutdown sequence [v9]

2022-10-01 Thread Alan Bateman
On Fri, 30 Sep 2022 21:46:34 GMT, Stuart Marks wrote: >> The concept of the shutdown sequence needs to be specified more clearly. >> This PR adds text for this into the class specification of >> `java.lang.Runtime`. Also includes adjustments to related areas in >> `addShutdownHook`, `halt`, an