Re: RFR: 8319324: FFM: Reformat javadocs [v10]

2023-11-08 Thread Per Minborg
> This PR proposes to reformat all the JavaDocs for the FFM API. This would > bring the FFM API docs more in line with the existing Java documentation (see > below). Occasional drive-by fixes are also included in this PR (such as > spelling and capitalization). > > I am aware this PR will (if

Re: RFR: 8318971: jar v17 should either exit on error immediately or create archive as jar v1.8 did

2023-11-08 Thread Ryan Wallace
On Mon, 30 Oct 2023 16:16:52 GMT, Ryan Wallace wrote: > Hi all, > > Please review this fix for jar tool not producing archive if there is a > missing file supplied. Fix is to throw an exception and exit processing when > a missing file is supplied. Current behaviour will recognise missing file

Re: RFR: 8318971: jar v17 should either exit on error immediately or create archive as jar v1.8 did [v2]

2023-11-08 Thread Ryan Wallace
> Hi all, > > Please review this fix for jar tool not producing archive if there is a > missing file supplied. Fix is to throw an exception and exit processing when > a missing file is supplied. Current behaviour will recognise missing file as > an error but continue processing and not produce

Re: RFR: 8318915: Enhance checks in BigDecimal.toPlainString() [v2]

2023-11-08 Thread Raffaello Giulietti
On Wed, 8 Nov 2023 00:23:22 GMT, Brian Burkhalter wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Using repeat() instead of loop. > > src/java.base/share/classes/java/math/BigDecimal.java line 3510: > >> 35

Re: RFR: 8319324: FFM: Reformat javadocs [v10]

2023-11-08 Thread Maurizio Cimadamore
On Wed, 8 Nov 2023 09:03:12 GMT, Per Minborg wrote: >> This PR proposes to reformat all the JavaDocs for the FFM API. This would >> bring the FFM API docs more in line with the existing Java documentation >> (see below). Occasional drive-by fixes are also included in this PR (such >> as spell

Re: RFR: 8318971: jar v17 should either exit on error immediately or create archive as jar v1.8 did [v2]

2023-11-08 Thread Jaikiran Pai
On Wed, 8 Nov 2023 09:42:25 GMT, Ryan Wallace wrote: >> Hi all, >> >> Please review this fix for jar tool not producing archive if there is a >> missing file supplied. Fix is to throw an exception and exit processing when >> a missing file is supplied. Current behaviour will recognise missing

Re: RFR: 8294980: test/jdk/java/lang/invoke 15 test classes use experimental bytecode library [v5]

2023-11-08 Thread Adam Sotona
On Tue, 7 Nov 2023 18:56:07 GMT, Mourad Abbay wrote: >> early experimental version of the bytecode library is bundled under: >> test/jdk/lib/testlibrary/bytecode >> >> following tests reference it: >> test/jdk/java/lang/invoke/common/test/java/lang/invoke/lib/InstructionHelper.java >> test/jdk/j

Re: RFR: 8294980: test/jdk/java/lang/invoke 15 test classes use experimental bytecode library [v5]

2023-11-08 Thread Mourad Abbay
On Wed, 8 Nov 2023 11:56:27 GMT, Adam Sotona wrote: >> Mourad Abbay 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 21 additional >> commits sin

Re: RFR: 8294980: test/jdk/java/lang/invoke 15 test classes use experimental bytecode library [v5]

2023-11-08 Thread Adam Sotona
On Wed, 8 Nov 2023 12:14:09 GMT, Mourad Abbay wrote: >> `` is not a valid name for dynamic constant. > > You can see `java.lang.constant.ConstantUtils.validateMemberName` So how is it possible that `testValidNames` has been passing with the name? Conversion should not change the tested subjects.

Re: RFR: 8294980: test/jdk/java/lang/invoke 15 test classes use experimental bytecode library [v5]

2023-11-08 Thread Mourad Abbay
On Wed, 8 Nov 2023 12:09:57 GMT, Mourad Abbay wrote: >> test/jdk/java/lang/invoke/condy/CondyNameValidationTest.java line 72: >> >>> 70: return Stream.of("", >>> 71: "", >>> 72: "") >> >> Isn't this reducing the test cases? > > `` is not

Re: RFR: 8294980: test/jdk/java/lang/invoke 15 test classes use experimental bytecode library [v5]

2023-11-08 Thread Mourad Abbay
On Wed, 8 Nov 2023 12:26:26 GMT, Mourad Abbay wrote: >> So how is it possible that `testValidNames` has been passing with the name? >> Conversion should not change the tested subjects. > > I think the old experimental library wasn't validating constant name. In the > new library, constant name i

Re: RFR: 8294980: test/jdk/java/lang/invoke 15 test classes use experimental bytecode library [v5]

2023-11-08 Thread Mourad Abbay
On Wed, 8 Nov 2023 12:15:13 GMT, Adam Sotona wrote: >> You can see `java.lang.constant.ConstantUtils.validateMemberName` > > So how is it possible that `testValidNames` has been passing with the name? > Conversion should not change the tested subjects. I think the old experimental library wasn't

Re: RFR: 8294980: test/jdk/java/lang/invoke 15 test classes use experimental bytecode library [v5]

2023-11-08 Thread Adam Sotona
On Tue, 7 Nov 2023 18:56:07 GMT, Mourad Abbay wrote: >> early experimental version of the bytecode library is bundled under: >> test/jdk/lib/testlibrary/bytecode >> >> following tests reference it: >> test/jdk/java/lang/invoke/common/test/java/lang/invoke/lib/InstructionHelper.java >> test/jdk/j

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v4]

2023-11-08 Thread Eirik Bjorsnos
> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the > number of compressed or uncompressed bytes read from the inflater is larger > than the Zip64 magic value. > > While the ZIP format mandates that the data descriptor `SHOULD be stored in > ZIP64 format (as 8 byte values

Integrated: 8319374: JFR: Remove instrumentation for exception events

2023-11-08 Thread Erik Gahlin
On Fri, 3 Nov 2023 12:19:07 GMT, Erik Gahlin wrote: > Could I have a review of a PR that removes the bytecode instrumentation for > the exception events. > > Testing: jdk/jdk/jfr + tier1 + tier2 This pull request has now been integrated. Changeset: e8418972 Author:Erik Gahlin URL:

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v3]

2023-11-08 Thread Eirik Bjorsnos
On Sat, 28 Oct 2023 17:34:35 GMT, Eirik Bjorsnos wrote: > We need to hold off this PR until #15650 has been integrated as it impacts > some of the changes proposed here Marking this PR ready for review, now that #15650 has been integrated. A summary of updates after #15650: - `ZipFile.isZip64

Integrated: 8294980: test/jdk/java/lang/invoke 15 test classes use experimental bytecode library

2023-11-08 Thread Mourad Abbay
On Thu, 19 Oct 2023 14:37:06 GMT, Mourad Abbay wrote: > early experimental version of the bytecode library is bundled under: > test/jdk/lib/testlibrary/bytecode > > following tests reference it: > test/jdk/java/lang/invoke/common/test/java/lang/invoke/lib/InstructionHelper.java > test/jdk/java/l

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v4]

2023-11-08 Thread Eirik Bjorsnos
On Wed, 8 Nov 2023 13:20:33 GMT, Eirik Bjorsnos wrote: >> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the >> number of compressed or uncompressed bytes read from the inflater is larger >> than the Zip64 magic value. >> >> While the ZIP format mandates that the data des

Re: RFR: 8319374: JFR: Remove instrumentation for exception events [v3]

2023-11-08 Thread Daniel Fuchs
On Wed, 8 Nov 2023 05:34:47 GMT, Erik Gahlin wrote: >> src/java.base/share/classes/jdk/internal/event/ThrowableTracer.java line 62: >> >>> 60: if (ExceptionThrownEvent.enabled()) { >>> 61: long timestamp = ExceptionThrownEvent.timestamp(); >>> 62: ExceptionThrownE

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v5]

2023-11-08 Thread Eirik Bjorsnos
> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the > number of compressed or uncompressed bytes read from the inflater is larger > than the Zip64 magic value. > > While the ZIP format mandates that the data descriptor `SHOULD be stored in > ZIP64 format (as 8 byte values

Re: RFR: 8308753: Class-File API transition to Preview [v24]

2023-11-08 Thread Konrad Windszus
On Fri, 3 Nov 2023 08:39:37 GMT, Adam Sotona wrote: >> Classfile API is an internal library under package `jdk.internal.classfile`  >> in JDK 21. >> This pull request turns the Classfile API into a preview feature and moves >> it into `java.lang.classfile`. >> It repackages all uses across JDK a

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v6]

2023-11-08 Thread Eirik Bjorsnos
> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the > number of compressed or uncompressed bytes read from the inflater is larger > than the Zip64 magic value. > > While the ZIP format mandates that the data descriptor `SHOULD be stored in > ZIP64 format (as 8 byte values

Re: RFR: 8303920: Avoid calling out to python in DataDescriptorSignatureMissing test [v9]

2023-11-08 Thread Eirik Bjorsnos
On Mon, 30 Oct 2023 17:48:48 GMT, Eirik Bjorsnos wrote: >> Please review this PR which brings the DataDescriptorSignatureMissing test >> back to life. >> >> This test currently calls out to Python to create a test vector ZIP with a >> Data Descriptor without the recommended but optional signa

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v3]

2023-11-08 Thread Eirik Bjorsnos
On Mon, 30 Oct 2023 14:29:41 GMT, Lance Andersen wrote: > > > I think the changes look good overall. Thank you for this. I am not sure > > > that the `@requires` is needed at this point. > > > > > > Was the `@requires (sun.arch.data.model == "64")` added to satisfy the 8GB > > memory requirem

Re: RFR: 8308753: Class-File API transition to Preview [v24]

2023-11-08 Thread Chen Liang
On Wed, 8 Nov 2023 13:31:32 GMT, Konrad Windszus wrote: > I would appreciate a hint in the javadocs why `Classfile.of` requires a byte > array and cannot deal with inputstreams (iiuc this is due to the lazy reading > which requires adjusting the offset back and forth potentially) You can simpl

Re: RFR: 8308753: Class-File API transition to Preview [v25]

2023-11-08 Thread Adam Sotona
> Classfile API is an internal library under package `jdk.internal.classfile`  > in JDK 21. > This pull request turns the Classfile API into a preview feature and moves it > into `java.lang.classfile`. > It repackages all uses across JDK and tests and adds lots of missing Javadoc. > > This PR goe

Re: RFR: 8319374: JFR: Remove instrumentation for exception events [v3]

2023-11-08 Thread Erik Gahlin
On Wed, 8 Nov 2023 13:39:10 GMT, Daniel Fuchs wrote: >> I agree, and I have looked into it, but I think it's better to do that >> refactorization separately as it will impact other events. > > Just for my own understanding: in this particular case the time stamp is > meaningless because the dur

Integrated: 8319423: Improve Year.isLeap by checking divisibility by 16

2023-11-08 Thread Claes Redestad
On Fri, 3 Nov 2023 12:03:24 GMT, Claes Redestad wrote: > https://github.com/cassioneri/eaf suggest this code for leap year calculation: > > public static boolean isLeap(long year) { > int d = year % 100 != 0 ? 4 : 16; > return (year & (d - 1)) == 0; > } > > .. with a cla

Re: RFR: 8308753: Class-File API transition to Preview [v25]

2023-11-08 Thread Chen Liang
On Wed, 8 Nov 2023 14:32:52 GMT, Adam Sotona wrote: >> Classfile API is an internal library under package `jdk.internal.classfile`  >> in JDK 21. >> This pull request turns the Classfile API into a preview feature and moves >> it into `java.lang.classfile`. >> It repackages all uses across JDK a

RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Viktor Klang
This is a Draft PR for [JEP-461](https://openjdk.org/jeps/461) - Commit messages: - Updating Javadoc for Gatherer and Gatherers based - Addressing feedback on Gatherers - Removing Gatherers.peek() and Gatherers.peekOrdered() - Updates after review comments - Removing trailing whi

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread ExE Boss
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote: > This is a Draft PR for [JEP-461](https://openjdk.org/jeps/461) These should probably use `{@snippet ...}`: src/java.base/share/classes/java/util/stream/Gatherer.java line 82: > 80: * } > 81: * gatherer.finisher().accept(state, d

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Viktor Klang
On Sun, 5 Nov 2023 17:55:39 GMT, Tagir F. Valeev wrote: >> This is a Draft PR for [JEP-461](https://openjdk.org/jeps/461) > > Very solid work, thank you! See some minor comments inline. I actually have > much more ideas of specific gatherers, but they could be discussed separately. > > One thin

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Viktor Klang
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote: > This is a Draft PR for [JEP-461](https://openjdk.org/jeps/461) src/java.base/share/classes/java/util/stream/AbstractPipeline.java line 88: > 86: */ > 87: @SuppressWarnings("rawtypes") > 88: protected final AbstractPipeline pre

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Viktor Klang
On Mon, 6 Nov 2023 16:57:24 GMT, ExE Boss wrote: > These should probably use `{@snippet ...}`: Good idea—I might do so when I have the opportunity. > src/java.base/share/classes/java/util/stream/Gatherer.java line 549: > >> 547: return greedy; >> 548: } >> 549: > > Since 

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Brian Goetz
On Tue, 31 Oct 2023 13:17:51 GMT, Viktor Klang wrote: >> This is a Draft PR for [JEP-461](https://openjdk.org/jeps/461) > > src/java.base/share/classes/java/util/stream/AbstractPipeline.java line 223: > >> 221: previousStage.linkedOrConsumed = true; >> 222: >> 223: previousPrevi

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Tagir F . Valeev
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote: > This is a Draft PR for [JEP-461](https://openjdk.org/jeps/461) Very solid work, thank you! See some minor comments inline. I actually have much more ideas of specific gatherers, but they could be discussed separately. One thing that bothe

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Viktor Klang
On Fri, 3 Nov 2023 14:04:23 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/util/stream/AbstractPipeline.java line 88: >> >>> 86: */ >>> 87: @SuppressWarnings("rawtypes") >>> 88: protected final AbstractPipeline previousStage; >> >> Making this accessible in subclasses a

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Viktor Klang
On Wed, 1 Nov 2023 15:40:23 GMT, Brian Goetz wrote: >Since you validate that previous^2.next == previous, you might just omit the >previousStage parameter and derive it in the body. @briangoetz It was a bit of additional safety to make sure that the caller gets what they want. If the prev-prev

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Chen Liang
On Tue, 31 Oct 2023 13:18:43 GMT, Viktor Klang wrote: >> This is a Draft PR for [JEP-461](https://openjdk.org/jeps/461) > > src/java.base/share/classes/java/util/stream/AbstractPipeline.java line 88: > >> 86: */ >> 87: @SuppressWarnings("rawtypes") >> 88: protected final AbstractPip

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Brian Goetz
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote: > This is a Draft PR for [JEP-461](https://openjdk.org/jeps/461) src/java.base/share/classes/java/util/stream/Gatherer.java line 44: > 42: * > 43: * Examples of gathering operations include, but is not limited to: > 44: * grouping element

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Viktor Klang
On Wed, 8 Nov 2023 14:19:47 GMT, Tagir F. Valeev wrote: >> src/java.base/share/classes/java/util/stream/Gatherer.java line 252: >> >>> 250: * Gatherer as input that Gatherer >>> 251: */ >>> 252: default Gatherer andThen(Gatherer>> AA, ? extends RR> that) { >> >> It would

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Viktor Klang
On Wed, 1 Nov 2023 16:16:38 GMT, Brian Goetz wrote: >> This is a Draft PR for [JEP-461](https://openjdk.org/jeps/461) > > src/java.base/share/classes/java/util/stream/Gatherer.java line 137: > >> 135: * }) >> 136: * ); >> 137: * } > > As a matter of style, I find it weird that `

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Tagir F . Valeev
On Mon, 6 Nov 2023 11:08:08 GMT, Viktor Klang wrote: >> src/java.base/share/classes/java/util/stream/Gatherer.java line 308: >> >>> 306: */ >>> 307: static Gatherer ofSequential( >>> 308: Integrator integrator) { >> >> Probably PECS signature `? super T, ? extends R` could

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Viktor Klang
On Wed, 8 Nov 2023 14:14:35 GMT, Tagir F. Valeev wrote: >> I've thought about that, and since we don't use that for the other >> parameters (like `initializer`) I don't think it helps changing it here. And >> the reason this has little effect is that the code calling the factory >> typically c

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Tagir F . Valeev
On Sun, 5 Nov 2023 17:17:43 GMT, Tagir F. Valeev wrote: >> This is a Draft PR for [JEP-461](https://openjdk.org/jeps/461) > > src/java.base/share/classes/java/util/stream/Gatherer.java line 252: > >> 250: * Gatherer as input that Gatherer >> 251: */ >> 252: default Gathere

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Viktor Klang
On Wed, 1 Nov 2023 18:10:28 GMT, Viktor Klang wrote: >> src/java.base/share/classes/java/util/stream/Gatherers.java line 516: >> >>> 514: * evaluation can be out-of-sequence compared to the sequential >>> encounter >>> 515: * order of the stream. >>> 516: * >> >> How does this d

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Brian Goetz
On Wed, 1 Nov 2023 15:39:11 GMT, Brian Goetz wrote: >> src/java.base/share/classes/java/util/stream/AbstractPipeline.java line 223: >> >>> 221: previousStage.linkedOrConsumed = true; >>> 222: >>> 223: previousPreviousStage.nextStage = this; >> >> This allows subclasses to repla

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Viktor Klang
On Wed, 1 Nov 2023 17:22:09 GMT, Viktor Klang wrote: >> Since you validate that previous^2.next == previous, you might just omit the >> `previousStage` parameter and derive it in the body. > >>Since you validate that previous^2.next == previous, you might just omit the >>previousStage parameter

Re: RFR: 8308753: Class-File API transition to Preview [v24]

2023-11-08 Thread Konrad Windszus
On Wed, 8 Nov 2023 14:07:04 GMT, Chen Liang wrote: > You can simply call `ClassFile.of().parse(inputStream.readAllBytes())` > instead. I know, but for memory consumption reasons everyone should prefer just passing an InputStream. Is the memory consumption with `ClassFile.of().parse(Path)` any

Re: RFR: 8318971: jar v17 should either exit on error immediately or create archive as jar v1.8 did [v3]

2023-11-08 Thread Ryan Wallace
> Hi all, > > Please review this fix for jar tool not producing archive if there is a > missing file supplied. Fix is to throw an exception and exit processing when > a missing file is supplied. Current behaviour will recognise missing file as > an error but continue processing and not produce

Re: RFR: 8318971: jar v17 should either exit on error immediately or create archive as jar v1.8 did [v2]

2023-11-08 Thread Alan Bateman
On Wed, 8 Nov 2023 16:03:22 GMT, Ryan Wallace wrote: > Added and tested and it still works as expected. @ryawalla Would it be possible to update the PR description so there's a clear summary on the updated proposal? I think it aligns the behavior with what happens when a bad file path is speci

Re: RFR: 8318971: jar v17 should either exit on error immediately or create archive as jar v1.8 did [v2]

2023-11-08 Thread Ryan Wallace
On Wed, 8 Nov 2023 09:42:25 GMT, Ryan Wallace wrote: >> Hi all, >> >> Please review this fix for jar tool not producing archive if there is a >> missing file supplied. Fix is to throw an exception and exit processing when >> a missing file is supplied. Current behaviour will recognise missing

Re: RFR: 8308753: Class-File API transition to Preview [v26]

2023-11-08 Thread Adam Sotona
> Classfile API is an internal library under package `jdk.internal.classfile`  > in JDK 21. > This pull request turns the Classfile API into a preview feature and moves it > into `java.lang.classfile`. > It repackages all uses across JDK and tests and adds lots of missing Javadoc. > > This PR goe

Re: RFR: 8308753: Class-File API transition to Preview [v25]

2023-11-08 Thread Adam Sotona
On Wed, 8 Nov 2023 15:22:54 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 360 commits: >> >> - fixed condy tests >> - Merge branch 'master' into JDK-8308753-preview >> - Merge branch 'mas

Re: RFR: 8314891: Additional Zip64 extra header validation [v8]

2023-11-08 Thread Eirik Bjorsnos
On Mon, 23 Oct 2023 19:12:57 GMT, Lance Andersen wrote: >> Please review this PR which improves the Zip64 extra header validation: >> >> - Throw a ZipException If the extra len field is 0 and : >> -- size, csize, or loc offset are set to 0x >> -- disk starting number is set to 0x >>

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Tagir F . Valeev
On Mon, 6 Nov 2023 16:18:22 GMT, Viktor Klang wrote: >> src/java.base/share/classes/java/util/stream/Gatherers.java line 389: >> >>> 387: * @throws IllegalArgumentException when windowSize is less than 1 >>> 388: */ >>> 389: public static Gatherer> windowSliding(int >>> windowSiz

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Viktor Klang
On Wed, 8 Nov 2023 16:28:55 GMT, Tagir F. Valeev wrote: >> Perhaps the best thing here is to change such that the supplier supplies >> something non-zero like "String: "? > > Such an example still looks artificial for me, as it's easy to rewrite with > `reduce()` (just prepend with prefix outsi

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Tagir F . Valeev
On Mon, 6 Nov 2023 16:24:12 GMT, Viktor Klang wrote: >> src/java.base/share/classes/java/util/stream/Gatherers.java line 450: >> >>> 448: * @throws NullPointerException if any of the parameters are null >>> 449: */ >>> 450: public static Gatherer fold( >> >> Should it be explicit

Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs

2023-11-08 Thread Damon Fenacci
On Mon, 30 Oct 2023 18:34:44 GMT, Roger Riggs wrote: > Strings, after construction, are immutable but may be constructed from > mutable arrays of bytes, characters, or integers. > The string constructors should guard against the effects of mutating the > arrays during construction that might in

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Viktor Klang
On Wed, 8 Nov 2023 16:26:56 GMT, Tagir F. Valeev wrote: >> @amaembo pairMap should be straight-forward to implement. And regarding >> parallelization I don't think that will necessarily work since it would not >> be able to run incrementally (depth-first). > > Sorry, I'm not sure what do you me

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Rémi Forax
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote: > This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) src/java.base/share/classes/java/util/stream/AbstractPipeline.java line 223: > 221: * consumed > 222: */ > 223: protected AbstractPipeline(AbstractPipeline

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Rémi Forax
On Fri, 3 Nov 2023 16:51:34 GMT, Viktor Klang wrote: >> Since stream facilities are package-private, we can just use no access >> modifier and remove all new `protected` access modifier (on methods, fields, >> constructors) in this PR. > > @liach We could do that, yet I'm not sure that is stric

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Rémi Forax
On Tue, 31 Oct 2023 13:19:30 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > src/java.base/share/classes/java/util/stream/AbstractPipeline.java line 242: > >> 240: } >> 241: >> 242: // Terminal evaluation methods > > This is needed i

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Viktor Klang
On Wed, 8 Nov 2023 16:37:45 GMT, Tagir F. Valeev wrote: >> TBH I don't think `foldRight` makes much sense for potentially unbounded >> structures such as Stream. In the case you need it, it might be better to >> export it to a List and then reversing it. > > Well, the unboundness argument does

Re: RFR: 8187655: jdk.lambda.vm.InterfaceAccessFlagsTest.testPrivateMethodCall needs update after nestmates support [v3]

2023-11-08 Thread Mandy Chung
> `jdk.lambda.vm.InterfaceAccessFlagsTest` uses `ClassToInterfaceConverter` to > mechanically convert a classfile for a Class into an in-memory class > representation of an equivalent Interface. `testPrivateMethodCall` tests to > invoke a private method. Before nestmates, invoking a private cl

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Tagir F . Valeev
On Wed, 8 Nov 2023 15:23:39 GMT, Viktor Klang wrote: >> This is especially important given that often you don't know the AA type at >> all. E.g., imagine that you are doing `.andThen(Gatherers.fold(...))`, but >> `fold` returns `Gatherer`, so you can specify explicit `RR`, but >> not `AA`. > >

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Rémi Forax
On Wed, 8 Nov 2023 17:10:05 GMT, Tagir F. Valeev wrote: >> Has this proven to be a problem for things like >> [Collectors.mapping(…)](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/stream/Collectors.html#mapping(java.util.function.Function,java.util.stream.Collector)) >>

Re: RFR: 8187655: jdk.lambda.vm.InterfaceAccessFlagsTest.testPrivateMethodCall needs update after nestmates support [v3]

2023-11-08 Thread Adam Sotona
On Wed, 8 Nov 2023 17:10:11 GMT, Mandy Chung wrote: >> `jdk.lambda.vm.InterfaceAccessFlagsTest` uses `ClassToInterfaceConverter` to >> mechanically convert a classfile for a Class into an in-memory class >> representation of an equivalent Interface. `testPrivateMethodCall` tests >> to invoke

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Rémi Forax
On Sun, 5 Nov 2023 16:18:52 GMT, Tagir F. Valeev wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > src/java.base/share/classes/java/util/stream/Gatherer.java line 330: > >> 328: static Gatherer ofSequential( >> 329: Integrator integrator, >> 330:

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Tagir F . Valeev
On Wed, 8 Nov 2023 17:17:21 GMT, Rémi Forax wrote: >> src/java.base/share/classes/java/util/stream/Gatherer.java line 330: >> >>> 328: static Gatherer ofSequential( >>> 329: Integrator integrator, >>> 330: BiConsumer> finisher) { >> >> Probably, accepting `Consumer>

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Rémi Forax
On Wed, 8 Nov 2023 15:17:57 GMT, Viktor Klang wrote: >> It's still possible to have a situation where PECS signature could be >> useful, and I don't see any downsides. A user may want to reuse the same >> static integrator instead of creating several identical lambdas just because >> the targe

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Rémi Forax
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote: > This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) src/java.base/share/classes/java/util/stream/Gatherer.java line 444: > 442: */ > 443: static Gatherer of( > 444: Supplier initializer, wildcards ar

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Rémi Forax
On Wed, 8 Nov 2023 17:22:05 GMT, Rémi Forax wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > src/java.base/share/classes/java/util/stream/Gatherer.java line 490: > >> 488: * more elements sent to it, {@code false} if otherwise >> 489: *

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Rémi Forax
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote: > This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) src/java.base/share/classes/java/util/stream/GathererOp.java line 50: > 48: */ > 49: final class GathererOp extends ReferencePipeline { > 50: @SuppressWarnings("unch

Re: RFR: 8314891: Additional Zip64 extra header validation [v8]

2023-11-08 Thread Lance Andersen
On Wed, 8 Nov 2023 16:27:56 GMT, Eirik Bjorsnos wrote: > @LanceAndersen > > I noticed that this PR did not update `ZipInputStream.readLOC` to perform > consistency validation between expected and actual extra field size and > values. Any particular reason why processing of LOC headers was not

RFR: JDK-8295391: Add discussion of binary <-> decimal conversion issues

2023-11-08 Thread Joe Darcy
Add discussion of some of the common pitfalls related to decimal <-> binary conversion. - Commit messages: - Appease jcheck. - JDK-8295391: Add discussion of binary <-> decimal conversion issues Changes: https://git.openjdk.org/jdk/pull/16566/files Webrev: https://webrevs.openjdk

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Rémi Forax
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote: > This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) src/java.base/share/classes/java/util/stream/GathererOp.java line 95: > 93: public void accept(X x) { > 94: final var b = rightMost; > 95:

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Rémi Forax
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote: > This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) src/java.base/share/classes/java/util/stream/GathererOp.java line 180: > 178: finisher.accept(state, this); > 179: sink.end(); > 180:

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Viktor Klang
On Wed, 8 Nov 2023 17:20:56 GMT, Rémi Forax wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > src/java.base/share/classes/java/util/stream/Gatherer.java line 444: > >> 442: */ >> 443: static Gatherer of( >> 444: Supplier initializer, > > wi

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Viktor Klang
On Wed, 8 Nov 2023 16:39:33 GMT, Tagir F. Valeev wrote: >> That's a good question, and here's my thinking—`scanRight` doesn't make any >> sense for a construct which supports unboundedness, so if we were discussing >> *Collections* I'd be more inclined to agree (but it is more likely that >> r

Re: RFR: 8318915: Enhance checks in BigDecimal.toPlainString() [v2]

2023-11-08 Thread Brian Burkhalter
On Wed, 8 Nov 2023 09:55:13 GMT, Raffaello Giulietti wrote: >> src/java.base/share/classes/java/math/BigDecimal.java line 3510: >> >>> 3508: : intVal.toString(); >>> 3509: int len = str.length() + trailingZeros; >>> 3510: if (len < 0) { >> >> One could u

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Viktor Klang
On Wed, 8 Nov 2023 17:26:35 GMT, Rémi Forax wrote: >> src/java.base/share/classes/java/util/stream/Gatherer.java line 490: >> >>> 488: * more elements sent to it, {@code false} if otherwise >>> 489: */ >>> 490: default boolean isRejecting() { return false; } >>

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Viktor Klang
On Wed, 8 Nov 2023 17:24:45 GMT, Rémi Forax wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > src/java.base/share/classes/java/util/stream/Gatherer.java line 530: > >> 528: * @param the type of results this integrator can produce >> 529: */ >>

Re: RFR: JDK-8295391: Add discussion of binary <-> decimal conversion issues

2023-11-08 Thread Brian Burkhalter
On Wed, 8 Nov 2023 17:29:28 GMT, Joe Darcy wrote: > Add discussion of some of the common pitfalls related to decimal <-> binary > conversion. src/java.base/share/classes/java/lang/Double.java line 212: > 210: * fraction (0.3); but in base 3, 1/3 is exactly > 211: * 0.1(3), that is 1 

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Rémi Forax
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote: > This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) src/java.base/share/classes/java/util/stream/GathererOp.java line 448: > 446: private final long targetSize; > 447: private final Hybrid leftPrede

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Rémi Forax
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote: > This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) src/java.base/share/classes/java/util/stream/GathererOp.java line 232: > 230: */ > 231: @SuppressWarnings("unchecked") > 232: private GathererOp(Gatherer gat

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Rémi Forax
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote: > This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) src/java.base/share/classes/java/util/stream/Gatherers.java line 64: > 62: *needlessly > 63: * 3. allows for more efficient composition and evaluation > 64:

Re: RFR: JDK-8295391: Add discussion of binary <-> decimal conversion issues

2023-11-08 Thread Raffaello Giulietti
On Wed, 8 Nov 2023 17:29:28 GMT, Joe Darcy wrote: > Add discussion of some of the common pitfalls related to decimal <-> binary > conversion. src/java.base/share/classes/java/lang/Double.java line 257: > 255: * // Numeric values listed are exact values > 256: * oneTenthApproxAsFloat = 0.1000

clazz deepclone = new DeepClone().do(object_to_be_copied); JEP 198: Light-Weight JSON API

2023-11-08 Thread Birke Heeren
Hi openjdk, I want to support JEP 198: Light-Weight JSON API with an idea: clazz deepclone = new DeepClone().do(object_to_be_copied); class DeepClone clazz do (clazz object_to_be_copied) { return new JSONDecoder().do(new JsonEncoder().do(object_to_be_copied)); } With kind regards, B

Re: RFR: JDK-8295391: Add discussion of binary <-> decimal conversion issues [v2]

2023-11-08 Thread Joe Darcy
> Add discussion of some of the common pitfalls related to decimal <-> binary > conversion. Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: Address issues found by reviewers. - Changes: - all: https://git.openjdk.org/jdk

RFR: 8306116: Update CLDR to Version 44.0

2023-11-08 Thread Naoto Sato
Upgrading CLDR to v44 (https://cldr.unicode.org/index/downloads/cldr-44). Besides the data upgrade, regression tests are modified to accommodate the following CLDR fixes: CLDR-16534: Suggestion to rename the Islamic Calendar to Hijri Calendar (https://unicode-org.atlassian.net/browse/CLDR-16534

Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs

2023-11-08 Thread Raffaello Giulietti
On Mon, 30 Oct 2023 18:34:44 GMT, Roger Riggs wrote: > Strings, after construction, are immutable but may be constructed from > mutable arrays of bytes, characters, or integers. > The string constructors should guard against the effects of mutating the > arrays during construction that might in

Re: RFR: JDK-8295391: Add discussion of binary <-> decimal conversion issues [v2]

2023-11-08 Thread Joe Darcy
On Wed, 8 Nov 2023 17:54:50 GMT, Brian Burkhalter wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Address issues found by reviewers. > > src/java.base/share/classes/java/lang/Double.java line 212: > >> 210: * fracti

Re: RFR: JDK-8295391: Add discussion of binary <-> decimal conversion issues [v2]

2023-11-08 Thread Joe Darcy
On Wed, 8 Nov 2023 18:09:52 GMT, Raffaello Giulietti wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Address issues found by reviewers. > > src/java.base/share/classes/java/lang/Double.java line 257: > >> 255: * //

Re: RFR: JDK-8295391: Add discussion of binary <-> decimal conversion issues [v2]

2023-11-08 Thread Joe Darcy
On Wed, 8 Nov 2023 18:17:00 GMT, Raffaello Giulietti wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Address issues found by reviewers. > > src/java.base/share/classes/java/lang/Double.java line 287: > >> 285: * le

RFR: 8296250" Update ICU4J to Version 74.1

2023-11-08 Thread Naoto Sato
Updating the ICU4J components to v74.1 (https://icu.unicode.org/download/74). This change completes the Unicode 15.1 upgrade. The change is merely replacing binary data files used for the Nomalization and BiDi support - Commit messages: - update the license file - Merge branch 'ma

Re: RFR: 8306116: Update CLDR to Version 44.0

2023-11-08 Thread Steven Loomis
On Tue, 31 Oct 2023 21:06:13 GMT, Naoto Sato wrote: > Upgrading CLDR to v44 (https://cldr.unicode.org/index/downloads/cldr-44). > Besides the data upgrade, regression tests are modified to accommodate the > following CLDR fixes: > > CLDR-16534: Suggestion to rename the Islamic Calendar to Hijr

Re: RFR: 8306116: Update CLDR to Version 44.0

2023-11-08 Thread Naoto Sato
On Wed, 8 Nov 2023 18:45:47 GMT, Steven Loomis wrote: >> Upgrading CLDR to v44 (https://cldr.unicode.org/index/downloads/cldr-44). >> Besides the data upgrade, regression tests are modified to accommodate the >> following CLDR fixes: >> >> CLDR-16534: Suggestion to rename the Islamic Calendar

Re: RFR: JDK-8295391: Add discussion of binary <-> decimal conversion issues [v2]

2023-11-08 Thread Raffaello Giulietti
On Wed, 8 Nov 2023 18:41:15 GMT, Joe Darcy wrote: >> Add discussion of some of the common pitfalls related to decimal <-> binary >> conversion. > > Joe Darcy has updated the pull request incrementally with one additional > commit since the last revision: > > Address issues found by reviewers

Re: RFR: 8319200: Don't use test thread factory in ProcessTools.createLimitedTestJavaProcessBuilder() [v3]

2023-11-08 Thread Mark Sheppard
On Wed, 8 Nov 2023 02:33:29 GMT, Leonid Mesnik wrote: >> Test thread factory is a mode similar to VM flags and should not be used in >> ProcessTools.createLimitedTestJavaProcessBuilder(). Only >> createTestJavaProcessBuilder() should use it like jtreg VM options. >> >> Adding the test thread f

  1   2   >