RFR: 8313290: Misleading exception message from STS.Subtask::get when task forked after shutdown

2023-08-15 Thread Alan Bateman
This is a small issue with StructuredTaskScope. If the owner attempts to fork a subtask and the task scope is shutdown then the implementation doesn't currently force the owner to join when it's the first fork in a new round of forking. The result is that broken code calling Subtask::get throws

RFR: 8314280: StructuredTaskScope.shutdown should document that the state of completing subtasks is not defined

2023-08-15 Thread Alan Bateman
This is a docs only change. The specification for StructuredTaskScope.shutdown should make it clear that the state of subtasks that are completing (with a result or exception) at around the time of shutdown is not defined. The state of a completing subtask may transition to a terminal state, it

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v9]

2023-08-15 Thread Sergey Bylokhov
On Tue, 15 Aug 2023 18:43:36 GMT, Lance Andersen wrote: >> This PR updates the extra field validation added as part of >> [JDK-8302483](https://bugs.openjdk.org/browse/JDK-8302483) to deal with >> issues seen with 3rd party tools/libraries where a ZipException may be >> encountered when open

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v9]

2023-08-15 Thread Sergey Bylokhov
On Tue, 15 Aug 2023 23:13:00 GMT, Volker Simonis wrote: >As far as I understand you can manually create "artificial" zip files which >can be processed by the zip tool and previous versions of the JDK but not by >new ones. It can be processed by the new/latest version of JDK8. > As long as the

RFR: 8314330: java/foreign tests should respect vm flags when start new processes

2023-08-15 Thread Leonid Mesnik
The test helper which spawn new jvms is updated to start them using VM flags for testing. - Commit messages: - 8314330: java/foreign tests should respect vm flags when start new processes Changes: https://git.openjdk.org/jdk/pull/15302/files Webrev: https://webrevs.openjdk.org/?re

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v9]

2023-08-15 Thread Volker Simonis
On Tue, 15 Aug 2023 18:43:36 GMT, Lance Andersen wrote: >> This PR updates the extra field validation added as part of >> [JDK-8302483](https://bugs.openjdk.org/browse/JDK-8302483) to deal with >> issues seen with 3rd party tools/libraries where a ZipException may be >> encountered when open

Integrated: 8311591: Add SystemModulesPlugin test case that splits module descriptors with new local variables defined by DedupSetBuilder

2023-08-15 Thread Christoph
On Thu, 10 Aug 2023 21:42:41 GMT, Christoph wrote: > Add new test case with sample modules that contains some > requires/exports/uses/provides. > > We are just unsure if and how we should add some last step of verificaiton > with the extracted and decompiled class. > > Follow up task from htt

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Sergey Bylokhov
On Tue, 15 Aug 2023 21:38:41 GMT, Volker Simonis wrote: > Did you create that zip file manually or was it created by a tool and if by a > tool than which one? I think we must differentiate here between functional > compatibility with a tool like "zip", compatibility with a specification and >

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Volker Simonis
On Tue, 15 Aug 2023 21:05:16 GMT, Sergey Bylokhov wrote: > I have provided a test.zip file above which passed the zip integrity test via > "zip -T" and can be unzip w/o errors, but rejected by the openjdk. That zip > was created based on the actual specification, and not on the wiki. Did you c

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v9]

2023-08-15 Thread Volker Simonis
On Tue, 15 Aug 2023 18:43:36 GMT, Lance Andersen wrote: >> This PR updates the extra field validation added as part of >> [JDK-8302483](https://bugs.openjdk.org/browse/JDK-8302483) to deal with >> issues seen with 3rd party tools/libraries where a ZipException may be >> encountered when open

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Sergey Bylokhov
On Tue, 15 Aug 2023 17:56:09 GMT, Volker Simonis wrote: >This seems to be a very "free" interpretation of the specification to me. >According to my understanding, the valid sizes of 8, 16, 24 or 28 as described >in the Wikipedia article are a direct consequence of the specification. I have pro

Re: RFR: 8311591: Add SystemModulesPlugin test case that splits module descriptors with new local variables defined by DedupSetBuilder [v9]

2023-08-15 Thread Christoph
> Add new test case with sample modules that contains some > requires/exports/uses/provides. > > We are just unsure if and how we should add some last step of verificaiton > with the extracted and decompiled class. > > Follow up task from https://github.com/openjdk/jdk/pull/14408 Christoph has

Re: RFR: 8311591: Add SystemModulesPlugin test case that splits module descriptors with new local variables defined by DedupSetBuilder [v7]

2023-08-15 Thread Christoph
On Tue, 15 Aug 2023 20:41:03 GMT, Mandy Chung wrote: >> Christoph has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remove obsolete jimage and decompile methods > > test/jdk/tools/jlink/dedup/src/m4/p4/Main.java line 35: > >> 33: >> 34:

Re: RFR: 8311591: Add SystemModulesPlugin test case that splits module descriptors with new local variables defined by DedupSetBuilder [v7]

2023-08-15 Thread Mandy Chung
On Tue, 15 Aug 2023 20:03:46 GMT, Christoph wrote: >> Add new test case with sample modules that contains some >> requires/exports/uses/provides. >> >> We are just unsure if and how we should add some last step of verificaiton >> with the extracted and decompiled class. >> >> Follow up task f

Re: RFR: 8311591: Add SystemModulesPlugin test case that splits module descriptors with new local variables defined by DedupSetBuilder [v8]

2023-08-15 Thread Christoph
> Add new test case with sample modules that contains some > requires/exports/uses/provides. > > We are just unsure if and how we should add some last step of verificaiton > with the extracted and decompiled class. > > Follow up task from https://github.com/openjdk/jdk/pull/14408 Christoph has

RFR: 8314321: Remove unused field jdk.internal.util.xml.impl.Attrs.mAttrIdx

2023-08-15 Thread Andrey Turbanov
A field `char mAttrIdx` in the `jdk.internal.util.xml.impl.Attrs` class is unused and can be removed. - Commit messages: - [PATCH] Remove unused field jdk.internal.util.xml.impl.Attrs.mAttrIdx Changes: https://git.openjdk.org/jdk/pull/15298/files Webrev: https://webrevs.openjdk.or

Re: RFR: 8311591: Add SystemModulesPlugin test case that splits module descriptors with new local variables defined by DedupSetBuilder [v7]

2023-08-15 Thread Christoph
> Add new test case with sample modules that contains some > requires/exports/uses/provides. > > We are just unsure if and how we should add some last step of verificaiton > with the extracted and decompiled class. > > Follow up task from https://github.com/openjdk/jdk/pull/14408 Christoph has

Re: RFR: 8311591: Add SystemModulesPlugin test case that splits module descriptors with new local variables defined by DedupSetBuilder [v5]

2023-08-15 Thread Christoph
On Tue, 15 Aug 2023 19:51:44 GMT, Christoph wrote: >> Add new test case with sample modules that contains some >> requires/exports/uses/provides. >> >> We are just unsure if and how we should add some last step of verificaiton >> with the extracted and decompiled class. >> >> Follow up task f

Re: RFR: 8311591: Add SystemModulesPlugin test case that splits module descriptors with new local variables defined by DedupSetBuilder [v6]

2023-08-15 Thread Mandy Chung
On Tue, 15 Aug 2023 19:54:41 GMT, Christoph wrote: >> Add new test case with sample modules that contains some >> requires/exports/uses/provides. >> >> We are just unsure if and how we should add some last step of verificaiton >> with the extracted and decompiled class. >> >> Follow up task f

Re: RFR: 8311591: Add SystemModulesPlugin test case that splits module descriptors with new local variables defined by DedupSetBuilder [v6]

2023-08-15 Thread Christoph
> Add new test case with sample modules that contains some > requires/exports/uses/provides. > > We are just unsure if and how we should add some last step of verificaiton > with the extracted and decompiled class. > > Follow up task from https://github.com/openjdk/jdk/pull/14408 Christoph has

Re: RFR: 8311591: Add SystemModulesPlugin test case that splits module descriptors with new local variables defined by DedupSetBuilder [v5]

2023-08-15 Thread Christoph
> Add new test case with sample modules that contains some > requires/exports/uses/provides. > > We are just unsure if and how we should add some last step of verificaiton > with the extracted and decompiled class. > > Follow up task from https://github.com/openjdk/jdk/pull/14408 Christoph has

Re: RFR: 8311591: Add SystemModulesPlugin test case that splits module descriptors with new local variables defined by DedupSetBuilder [v4]

2023-08-15 Thread Mandy Chung
On Tue, 15 Aug 2023 19:13:31 GMT, Christoph wrote: >> Add new test case with sample modules that contains some >> requires/exports/uses/provides. >> >> We are just unsure if and how we should add some last step of verificaiton >> with the extracted and decompiled class. >> >> Follow up task f

Re: RFR: 8311939: Excessive allocation of Matcher.groups array [v6]

2023-08-15 Thread Cristian Vat
> Reduces excessive allocation of Matcher.groups array when the original > Pattern has no groups or less than 9 groups. > > Original clamping to 10 possibly due to documented behavior from javadoc: > "In this class, \1 through \9 are always interpreted as back references, " > > Only with Matche

Re: RFR: 8311939: Excessive allocation of Matcher.groups array [v2]

2023-08-15 Thread Aleksey Shipilev
On Thu, 10 Aug 2023 11:54:05 GMT, Cristian Vat wrote: >> Shouldn't the similar change be in `CIBackRef.match` too? The fact current >> tests do not catch it makes me uneasy: the test coverage seems to be rather >> low there. >> >> We need a regex expert to look at it. @rgiulietti @igraves mig

Re: RFR: 8311591: Add SystemModulesPlugin test case that splits module descriptors with new local variables defined by DedupSetBuilder [v3]

2023-08-15 Thread Christoph
On Mon, 14 Aug 2023 22:07:32 GMT, Mandy Chung wrote: > Since the batch size is 1, I would suggest that `p4.Main` can also load > `jdk.internal.module.SystemModules$all` and verify the expected numbers of > `subX` methods (one per each module). To find all modules in the image, you > can simply

Re: RFR: 8311591: Add SystemModulesPlugin test case that splits module descriptors with new local variables defined by DedupSetBuilder [v4]

2023-08-15 Thread Christoph
> Add new test case with sample modules that contains some > requires/exports/uses/provides. > > We are just unsure if and how we should add some last step of verificaiton > with the extracted and decompiled class. > > Follow up task from https://github.com/openjdk/jdk/pull/14408 Christoph has

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v8]

2023-08-15 Thread Lance Andersen
On Tue, 15 Aug 2023 18:22:00 GMT, Alan Bateman wrote: >> Lance Andersen has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Revise retrieval of jdk.util.zip.disableZip64ExtraFieldValidation and >> tweak a comment > > src/jdk.zipfs/share/cla

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v9]

2023-08-15 Thread Lance Andersen
> This PR updates the extra field validation added as part of > [JDK-8302483](https://bugs.openjdk.org/browse/JDK-8302483) to deal with > issues seen with 3rd party tools/libraries where a ZipException may be > encountered when opening select APK, ZIP or JAR files. Please see refer to > the

Re: RFR: 8311939: Excessive allocation of Matcher.groups array [v4]

2023-08-15 Thread Ian Graves
On Thu, 3 Aug 2023 12:34:19 GMT, Raffaello Giulietti wrote: >> Cristian Vat has updated the pull request incrementally with one additional >> commit since the last revision: >> >> changes and test for CIBackRef > > The change looks good. > However, I'm not a Reviewer. This looks good to me,

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Lance Andersen
On Tue, 15 Aug 2023 18:13:16 GMT, Alan Bateman wrote: >> Reworked similar to above. > >> Reworked similar to above. > > Thanks. Related is that there aren't tests in this PR that run with > -Djdk.util.zip.disableZip64ExtraFieldValidation and > -D"jdk.util.zip.disableZip64ExtraFieldValidation=t

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v8]

2023-08-15 Thread Alan Bateman
On Tue, 15 Aug 2023 16:41:35 GMT, Lance Andersen wrote: >> This PR updates the extra field validation added as part of >> [JDK-8302483](https://bugs.openjdk.org/browse/JDK-8302483) to deal with >> issues seen with 3rd party tools/libraries where a ZipException may be >> encountered when open

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Alan Bateman
On Tue, 15 Aug 2023 16:36:34 GMT, Lance Andersen wrote: > Reworked similar to above. Thanks. Related is that there aren't tests in this PR that run with -Djdk.util.zip.disableZip64ExtraFieldValidation and -D"jdk.util.zip.disableZip64ExtraFieldValidation=true to check that zip implementations

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Volker Simonis
On Tue, 15 Aug 2023 16:01:37 GMT, Sergey Bylokhov wrote: > Other than that there are no limitation on the size of extended block, it > could be 0, 20, 100 , etc. But it should contain correct data if necessary > and should not be larger than the surrounding "chunk". This seems to be a very "fr

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v8]

2023-08-15 Thread Volker Simonis
On Tue, 15 Aug 2023 16:41:35 GMT, Lance Andersen wrote: >> This PR updates the extra field validation added as part of >> [JDK-8302483](https://bugs.openjdk.org/browse/JDK-8302483) to deal with >> issues seen with 3rd party tools/libraries where a ZipException may be >> encountered when open

RFR: 8314063 : The socket is not closed in Connection::createSocket when t…

2023-08-15 Thread Weibing Xiao
Please refer to JDK-8314063. The failure scenario is due to the setting of connection timeout. It is either too small or not an optimal value for the system. When the client tries to connect to the server with LDAPs protocol. It requires the handshake after the socket is created and connected,

Withdrawn: 8309191: Reduce JDK dependencies of cgroup support

2023-08-15 Thread duke
On Tue, 30 May 2023 13:03:27 GMT, Aleksandar Pejovic wrote: > The current code for cgroup support in the JDK has large and expensive > dependencies: it uses NIO, streams, and regular expressions. This leads to > unnecessary class loading and slows down startup, especially when the code is > e

Re: RFR: 8314169: Combine related RoundingMode logic in j.text.DigitList [v3]

2023-08-15 Thread Naoto Sato
On Tue, 15 Aug 2023 16:38:42 GMT, Justin Lu wrote: >> Please review this PR which is a broad clean up of the DigitList class (used >> by Format classes in j.text). >> >> This PR is intended to be a portion of a bigger change (split up to make >> reviewing easier). >> >> The main change simpl

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v8]

2023-08-15 Thread Lance Andersen
> This PR updates the extra field validation added as part of > [JDK-8302483](https://bugs.openjdk.org/browse/JDK-8302483) to deal with > issues seen with 3rd party tools/libraries where a ZipException may be > encountered when opening select APK, ZIP or JAR files. Please see refer to > the

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Lance Andersen
On Tue, 15 Aug 2023 10:21:42 GMT, Alan Bateman wrote: >> Lance Andersen has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add additional zip to the DataProvider so it is exercised > > src/java.base/share/classes/java/util/zip/ZipFile.java

Re: RFR: 8314169: Combine related RoundingMode logic in j.text.DigitList [v3]

2023-08-15 Thread Justin Lu
> Please review this PR which is a broad clean up of the DigitList class (used > by Format classes in j.text). > > This PR is intended to be a portion of a bigger change (split up to make > reviewing easier). > > The main change simplifying related Rounding Mode logic in `shouldRoundUp()` > -

Re: RFR: 8314169: Combine related RoundingMode logic in j.text.DigitList [v2]

2023-08-15 Thread Naoto Sato
On Mon, 14 Aug 2023 17:43:09 GMT, Justin Lu wrote: >> src/java.base/share/classes/java/text/DigitList.java line 521: >> >>> 519: if (non0AfterIndex(maximumDigits)) { >>> 520: return (isNegative && roundingMode == >>> RoundingMode.FLOOR) >>> 521:

Integrated: 8314120: Add tests for FileDescriptor.sync

2023-08-15 Thread Aleksey Shipilev
On Thu, 10 Aug 2023 15:45:12 GMT, Aleksey Shipilev wrote: > When backporting [JDK-8312127](https://bugs.openjdk.org/browse/JDK-8312127), > I realized there are no targeted tests for `FileDescriptor.sync` that can be > used to qualify the changes in that area. > > Additionally, we use `FD.sync

Re: RFR: 8314120: Add tests for FileDescriptor.sync [v2]

2023-08-15 Thread Aleksey Shipilev
On Fri, 11 Aug 2023 15:32:58 GMT, Aleksey Shipilev wrote: >> When backporting [JDK-8312127](https://bugs.openjdk.org/browse/JDK-8312127), >> I realized there are no targeted tests for `FileDescriptor.sync` that can be >> used to qualify the changes in that area. >> >> Additionally, we use `FD

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Sergey Bylokhov
On Tue, 15 Aug 2023 10:49:37 GMT, Alan Bateman wrote: > Are you arguing to drop all checking of the extra fields? It's not clear to > me that this PR should be do that as it has a lot of implications. Not all, but do it in a different way. The only thing which is MUST be implemented according

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v2]

2023-08-15 Thread Lance Andersen
On Tue, 15 Aug 2023 10:36:47 GMT, Alan Bateman wrote: >> I don't think this is a question of "taste" because >> `isZip64ExtBlockSizeValid()` suggests that the method will check for *valid* >> sizes and to my understanding `0` is not a valid input. This method might >> also be called from other

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v7]

2023-08-15 Thread Lance Andersen
> This PR updates the extra field validation added as part of > [JDK-8302483](https://bugs.openjdk.org/browse/JDK-8302483) to deal with > issues seen with 3rd party tools/libraries where a ZipException may be > encountered when opening select APK, ZIP or JAR files. Please see refer to > the

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Lance Andersen
On Tue, 15 Aug 2023 00:07:01 GMT, Sergey Bylokhov wrote: > [TEST.zip](https://github.com/openjdk/jdk/files/12340301/TEST.zip) > > try this example, zip -T passed, unzip works fine, but openjdk rejects it. Yes, the Zip64 header in the CEN has a field size of 2 and as we are validating the Zip64

Re: RFR: 8314120: Add tests for FileDescriptor.sync [v2]

2023-08-15 Thread Brian Burkhalter
On Fri, 11 Aug 2023 15:32:58 GMT, Aleksey Shipilev wrote: >> When backporting [JDK-8312127](https://bugs.openjdk.org/browse/JDK-8312127), >> I realized there are no targeted tests for `FileDescriptor.sync` that can be >> used to qualify the changes in that area. >> >> Additionally, we use `FD

Re: RFR: 8313612: Use JUnit in lib-test/jdk tests

2023-08-15 Thread Chen Liang
On Wed, 2 Aug 2023 23:25:13 GMT, Qing Xiao wrote: > Modified all tests under lib-test/jdk to use JUnit Should all static `@Test` methods be converted to instance methods, as recommended by JUnit? See https://junit.org/junit5/docs/snapshot/user-guide/#writing-tests-definitions > Test Method an

Re: RFR: 8313612: Use JUnit in lib-test/jdk tests [v2]

2023-08-15 Thread Qing Xiao
> Modified all tests under lib-test/jdk to use JUnit Qing Xiao has updated the pull request incrementally with three additional commits since the last revision: - Delete extra space Co-authored-by: Andrey Turbanov - Update years in comments in test/lib-test/jdk/test/lib/hexdump

Re: RFR: 8288899: java/util/concurrent/ExecutorService/CloseTest.java failed with "InterruptedException: sleep interrupted" [v4]

2023-08-15 Thread Viktor Klang
On Mon, 14 Aug 2023 11:52:00 GMT, Doug Lea wrote: >> Addresses Jdk 8288899 : java/util/concurrent/ExecutorService/CloseTest.java >> failed with "InterruptedException: sleep interrupted" and related issues. >> >> This is a major ForkJoin update (and hard to review -- sorry) that finally >> addr

Re: RFR: 8314236: Overflow in Collections.rotate [v3]

2023-08-15 Thread Nikita Sakharin
> `Collections.rotate` method contains a bug. This method throws > IndexOutOfBoundsException on arrays larger than $2^{30}$ elements. The way to > reproduce: > > final int size = (1 << 30) + 1; > final List list = new ArrayList<>(size); > for (int i = 0; i < size; ++i) > list.add((byte) 0);

Re: RFR: 8311943: Cleanup usages of toLowerCase() and toUpperCase() in java.base [v3]

2023-08-15 Thread Glavo
On Tue, 15 Aug 2023 10:48:29 GMT, Glavo wrote: >> Clean up misuses of `toLowerCase()`/`toUpperCase()` in java.base. > > Glavo has updated the pull request with a new target base due to a merge or a > rebase. The pull request now contains four commits: > > - Merge remote-tracking branch 'origin

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Alan Bateman
On Tue, 15 Aug 2023 00:07:01 GMT, Sergey Bylokhov wrote: > try this example, zip -T passed, unzip works fine, but openjdk rejects it. Are you arguing to drop all checking of the extra fields? It's not clear to me that this PR should be do that as it has a lot of implications. - PR

Re: RFR: 8311943: Cleanup usages of toLowerCase() and toUpperCase() in java.base [v3]

2023-08-15 Thread Glavo
> Clean up misuses of `toLowerCase()`/`toUpperCase()` in java.base. Glavo has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits: - Merge remote-tracking branch 'origin/master' into case-conversion-java-base - Revert StreamTok

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Alan Bateman
On Mon, 14 Aug 2023 21:21:30 GMT, Lance Andersen wrote: >> This PR updates the extra field validation added as part of >> [JDK-8302483](https://bugs.openjdk.org/browse/JDK-8302483) to deal with >> issues seen with 3rd party tools/libraries where a ZipException may be >> encountered when open

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v2]

2023-08-15 Thread Alan Bateman
On Mon, 14 Aug 2023 21:38:02 GMT, Volker Simonis wrote: >> Hi Volker, >> >> I understand your point and I had done that previously but decided I did >> not like the flow of the code that way which is why I moved the check. I >> prefer to leave it as is. > > I don't think this is a question

Re: RFR: 8313612: Use JUnit in lib-test/jdk tests

2023-08-15 Thread Andrey Turbanov
On Wed, 2 Aug 2023 23:25:13 GMT, Qing Xiao wrote: > Modified all tests under lib-test/jdk to use JUnit test/lib-test/jdk/test/lib/hexdump/HexPrinterTest.java line 84: > 82: Arguments.of("canonical", "%08x ", "%02x ", 16, "|", 31, > HexPrinter.Formatters.PRINTABLE, "|" + System

Re: RFR: 8314236: Overflow in Collections.rotate [v2]

2023-08-15 Thread Aleksey Shipilev
On Tue, 15 Aug 2023 09:45:43 GMT, Nikita Sakharin wrote: >> `Collections.rotate` method contains a bug. This method throws >> IndexOutOfBoundsException on arrays larger than $2^{30}$ elements. The way >> to reproduce: >> >> final int size = (1 << 30) + 1; >> final List list = new ArrayList<>(s

Re: RFR: 8314236: Overflow in Collections.rotate [v2]

2023-08-15 Thread Nikita Sakharin
> `Collections.rotate` method contains a bug. This method throws > IndexOutOfBoundsException on arrays larger than $2^{30}$ elements. The way to > reproduce: > > final int size = (1 << 30) + 1; > final List list = new ArrayList<>(size); > for (int i = 0; i < size; ++i) > list.add((byte) 0);

Integrated: 8313949: Missing word in GPLv2 license text in StackMapTableAttribute.java

2023-08-15 Thread Dmitry Cherepanov
On Mon, 14 Aug 2023 12:47:46 GMT, Dmitry Cherepanov wrote: > The PR suggests updating copyright headers in two files so that they are the > same as in other files. This pull request has now been integrated. Changeset: f4e72c58 Author:Dmitry Cherepanov URL: https://git.openjdk.org/

Re: RFR: 8314120: Add tests for FileDescriptor.sync [v2]

2023-08-15 Thread Aleksey Shipilev
On Fri, 11 Aug 2023 15:32:58 GMT, Aleksey Shipilev wrote: >> When backporting [JDK-8312127](https://bugs.openjdk.org/browse/JDK-8312127), >> I realized there are no targeted tests for `FileDescriptor.sync` that can be >> used to qualify the changes in that area. >> >> Additionally, we use `FD

Re: RFR: 8313949: Missing word in GPLv2 license text in StackMapTableAttribute.java

2023-08-15 Thread Dmitry Cherepanov
On Mon, 14 Aug 2023 12:47:46 GMT, Dmitry Cherepanov wrote: > The PR suggests updating copyright headers in two files so that they are the > same as in other files. Thanks for the reviews! - PR Comment: https://git.openjdk.org/jdk/pull/15269#issuecomment-1678603082

Re: [jdk21] RFR: 8313312: Add missing classpath exception copyright header

2023-08-15 Thread Alan Bateman
On Tue, 8 Aug 2023 15:55:10 GMT, Roger Riggs wrote: > The same copyright updates are needed in JDK21. JDK 21 is in the RC phase so I assume this should re-targeted to jdk21u. - PR Comment: https://git.openjdk.org/jdk21/pull/166#issuecomment-1678567910

Re: RFR: 8313612: Use JUnit in lib-test/jdk tests

2023-08-15 Thread Christian Stein
On Wed, 2 Aug 2023 23:25:13 GMT, Qing Xiao wrote: > Modified all tests under lib-test/jdk to use JUnit Please only keep first and last/latest year of changes. test/lib-test/jdk/test/lib/hexdump/HexPrinterTest.java line 2: > 1: /* > 2: * Copyright (c) 2019, 2020, 2023, Oracle and/or its affili

Re: RFR: 8313612: Use JUnit in lib-test/jdk tests

2023-08-15 Thread Christian Stein
On Tue, 15 Aug 2023 08:03:59 GMT, John Jiang wrote: >> Modified all tests under lib-test/jdk to use JUnit > > test/lib-test/jdk/test/lib/format/ArrayDiffTest.java line 2: > >> 1: /* >> 2: * Copyright (c) 2020, 2021, 2023, Oracle and/or its affiliates. All >> rights reserved. > > Should it jus

Re: RFR: 8313612: Use JUnit in lib-test/jdk tests

2023-08-15 Thread John Jiang
On Wed, 2 Aug 2023 23:25:13 GMT, Qing Xiao wrote: > Modified all tests under lib-test/jdk to use JUnit test/lib-test/jdk/test/lib/format/ArrayDiffTest.java line 2: > 1: /* > 2: * Copyright (c) 2020, 2021, 2023, Oracle and/or its affiliates. All > rights reserved. Should it just modify the se

Re: RFR: 8311943: Cleanup usages of toLowerCase() and toUpperCase() in java.base [v2]

2023-08-15 Thread Alan Bateman
On Wed, 12 Jul 2023 15:06:36 GMT, Glavo wrote: >> Clean up misuses of `toLowerCase()`/`toUpperCase()` in java.base. > > Glavo has updated the pull request incrementally with one additional commit > since the last revision: > > Revert StreamTokenizer.java Now that the incompatible change to S

Re: RFR: JDK-8313764: Offer JVM HS functionality to shared lib load operations done by the JDK codebase

2023-08-15 Thread Matthias Baesken
On Mon, 14 Aug 2023 07:48:00 GMT, Matthias Baesken wrote: > Currently there is a number of functionality that would be interesting to > have for shared lib load operations in the JDK C code. > Some examples : > Events::log_dll_message for hs-err files reporting > JFR event NativeLibraryLoad > Th

RFR: 8313612: Use JUnit in lib-test/jdk tests

2023-08-15 Thread Qing Xiao
Modified all tests under lib-test/jdk to use JUnit - Commit messages: - Corrected the testSecondArrayIsNull() in ArrayDiffTest and modified format. - Modified all tests under lib-test/jdk to use JUnit Changes: https://git.openjdk.org/jdk/pull/15131/files Webrev: https://webrevs.op

Re: RFR: 8313612: Use JUnit in lib-test/jdk tests

2023-08-15 Thread Christian Stein
On Wed, 2 Aug 2023 23:25:13 GMT, Qing Xiao wrote: > Modified all tests under lib-test/jdk to use JUnit Marked as reviewed by cstein (Committer). - PR Review: https://git.openjdk.org/jdk/pull/15131#pullrequestreview-1578082673