Integrated: 8294376: Minimize disabled warnings in java.base

2022-10-04 Thread Magnus Ihse Bursie
On Mon, 26 Sep 2022 15:31:53 GMT, Magnus Ihse Bursie wrote: > After [JDK-8294281](https://bugs.openjdk.org/browse/JDK-8294281), it is now > possible to disable warnings for individual files instead for whole > libraries. I used this opportunity to go through all disabled warnings in > java.bas

Re: Sequenced Collections

2022-10-04 Thread Ernie Rael
Summary of key points (maybe the mail was TL;DR) * SequencedCollection methods addFirst,addLast are the only methods in Collection hierarchy (AFAIK) that might modify the collection and do not return/signal if the collection was modified. Seems like offerFirst,offerLast are more consist

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

2022-10-04 Thread Stuart Marks
On Wed, 5 Oct 2022 03:34:47 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`, and

Re: RFR: 8178355: IdentityHashMap uses identity-based comparison for values everywhere except remove(K,V) and replace(K,V,V) [v6]

2022-10-04 Thread liach
On Wed, 5 Oct 2022 03:40:27 GMT, liach wrote: >> Explicitly implement `remove` and `replace` in `IdentityHashMap` to compare >> values by identity. Updated API documentation of these two methods >> ([Preview](https://cr.openjdk.java.net/~liach/8178355/IdentityHashMap.html#remove(java.lang.Objec

Re: RFR: 8178355: IdentityHashMap uses identity-based comparison for values everywhere except remove(K,V) and replace(K,V,V) [v6]

2022-10-04 Thread liach
> Explicitly implement `remove` and `replace` in `IdentityHashMap` to compare > values by identity. Updated API documentation of these two methods > ([Preview](https://cr.openjdk.java.net/~liach/8178355/IdentityHashMap.html#remove(java.lang.Object,java.lang.Object))) > to mention such behavior.

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

2022-10-04 Thread Stuart Marks
> 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`, and > in the `System` and `Thread` classes. The changes here sho

Re: RFR: 8178355: IdentityHashMap uses identity-based comparison for values everywhere except remove(K,V) and replace(K,V,V) [v4]

2022-10-04 Thread Stuart Marks
On Wed, 31 Aug 2022 05:47:21 GMT, liach wrote: >> liach 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 six additional commits since >> the last

Integrated: JDK-8294539: Augment discussion of equivalence relations on floating-point values

2022-10-04 Thread Joe Darcy
On Thu, 29 Sep 2022 22:14:24 GMT, Joe Darcy wrote: > While the floating-point == operation is *not* an equivalence relation, there > are useful equivalence relations that can be defined over floating-point > values. Text is added to java.lang.Double to discuss and name those relations. This pu

Re: RFR: JDK-8294539: Augment discussion of equivalence relations on floating-point values [v5]

2022-10-04 Thread Paul Sandoz
On Tue, 4 Oct 2022 19:56:21 GMT, Joe Darcy wrote: >> While the floating-point == operation is *not* an equivalence relation, >> there are useful equivalence relations that can be defined over >> floating-point values. Text is added to java.lang.Double to discuss and name >> those relations. >

Re: RFR: JDK-8294539: Augment discussion of equivalence relations on floating-point values [v2]

2022-10-04 Thread Stuart Marks
On Tue, 4 Oct 2022 19:28:24 GMT, Joe Darcy wrote: >> Update as suggested and added some cross-links in from BigDecimal; thanks. > > PS To further spell things out, I added an additional trailing paragraph: > > "For two binary floating-point values a and b, if neither of a and b is zero > or NaN

RFR: 8170389: java.text.DigitList.getDouble() : Controversy between javadoc and code

2022-10-04 Thread Justin Lu
Problem: Outdated doc does not match code. Claimed to throw exception and compared to Long method. Fix: Update doc to match code, compared to Double.parseDouble() accordingly. - Commit messages: - Update java doc to reflect code Changes: https://git.openjdk.org/jdk/pull/10567/files

Re: RFR: JDK-8294539: Augment discussion of equivalence relations on floating-point values [v2]

2022-10-04 Thread Jonathan Gibbons
On Tue, 4 Oct 2022 15:18:08 GMT, Paul Sandoz wrote: >> Before sending out the PR, I used a snippet, but it formatted the code using >> too much vertical space for the definition list. I didn't look to see if >> there was a "compact" styling option that could be used. > > Ok, i am not aware of a

Re: RFR: 8294698: Remove unused 'checkedExceptions' param from MethodAccessorGenerator.generateMethod()

2022-10-04 Thread Сергей Цыпанов
On Sun, 2 Oct 2022 20:45:02 GMT, Сергей Цыпанов wrote: > `checkedExceptions` param of `MethodAccessorGenerator.generateMethod()` is > unused and should be removed in order to prevent allocations from > `Method.getExceptionTypes()` Is it going to be covered with new reflection sometimes? -

Re: RFR: 8294698: Remove unused 'checkedExceptions' param from MethodAccessorGenerator.generateMethod()

2022-10-04 Thread Mandy Chung
On Sun, 2 Oct 2022 20:45:02 GMT, Сергей Цыпанов wrote: > `checkedExceptions` param of `MethodAccessorGenerator.generateMethod()` is > unused and should be removed in order to prevent allocations from > `Method.getExceptionTypes()` Thanks. This is for serialization and not the use of the core

Re: RFR: 8294698: Remove unused 'checkedExceptions' param from MethodAccessorGenerator.generateMethod()

2022-10-04 Thread Сергей Цыпанов
On Tue, 4 Oct 2022 11:55:02 GMT, Claes Redestad wrote: >> @mlchung I can put here a stack trace of the application invoking the code >> if you are interested > > @stsypanov would be helpful to understand when this code still gets executed. > Also note that JEP 416 was integrated in JDK 18 so so

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

2022-10-04 Thread Brent Christian
On Mon, 3 Oct 2022 21:22:03 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 one a

Re: RFR: JDK-8294539: Augment discussion of equivalence relations on floating-point values [v5]

2022-10-04 Thread Joe Darcy
> While the floating-point == operation is *not* an equivalence relation, there > are useful equivalence relations that can be defined over floating-point > values. Text is added to java.lang.Double to discuss and name those relations. Joe Darcy has updated the pull request incrementally with on

Re: RFR: JDK-8294539: Augment discussion of equivalence relations on floating-point values [v2]

2022-10-04 Thread Joe Darcy
On Tue, 4 Oct 2022 05:50:26 GMT, Joe Darcy wrote: >> src/java.base/share/classes/java/lang/Double.java line 181: >> >>> 179: * {@code +0.0} and {@code -0.0} are distinguished from each >>> other. >>> 180: * every bit pattern encoding a NaN is considered equivalent to >>> each other >>> 181

Re: RFR: JDK-8294539: Augment discussion of equivalence relations on floating-point values [v4]

2022-10-04 Thread Joe Darcy
> While the floating-point == operation is *not* an equivalence relation, there > are useful equivalence relations that can be defined over floating-point > values. Text is added to java.lang.Double to discuss and name those relations. Joe Darcy has updated the pull request incrementally with on

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

2022-10-04 Thread Naoto Sato
On Tue, 4 Oct 2022 18:42:52 GMT, Justin Lu wrote: >> src/java.base/share/classes/java/text/DigitList.java line 161: >> >>> 159: public final double getDouble() { >>> 160: if (count == 0) { >>> 161: return 0.0; >> >> The doc for this method is incorrect: >> >> * If (coun

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

2022-10-04 Thread Justin Lu
On Tue, 4 Oct 2022 18:20:26 GMT, Brent Christian wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove temp var >> >> Remove temp variables and replace with method chaining when possible > > src/java.base/share/

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

2022-10-04 Thread Phil Race
On Mon, 3 Oct 2022 20:37:11 GMT, Joe Darcy wrote: >> With the domain change from openjdk.java.net to openjdk.org, references to >> URLs in the sources should be updated. >> >> Updates were made using a shell script. I"ll run a copyright updater before >> any push. > > Joe Darcy has updated the

Re: RFR: JDK-8293701: jdeps InverseDepsAnalyzer runs into NoSuchElementException: No value present [v4]

2022-10-04 Thread Mandy Chung
On Tue, 4 Oct 2022 08:00:21 GMT, Matthias Baesken wrote: >> We noticed that with certain jar file input, jdeps runs into the following >> exception, this happens with jdk11, 17 and 20. >> >> jdeps.exe --multi-release 11 --module-path . --inverse --package >> com.sap.nw.performance.supa.client

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

2022-10-04 Thread Brent Christian
On Mon, 3 Oct 2022 21:22:03 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 one a

Re: RFR: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni [v2]

2022-10-04 Thread Chris Plummer
On Wed, 28 Sep 2022 15:32:11 GMT, Michael Ernst wrote: > The title was edited by someone other than me, as you can see from the PR > history. The PR title needs to match the CR synopsis, so update the CR first, and then update the PR. - PR: https://git.openjdk.org/jdk/pull/10029

Re: RFR: 8284493: Fix rounding error in computeNextExponential [v16]

2022-10-04 Thread Chris Hennick
> This PR improves both the performance of `nextExponential` and `nextGaussian` > and the distribution of output at the tails. It fixes the following > imperfections: > > * Repeatedly adding DoubleZigguratTables.exponentialX0 to extra causes a > rounding error to accumulate at the tail of the d

Integrated: 8293579: tools/jpackage/share/jdk/jpackage/tests/UnicodeArgsTest.java fails on Japanese Windows platform

2022-10-04 Thread KIRIYAMA Takuya
On Fri, 9 Sep 2022 08:30:55 GMT, KIRIYAMA Takuya wrote: > Could you please review the JDK-8293579 bug fixes? > > tools/jpackage/share/jdk/jpackage/tests/UnicodeArgsTest.java attempts to give > the launcher the character which is encoded by Windows API > WideCharToMultiByte() > from UNICODE "é

Re: RFR: 8284493: Fix rounding error in computeNextExponential [v15]

2022-10-04 Thread Chris Hennick
> This PR improves both the performance of `nextExponential` and `nextGaussian` > and the distribution of output at the tails. It fixes the following > imperfections: > > * Repeatedly adding DoubleZigguratTables.exponentialX0 to extra causes a > rounding error to accumulate at the tail of the d

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

2022-10-04 Thread Alan Bateman
On Tue, 4 Oct 2022 15:48:18 GMT, Markus KARG wrote: > As the files are not zero'ed by intention (to detect differences), sparse > won't help, so next you'd eventually run into quota trouble (IIRC we already > had this a year ago). IMHO we should increase RAM a bit further (really, it > is chea

Re: RFR: JDK-8294702 - BufferedInputStream uses undefined value range for markpos

2022-10-04 Thread Alan Bateman
On Tue, 4 Oct 2022 15:44:48 GMT, Markus KARG wrote: >> src/java.base/share/classes/java/io/BufferedInputStream.java line 546: >> >>> 544: private void implReset() throws IOException { >>> 545: getBufIfOpen(); // Cause exception if closed >>> 546: if (markpos == -1) >> >> Jus

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

2022-10-04 Thread Markus KARG
On Sat, 1 Oct 2022 17:54:37 GMT, Markus KARG wrote: > Fixes 8294541 As the files are not zero'ed by intention (to detect differences), sparse won't help, so next you'd eventually run into quota trouble (IIRC we already had this a year ago). IMHO we should increase RAM a bit further (really, it

Re: RFR: JDK-8294702 - BufferedInputStream uses undefined value range for markpos

2022-10-04 Thread Markus KARG
On Tue, 4 Oct 2022 06:55:11 GMT, Alan Bateman wrote: >> Fixes JDK-8294702 > > src/java.base/share/classes/java/io/BufferedInputStream.java line 546: > >> 544: private void implReset() throws IOException { >> 545: getBufIfOpen(); // Cause exception if closed >> 546: if (markpo

Re: RFR: JDK-8294539: Augment discussion of equivalence relations on floating-point values [v3]

2022-10-04 Thread Stuart Marks
On Tue, 4 Oct 2022 05:55:00 GMT, Joe Darcy wrote: >> While the floating-point == operation is *not* an equivalence relation, >> there are useful equivalence relations that can be defined over >> floating-point values. Text is added to java.lang.Double to discuss and name >> those relations. >

Re: RFR: JDK-8294539: Augment discussion of equivalence relations on floating-point values [v2]

2022-10-04 Thread Paul Sandoz
On Tue, 4 Oct 2022 05:26:08 GMT, Joe Darcy wrote: >> src/java.base/share/classes/java/lang/Double.java line 166: >> >>> 164: * equivalence relation for {@code double} values {@code a} and {@code >>> b} is >>> 165: * implemented by the expression >>> 166: * {@code Double.doubleTo}Raw{@code >

Re: RFR: JDK-8289509 : Improve test coverage for XPath Axes: descendant, descendant-or-self, following, following-sibling

2022-10-04 Thread Mahendra Chhipa
On Tue, 4 Oct 2022 13:01:40 GMT, Mahendra Chhipa wrote: > Added test cases for xpath Axis: > 1. descendant > 2. descendant-or-self > 3. following > 4. following-sibling Hi @JoeWang-Java , @bwhuang-us , Could you please review this PR. - PR: https://git.openjdk.org/jdk/pull/10557

RFR: JDK-8289509 : Improve test coverage for XPath Axes: descendant, descendant-or-self, following, following-sibling

2022-10-04 Thread Mahendra Chhipa
Added test cases for xpath Axis: 1. descendant 2. descendant-or-self 3. following 4. following-sibling - Commit messages: - JDK-8289509 : Improve test coverage for XPath Axes: descendant, descendant-or-self - JDK-8289509 : Improve test coverage for XPath Axes: descendant, descenda

Re: RFR: 8291917: Windows - Improve error messages when the C Runtime Libraries or jvm.dll cannot be loaded [v10]

2022-10-04 Thread Julian Waters
On Tue, 4 Oct 2022 12:50:22 GMT, Julian Waters wrote: >> Please review a small patch for dumping the failure reason when the MSVCRT >> libraries or the Java Virtual Machine fails to load on Windows, which can >> provide invaluable insight when debugging related launcher issues. >> >> See https

Re: RFR: 8291917: Windows - Improve error messages when the C Runtime Libraries or jvm.dll cannot be loaded [v10]

2022-10-04 Thread Julian Waters
> Please review a small patch for dumping the failure reason when the MSVCRT > libraries or the Java Virtual Machine fails to load on Windows, which can > provide invaluable insight when debugging related launcher issues. Julian Waters has updated the pull request incrementally with one addition

Re: RFR: 8291917: Windows - Improve error messages when the C Runtime Libraries or jvm.dll cannot be loaded [v9]

2022-10-04 Thread Julian Waters
> Please review a small patch for dumping the failure reason when the MSVCRT > libraries or the Java Virtual Machine fails to load on Windows, which can > provide invaluable insight when debugging related launcher issues. Julian Waters has updated the pull request incrementally with one addition

Re: RFR: 8291917: Windows - Improve error messages when the C Runtime Libraries or jvm.dll cannot be loaded [v8]

2022-10-04 Thread Julian Waters
> Please review a small patch for dumping the failure reason when the MSVCRT > libraries or the Java Virtual Machine fails to load on Windows, which can > provide invaluable insight when debugging related launcher issues. Julian Waters has updated the pull request incrementally with one addition

Re: RFR: 8291917: Windows - Improve error messages when the C Runtime Libraries or jvm.dll cannot be loaded [v7]

2022-10-04 Thread Julian Waters
> Please review a small patch for dumping the failure reason when the MSVCRT > libraries or the Java Virtual Machine fails to load on Windows, which can > provide invaluable insight when debugging related launcher issues. Julian Waters has updated the pull request incrementally with one addition

Re: RFR: 8291917: Windows - Improve error messages when the C Runtime Libraries or jvm.dll cannot be loaded [v6]

2022-10-04 Thread Julian Waters
> Please review a small patch for dumping the failure reason when the MSVCRT > libraries or the Java Virtual Machine fails to load on Windows, which can > provide invaluable insight when debugging related launcher issues. Julian Waters has updated the pull request with a new target base due to a

Re: RFR: 8293579: tools/jpackage/share/jdk/jpackage/tests/UnicodeArgsTest.java fails on Japanese Windows platform [v2]

2022-10-04 Thread KIRIYAMA Takuya
On Wed, 28 Sep 2022 09:45:32 GMT, KIRIYAMA Takuya wrote: >> Could you please review the JDK-8293579 bug fixes? >> >> tools/jpackage/share/jdk/jpackage/tests/UnicodeArgsTest.java attempts to >> give >> the launcher the character which is encoded by Windows API >> WideCharToMultiByte() >> from

Re: RFR: 8292016: Cleanup legacy error reporting in the JDK outside of HotSpot [v35]

2022-10-04 Thread Julian Waters
On Tue, 4 Oct 2022 05:44:27 GMT, David Holmes wrote: > > JNU_ThrowByNameWithStrerror > > JNU_ThrowByNamePerror > > JNU_ThrowIOExceptionWithIOError > > The problem with this kind of naming is that the user of the API for which > these functions are then called, should not have to know anything a

Re: RFR: 8294698: Remove unused 'checkedExceptions' param from MethodAccessorGenerator.generateMethod()

2022-10-04 Thread Claes Redestad
On Tue, 4 Oct 2022 11:41:31 GMT, Сергей Цыпанов wrote: >>> I agree that getting rid of the clone can help -- but since [JEP >>> 416](https://openjdk.org/jeps/416) the generators modified here is mostly a >>> fallback and the bulk of the use will use `MethodHandles` (unless you >>> disable JEP

Re: RFR: 8294698: Remove unused 'checkedExceptions' param from MethodAccessorGenerator.generateMethod()

2022-10-04 Thread Сергей Цыпанов
On Mon, 3 Oct 2022 16:44:56 GMT, Mandy Chung wrote: >> I agree that getting rid of the clone can help -- but since [JEP >> 416](https://openjdk.org/jeps/416) the generators modified here is mostly a >> fallback and the bulk of the use will use `MethodHandles` (unless you >> disable JEP 416 and

Integrated: 8294509: The sign extension bug applies to 'public static int[] convertSeedBytesToInts(byte[] seed, int n, int z)' in RandomSupport

2022-10-04 Thread Raffaello Giulietti
On Mon, 3 Oct 2022 09:45:23 GMT, Raffaello Giulietti wrote: > Fixes sign extension propagation to higher bits. This pull request has now been integrated. Changeset: 5a9cd336 Author:Raffaello Giulietti URL: https://git.openjdk.org/jdk/commit/5a9cd33632862aa2249794902d4168a7fe143054

Re: RFR: 8294509: The sign extension bug applies to 'public static int[] convertSeedBytesToInts(byte[] seed, int n, int z)' in RandomSupport

2022-10-04 Thread Aleksey Shipilev
On Mon, 3 Oct 2022 09:45:23 GMT, Raffaello Giulietti wrote: > Fixes sign extension propagation to higher bits. This looks good! Remarkably, SonarCloud reports the bug on this line ("Prevent "int" promotion by adding '& 0xff' to this expression"), but I skipped it when generating the reports,

Re: RFR: 8289552: Make intrinsic conversions between bit representations of half precision values and floats [v11]

2022-10-04 Thread Quan Anh Mai
On Tue, 4 Oct 2022 06:49:53 GMT, Jatin Bhateja wrote: >> @merykitty Thanks for the suggestion. I will update the instruct to use >> kmovwl. I will also experiment with kshiftrw and let you know. > >> You can use `kmovwl` instead which will relax the avx512bw constraint, >> however, you will nee

Re: RFR: JDK-8293701: jdeps InverseDepsAnalyzer runs into NoSuchElementException: No value present [v3]

2022-10-04 Thread Matthias Baesken
On Fri, 30 Sep 2022 10:51:53 GMT, Matthias Baesken wrote: >> We noticed that with certain jar file input, jdeps runs into the following >> exception, this happens with jdk11, 17 and 20. >> >> jdeps.exe --multi-release 11 --module-path . --inverse --package >> com.sap.nw.performance.supa.client

Re: RFR: JDK-8293701: jdeps InverseDepsAnalyzer runs into NoSuchElementException: No value present [v4]

2022-10-04 Thread Matthias Baesken
> We noticed that with certain jar file input, jdeps runs into the following > exception, this happens with jdk11, 17 and 20. > > jdeps.exe --multi-release 11 --module-path . --inverse --package > com.sap.nw.performance.supa.client test.jar > > Inverse transitive dependences matching packages