Re: RFR: 8283237: CallSite should be a sealed class

2022-03-16 Thread Johannes Kuhn
On Wed, 16 Mar 2022 13:09:30 GMT, liach wrote: > Change `CallSite` to a sealed class, as `CallSite` is an abstract class which > does not allow direct subclassing by users per its documentation. Since I > don't have a JBS account, I posted the content for the CSR in a GitHub Gist > at

Withdrawn: 8283067: Incorrect comment in java.base/share/classes/java/util/ArrayList.java

2022-03-16 Thread xpbob
On Sat, 12 Mar 2022 09:48:14 GMT, xpbob wrote: > * Constructs an empty list with an initial capacity of ten > > => > > * Constructs an empty list with default sized empty instances. > > > private static final Object[] DEFAULTCAPACITY_EMPTY_ELEMENTDATA = {}; > >

Re: RFR: 8281631: HashMap copy constructor and putAll can over-allocate table [v34]

2022-03-16 Thread XenoAmess
On Thu, 17 Mar 2022 03:09:53 GMT, Stuart Marks wrote: > There's already a bug for this: > [JDK-8186958](https://bugs.openjdk.java.net/browse/JDK-8186958). This > includes creating a new API as well as fixing up a bunch of call sites. > There's a partial list of call sites in java.base there.

Re: RFR: 8281631: HashMap copy constructor and putAll can over-allocate table [v34]

2022-03-16 Thread Stuart Marks
On Sat, 12 Mar 2022 01:35:23 GMT, XenoAmess wrote: >> 8281631: HashMap copy constructor and putAll can over-allocate table > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > refine test There's already a bug for this:

Questions about Java Floating Point and StrictMath alteration in JRE.

2022-03-16 Thread A Z
To core-libs-dev, Raffaello has said: 'Let's get rid of binary floating-point arithmetic in Java, after 27 years of honorable service! Let's adopt decimal floating-point arithmetic, where 1 / 3 + 1 / 3 is still different from 2 / 3, but who cares?' I am not suggesting that we get rid of

Re: RFR: 8257733: Move module-specific data from make to respective module [v9]

2022-03-16 Thread Weijun Wang
On Thu, 17 Mar 2022 00:12:38 GMT, Magnus Ihse Bursie wrote: >> A lot (but not all) of the data in make/data is tied to a specific module. >> For instance, the publicsuffixlist is used by java.base, and fontconfig by >> java.desktop. (A few directories, like mainmanifest, is *actually* used by

Re: RFR: 8257733: Move module-specific data from make to respective module [v2]

2022-03-16 Thread Magnus Ihse Bursie
On Wed, 16 Dec 2020 18:34:37 GMT, Naoto Sato wrote: >>> @AlanBateman The process of modularization was not fully completed with >>> Project Jigsaw, and a few ugly warts remained. I was under the impression >>> that these should be addressed in follow-up fixes, but this was >>> unfortunately

Re: RFR: 8257733: Move module-specific data from make to respective module [v9]

2022-03-16 Thread Magnus Ihse Bursie
> A lot (but not all) of the data in make/data is tied to a specific module. > For instance, the publicsuffixlist is used by java.base, and fontconfig by > java.desktop. (A few directories, like mainmanifest, is *actually* used by > make for the whole build.) > > These data files should move

Re: RFR: 8257733: Move module-specific data from make to respective module [v8]

2022-03-16 Thread Magnus Ihse Bursie
> A lot (but not all) of the data in make/data is tied to a specific module. > For instance, the publicsuffixlist is used by java.base, and fontconfig by > java.desktop. (A few directories, like mainmanifest, is *actually* used by > make for the whole build.) > > These data files should move

Re: RFR: 8257733: Move module-specific data from make to respective module [v7]

2022-03-16 Thread Magnus Ihse Bursie
> A lot (but not all) of the data in make/data is tied to a specific module. > For instance, the publicsuffixlist is used by java.base, and fontconfig by > java.desktop. (A few directories, like mainmanifest, is *actually* used by > make for the whole build.) > > These data files should move

RFR: JDK-8283280: Improve exception messages with -Dsun.misc.URLClassPath.disableJarChecking=false

2022-03-16 Thread Liam Miller-Cushon
This change improves an exception message to include a path, e.g. `Invalid Jar file: some.jar` instead of just `Invalid Jar file`. The exception is currently [always being caught and

Re: RFR: 8257733: Move module-specific data from make to respective module [v6]

2022-03-16 Thread Naoto Sato
On Wed, 16 Mar 2022 21:56:53 GMT, Magnus Ihse Bursie wrote: >> make/modules/jdk.charsets/Gensrc.gmk line 32: >> >>> 30: # Generate files using the charsetmapping tool >>> 31: # >>> 32: CHARSET_DATA_DIR := $(TOPDIR)/src/java.base/share/data/charsetmapping >> >> Is it intentional to leave

Re: RFR: 8257733: Move module-specific data from make to respective module [v6]

2022-03-16 Thread Magnus Ihse Bursie
On Wed, 16 Mar 2022 21:31:08 GMT, Naoto Sato wrote: >> Magnus Ihse Bursie has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 12 commits: >> >> - Merge branch 'master' into shuffle-data-reborn >> - Fix merge >> - Merge tag

RFR: 8283287: Spring Cleaning for ClassLoader.c

2022-03-16 Thread Tyler Steele
As mentioned in the issue, I'd like to perform the following tidying on ClassLoader.c - Alphabetize includes. - Replace 'if (ptr == 0)' with 'if (ptr == NULL)'. - Replace 'return 0' with 'return NULL'. - Commit messages: - Perform minor clean up ClassLoader.c Changes:

Re: RFR: 8280400: JDK 19 L10n resource files update - msgdrop 10 [v4]

2022-03-16 Thread Naoto Sato
On Wed, 16 Mar 2022 18:31:55 GMT, Alisen Chung wrote: >> msg drop for jdk19, Mar 9, 2022 > > Alisen Chung has updated the pull request incrementally with one additional > commit since the last revision: > > removed incorrect translation of compiler configuration file LGTM. Thanks for the

Re: RFR: 8257733: Move module-specific data from make to respective module [v6]

2022-03-16 Thread Naoto Sato
On Tue, 15 Mar 2022 23:50:20 GMT, Magnus Ihse Bursie wrote: >> A lot (but not all) of the data in make/data is tied to a specific module. >> For instance, the publicsuffixlist is used by java.base, and fontconfig by >> java.desktop. (A few directories, like mainmanifest, is *actually* used by

Re: RFR: 8283225: [AIX] ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 [v2]

2022-03-16 Thread Tyler Steele
On Wed, 16 Mar 2022 21:06:04 GMT, Roger Riggs wrote: >> Hmm, maybe I misunderstand the idea behind this bug tag. Don't we want to >> list the bug ids of any issues the test caught? > > Usually, the bug number implies the test was modified to cover the issue. > Otherwise, we end up with very

Re: RFR: 8283225: [AIX] ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 [v3]

2022-03-16 Thread Tyler Steele
On Wed, 16 Mar 2022 21:10:14 GMT, Tyler Steele wrote: >> As described in the linked issue, NullClassBytesTest fails due an >> OutOfMemoryError produced on AIX when the test calls defineClass with a byte >> array of size of 0. The native implementation of defineClass then calls >> malloc with

Re: RFR: 8283225: [AIX] ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 [v2]

2022-03-16 Thread Roger Riggs
On Wed, 16 Mar 2022 20:44:04 GMT, Tyler Steele wrote: >> test/hotspot/jtreg/runtime/DefineClass/NullClassBytesTest.java line 26: >> >>> 24: /* >>> 25: * @test >>> 26: * @bug 8262913 8283225 >> >> All of the changes can be removed from NullClassBytesTest.java. (copyright >> and bug #) > >

Re: RFR: 8283225: [AIX] ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 [v3]

2022-03-16 Thread Tyler Steele
> As described in the linked issue, NullClassBytesTest fails due an > OutOfMemoryError produced on AIX when the test calls defineClass with a byte > array of size of 0. The native implementation of defineClass then calls > malloc with a size of 0. On AIX malloc(0) returns NULL, while on other

Re: Java float, double, StrictMath correction?

2022-03-16 Thread Joseph D. Darcy
On 3/15/2022 6:11 PM, A Z wrote: [snip] Raffaello has said: 'Exact representation of 0.1 using base 2 is mathematically impossible, no matter the language (it is a periodic number in base 2).' Consideration of the article: https://people.eecs.berkeley.edu/~wkahan/JAVAhurt.pdf Which is

Re: RFR: 8283225: [AIX] ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 [v2]

2022-03-16 Thread Tyler Steele
On Wed, 16 Mar 2022 20:19:08 GMT, Roger Riggs wrote: >> Tyler Steele has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - Fixes type warning. >> - Removes unneeded ClassFormatError from ClassLoader.c >> - Revert "Extract memory error

Re: RFR: 8283225: [AIX] ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 [v2]

2022-03-16 Thread Tyler Steele
On Wed, 16 Mar 2022 20:17:50 GMT, Roger Riggs wrote: >> Tyler Steele has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - Fixes type warning. >> - Removes unneeded ClassFormatError from ClassLoader.c >> - Revert "Extract memory error

Re: RFR: 8283225: [AIX] ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 [v2]

2022-03-16 Thread Roger Riggs
On Wed, 16 Mar 2022 17:45:16 GMT, Tyler Steele wrote: >> As described in the linked issue, NullClassBytesTest fails due an >> OutOfMemoryError produced on AIX when the test calls defineClass with a byte >> array of size of 0. The native implementation of defineClass then calls >> malloc with

Re: RFR: 8257733: Move module-specific data from make to respective module [v6]

2022-03-16 Thread Alan Bateman
On 16/03/2022 08:44, Magnus Ihse Bursie wrote: : If you have such strong opinions on the data files shared between java.base and jdk.charsets/jdk.localedata, I propose we leave them in make/data for the time being, clean up the associated mess, and then work out where they actually should

Re: RFR: 8257733: Move module-specific data from make to respective module [v6]

2022-03-16 Thread Magnus Ihse Bursie
On Tue, 15 Mar 2022 23:50:20 GMT, Magnus Ihse Bursie wrote: >> A lot (but not all) of the data in make/data is tied to a specific module. >> For instance, the publicsuffixlist is used by java.base, and fontconfig by >> java.desktop. (A few directories, like mainmanifest, is *actually* used by

Re: RFR: 8280400: JDK 19 L10n resource files update - msgdrop 10 [v4]

2022-03-16 Thread Alisen Chung
> msg drop for jdk19, Mar 9, 2022 Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: removed incorrect translation of compiler configuration file - Changes: - all: https://git.openjdk.java.net/jdk/pull/7765/files -

Re: RFR: 8283225: [AIX] ClassLoader.c produces incorrect OutOfMemory Exception when length is 0

2022-03-16 Thread Tyler Steele
On Wed, 16 Mar 2022 14:38:55 GMT, Thomas Stuefe wrote: >> As described in the linked issue, NullClassBytesTest fails due an >> OutOfMemoryError produced on AIX when the test calls defineClass with a byte >> array of size of 0. The native implementation of defineClass then calls >> malloc

Re: RFR: 8283225: [AIX] ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 [v2]

2022-03-16 Thread Tyler Steele
On Wed, 16 Mar 2022 14:37:57 GMT, Thomas Stuefe wrote: > Side note: nothing against changing 0 to NULL, but please in a separate > cleanup patch. I just saw this. I will separate the cleanup into a separate patch. - PR: https://git.openjdk.java.net/jdk/pull/7829

Re: RFR: 8283225: [AIX] ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 [v2]

2022-03-16 Thread Tyler Steele
> As described in the linked issue, NullClassBytesTest fails due an > OutOfMemoryError produced on AIX when the test calls defineClass with a byte > array of size of 0. The native implementation of defineClass then calls > malloc with a size of 0. On AIX malloc(0) returns NULL, while on other

Re: RFR: JDK-8283274: Improve @jvms usage in java.base

2022-03-16 Thread Iris Clark
On Wed, 16 Mar 2022 16:57:12 GMT, Joe Darcy wrote: > As was done for JLS references under JDK-8283234, now the analogous update > for JVMS references. Marked as reviewed by iris (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/7844

Re: RFR: 8281631: HashMap copy constructor and putAll can over-allocate table [v34]

2022-03-16 Thread XenoAmess
On Wed, 16 Mar 2022 16:46:58 GMT, Stuart Marks wrote: > No, you don't need to do any rebasing; when the change is integrated, all > these commits will automatically be squashed into a single commit. If that > can't be done, the bot will detect it and give a warning, which will probably >

Re: RFR: 8257733: Move module-specific data from make to respective module [v6]

2022-03-16 Thread Phil Race
On Tue, 15 Mar 2022 23:50:20 GMT, Magnus Ihse Bursie wrote: >> A lot (but not all) of the data in make/data is tied to a specific module. >> For instance, the publicsuffixlist is used by java.base, and fontconfig by >> java.desktop. (A few directories, like mainmanifest, is *actually* used by

Re: RFR: JDK-8277520: Implement JDK-8 default methods for IdentityHashMap [v4]

2022-03-16 Thread liach
On Mon, 21 Feb 2022 23:36:19 GMT, liach wrote: >> Might need a CSR as now `computeIfAbsent` `computeIfPresent` `compute` >> `merge` would throw CME if the functions modified the map itself, and there >> are corresponding specification changes. > > liach has updated the pull request

RFR: JDK-8283274: Improve @jvms usage in java.base

2022-03-16 Thread Joe Darcy
As was done for JLS references under JDK-8283234, now the analogous update for JVMS references. - Commit messages: - JDK-8283274: Improve @jvms usage in java.base Changes: https://git.openjdk.java.net/jdk/pull/7844/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=7844=00

Re: RFR: 8279598: Provide adapter from RandomGenerator to Random [v19]

2022-03-16 Thread Stuart Marks
On Wed, 16 Mar 2022 14:54:41 GMT, Yasser Bazzi wrote: >> Hi, could i get a review on this implementation proposed by Stuart Marks, i >> decided to use the >> https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/RandomGenerator.html >> interface to create the default

Integrated: 8281631: HashMap copy constructor and putAll can over-allocate table

2022-03-16 Thread XenoAmess
On Thu, 10 Feb 2022 17:46:36 GMT, XenoAmess wrote: > 8281631: HashMap copy constructor and putAll can over-allocate table This pull request has now been integrated. Changeset: 3e393047 Author:XenoAmess Committer: Stuart Marks URL:

Re: RFR: 8278794: Infinite loop in DeflaterOutputStream.finish() [v2]

2022-03-16 Thread Lance Andersen
On Wed, 16 Mar 2022 16:34:37 GMT, Ravi Reddy wrote: >> Hi All, >> >> This review request contains fix for infinite loop issue in >> DeflaterOutputStream.finish() in an exception scenario. >> 1. The issue is with 'finished' flag not getting set to correct value when >> there is an IOException

Re: RFR: 8281631: HashMap copy constructor and putAll can over-allocate table [v34]

2022-03-16 Thread Stuart Marks
On Sat, 12 Mar 2022 01:35:23 GMT, XenoAmess wrote: >> 8281631: HashMap copy constructor and putAll can over-allocate table > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > refine test No, you don't need to do any rebasing;

Re: RFR: 8278794: Infinite loop in DeflaterOutputStream.finish() [v2]

2022-03-16 Thread Ravi Reddy
On Wed, 16 Mar 2022 11:59:44 GMT, Sean Coffey wrote: >> Ravi Reddy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Modified write(byte []b) to write(byte[] b) to maintain same signature >> across the test case > >

Re: RFR: 8278794: Infinite loop in DeflaterOutputStream.finish() [v2]

2022-03-16 Thread Ravi Reddy
> Hi All, > > This review request contains fix for infinite loop issue in > DeflaterOutputStream.finish() in an exception scenario. > 1. The issue is with 'finished' flag not getting set to correct value when > there is an IOException in > DeflaterOutputStream.finish() which will result in

Re: RFR: 8278794: Infinite loop in DeflaterOutputStream.finish() [v2]

2022-03-16 Thread Sean Coffey
On Wed, 16 Mar 2022 16:31:36 GMT, Ravi Reddy wrote: >> Hi All, >> >> This review request contains fix for infinite loop issue in >> DeflaterOutputStream.finish() in an exception scenario. >> 1. The issue is with 'finished' flag not getting set to correct value when >> there is an IOException

Integrated: JDK-8283234: Improve @jls usage in java.base

2022-03-16 Thread Joe Darcy
On Wed, 16 Mar 2022 03:03:23 GMT, Joe Darcy wrote: > Checking the java.bases sources revealed a number of other instances where > conceptual links into the JLS (or JVMS) could be upgraded to actual links. This pull request has now been integrated. Changeset: 0cf291bc Author:Joe Darcy

Re: RFR: 8283225: [AIX] ClassLoader.c produces incorrect OutOfMemory Exception when length is 0

2022-03-16 Thread Tyler Steele
On Wed, 16 Mar 2022 14:38:55 GMT, Thomas Stuefe wrote: > Btw, which malloc call was the problematic exactly? Cannot be the one in > getUTF, since that one already adds len + 1 and never gets called with a zero > length anyway. Oh, good point. I guess it gets lost in the noise of my other

Re: RFR: 8283225: [AIX] ClassLoader.c produces incorrect OutOfMemory Exception when length is 0

2022-03-16 Thread Tyler Steele
On Wed, 16 Mar 2022 14:37:57 GMT, Thomas Stuefe wrote: > The way we solve this usually is by homogenizing malloc behavior across all > platforms with `if (len == 0) len=1;` Interesting! That idea didn't occur to me until after I submitted the PR. I'm happy to test that out and see how it

Re: RFR: 8279598: Provide adapter from RandomGenerator to Random [v18]

2022-03-16 Thread Yasser Bazzi
On Wed, 16 Mar 2022 06:51:37 GMT, Stuart Marks wrote: >> Yasser Bazzi has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix SplittableRandomTest. > > src/java.base/share/classes/java/util/Random.java line 320: > >> 318: * @param

Re: RFR: 8279598: Provide adapter from RandomGenerator to Random [v19]

2022-03-16 Thread Yasser Bazzi
> Hi, could i get a review on this implementation proposed by Stuart Marks, i > decided to use the > https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/RandomGenerator.html > interface to create the default method `asRandom()` that wraps around the > newer algorithms

Re: RFR: 8283225: [AIX] ClassLoader.c produces incorrect OutOfMemory Exception when length is 0

2022-03-16 Thread Thomas Stuefe
On Tue, 15 Mar 2022 22:58:48 GMT, Tyler Steele wrote: > As described in the linked issue, NullClassBytesTest fails due an > OutOfMemoryError produced on AIX when the test calls defineClass with a byte > array of size of 0. The native implementation of defineClass then calls > malloc with a

RFR: 8283237: CallSite should be a sealed class

2022-03-16 Thread liach
Change `CallSite` to a sealed class, as `CallSite` is an abstract class which does not allow direct subclassing by users per its documentation. Since I don't have a JBS account, I posted the content for the CSR in a GitHub Gist at https://gist.github.com/150d5aa7f8b13a4deddf95969ad39d73 and

Re: RFR: 8278794: Infinite loop in DeflaterOutputStream.finish()

2022-03-16 Thread Sean Coffey
On Sun, 13 Mar 2022 14:08:57 GMT, Ravi Reddy wrote: > Hi All, > > This review request contains fix for infinite loop issue in > DeflaterOutputStream.finish() in an exception scenario. > 1. The issue is with 'finished' flag not getting set to correct value when > there is an IOException in >

Re: Java floating point and StrictMath improvement?

2022-03-16 Thread Andrew Dinn
On 16/03/2022 09:56, Raffaello Giulietti wrote: "Computer scientists of the world, unite! Let's get rid of binary floating-point arithmetic in Java, after 27 years of honorable service! Let's adopt decimal floating-point arithmetic, where 1 / 3 + 1 / 3 is still different from 2 / 3, but who

Re: Java floating point and StrictMath improvement?

2022-03-16 Thread Raffaello Giulietti
"Computer scientists of the world, unite! Let's get rid of binary floating-point arithmetic in Java, after 27 years of honorable service! Let's adopt decimal floating-point arithmetic, where 1 / 3 + 1 / 3 is still different from 2 / 3, but who cares? At least we have 0.1 * 0.1 = 0.01, as

Re: RFR: 8257733: Move module-specific data from make to respective module [v6]

2022-03-16 Thread Magnus Ihse Bursie
On 2022-03-16 07:31, Alan Bateman wrote: Magnus, This proposal does not address the previous concerns. As before, you are proposing to put the data files used to generate the classes for jdk.localedata and jdk.charsets into src/java.base and I don't think we should do that. I really think

Re: RFR: 8281631: HashMap copy constructor and putAll can over-allocate table [v33]

2022-03-16 Thread XenoAmess
On Fri, 11 Mar 2022 19:40:39 GMT, Stuart Marks wrote: >> XenoAmess has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - change KeyStructure to String >> - fix test > > Regarding the number of test cases for `tableSizeForCases` and >

Re: RFR: 8279598: Provide adapter from RandomGenerator to Random [v18]

2022-03-16 Thread Stuart Marks
On Tue, 15 Mar 2022 23:18:24 GMT, Yasser Bazzi wrote: >> Hi, could i get a review on this implementation proposed by Stuart Marks, i >> decided to use the >> https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/RandomGenerator.html >> interface to create the default

Re: RFR: 8281631: HashMap copy constructor and putAll can over-allocate table [v34]

2022-03-16 Thread Stuart Marks
On Sat, 12 Mar 2022 01:35:23 GMT, XenoAmess wrote: >> 8281631: HashMap copy constructor and putAll can over-allocate table > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > refine test > what I worried is, the boundary this is

Re: RFR: 8257733: Move module-specific data from make to respective module [v6]

2022-03-16 Thread Alan Bateman
Magnus, This proposal does not address the previous concerns. As before, you are proposing to put the data files used to generate the classes for jdk.localedata and jdk.charsets into src/java.base and I don't think we should do that. I really think this PR needs to be withdraw n or closed