Re: RFR: 8299513: Cleanup java.io [v4]

2023-01-09 Thread Alan Bateman
On Tue, 10 Jan 2023 00:26:13 GMT, Sergey Bylokhov wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add additional (c) years > > src/java.base/share/classes/java/io/DataInputStream.java line 582: > >> 580: * @se

Re: RFR: 8298735: Some tools/jpackage/windows/* tests fails with jtreg test timeout

2023-01-09 Thread Alexander Matveev
On Mon, 9 Jan 2023 22:53:18 GMT, Alexey Semenyuk wrote: > Increase failed test timeouts. > Simple tests got an x1.5 increase and parametrized tests got an x2 increase Marked as reviewed by almatvee (Reviewer). - PR: https://git.openjdk.org/jdk/pull/11914

Re: RFR: 8299278: tools/jpackage/share/AddLauncherTest.java#id1 failed AddLauncherTest.bug8230933

2023-01-09 Thread Alexander Matveev
On Thu, 5 Jan 2023 20:10:45 GMT, Alexey Semenyuk wrote: > 8299278: tools/jpackage/share/AddLauncherTest.java#id1 failed > AddLauncherTest.bug8230933 Marked as reviewed by almatvee (Reviewer). - PR: https://git.openjdk.org/jdk/pull/11868

Re: RFR: 8283660: Convert com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java finalizer to Cleaner [v16]

2023-01-09 Thread Stuart Marks
On Fri, 22 Jul 2022 20:51:59 GMT, Brent Christian wrote: >> Please review this change to replace the finalizer in >> `AbstractLdapNamingEnumeration` with a Cleaner. >> >> The pieces of state required for cleanup (`LdapCtx homeCtx`, `LdapResult >> res`, and `LdapClient enumClnt`) are moved to a

Re: RFR: 8299836: Make `user.timezone` system property searchable [v2]

2023-01-09 Thread Jaikiran Pai
On Tue, 10 Jan 2023 01:34:53 GMT, Jaikiran Pai wrote: > but you may want to check how it "reads" on the generated javadoc index page > for system properties. For clarity, I meant the page where you will see all the system properties - there's a "Index" on top of the javadoc API page https://d

Re: RFR: 8299183: Invokers.checkExactType passes parameters to create WMTE in opposite order [v3]

2023-01-09 Thread Jaikiran Pai
On Mon, 9 Jan 2023 18:15:42 GMT, Mandy Chung wrote: >> Trivial fix. Fix `Invokers.checkExactType` to call >> `newWrongMethodTypeException(actual, expected)` with parameters in right >> order. > > Mandy Chung has updated the pull request incrementally with one additional > commit since the las

Integrated: 8297306: Incorrect brackets in Javadoc for a constructor of IteratorSpliterator

2023-01-09 Thread Jaikiran Pai
On Fri, 6 Jan 2023 06:35:31 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which fixes an issue in the javadoc > text of the internal class IteratorSpliterator? This addresses the issue > reported at https://bugs.openjdk.org/browse/JDK-8297306. This pull request has now b

Re: RFR: 8297306: Incorrect brackets in Javadoc for a constructor of IteratorSpliterator [v2]

2023-01-09 Thread Jaikiran Pai
On Mon, 9 Jan 2023 01:09:04 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which fixes an issue in the javadoc >> text of the internal class IteratorSpliterator? This addresses the issue >> reported at https://bugs.openjdk.org/browse/JDK-8297306. > > Jaikiran Pai has upda

Re: RFR: 8299836: Make `user.timezone` system property searchable [v2]

2023-01-09 Thread Jaikiran Pai
On Tue, 10 Jan 2023 00:46:35 GMT, Justin Lu wrote: >> The system property _user.timezone_ is specified in the >> _TimeZone.getDefault()_ and _TimeZone.setDefault()_ methods. The javadoc >> search box should be able to match on the system property name. >> >> This change replaces the **@code**

Re: RFR: 8299836: Make `user.timezone` system property searchable [v2]

2023-01-09 Thread Jaikiran Pai
On Tue, 10 Jan 2023 00:42:22 GMT, Justin Lu wrote: >> src/java.base/share/classes/java/util/TimeZone.java line 634: >> >>> 632: * >>> 633: * >>> 634: * Use the {@systemProperty user.timezone} property value as >>> the default >> >> I'd only modify this location and keep others

Re: RFR: 8299498: Usage of constructors of primitive wrapper classes should be avoided in java.lang API docs

2023-01-09 Thread Justin Lu
On Tue, 10 Jan 2023 01:14:14 GMT, Mandy Chung wrote: > It'd be good to update the javadoc of `Byte.valueOf(String s)` and > `Byte.valueOf(String s, int radix)` to replace `new Byte(...)` with > `Byte.valueOf`. Thanks for spotting that, I will also add those changes into this PR. -

Re: RFR: 8283660: Convert com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java finalizer to Cleaner [v16]

2023-01-09 Thread Brent Christian
On Fri, 22 Jul 2022 20:51:59 GMT, Brent Christian wrote: >> Please review this change to replace the finalizer in >> `AbstractLdapNamingEnumeration` with a Cleaner. >> >> The pieces of state required for cleanup (`LdapCtx homeCtx`, `LdapResult >> res`, and `LdapClient enumClnt`) are moved to a

Re: RFR: 8299498: Usage of constructors of primitive wrapper classes should be avoided in java.lang API docs

2023-01-09 Thread Mandy Chung
On Mon, 9 Jan 2023 21:46:49 GMT, Justin Lu wrote: > The javadocs of the following methods used deprecated constructors of the > primitive wrapper classes: > > java.lang.ArrayStoreException > java.lang.ClassCastException > java.lang.Double.compare(double, double) > java.lang.Float.compare(float,

Re: RFR: 8299498: Usage of constructors of primitive wrapper classes should be avoided in java.lang API docs

2023-01-09 Thread Joe Darcy
On Mon, 9 Jan 2023 21:46:49 GMT, Justin Lu wrote: > The javadocs of the following methods used deprecated constructors of the > primitive wrapper classes: > > java.lang.ArrayStoreException > java.lang.ClassCastException > java.lang.Double.compare(double, double) > java.lang.Float.compare(float,

Re: RFR: 8299836: Make `user.timezone` system property searchable [v2]

2023-01-09 Thread Justin Lu
On Tue, 10 Jan 2023 00:31:55 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Toggle first instance as a system property, revert rest > > src/java.base/share/classes/java/util/TimeZone.java line 634: >

Re: RFR: 8299836: Make `user.timezone` system property searchable [v2]

2023-01-09 Thread Justin Lu
> The system property _user.timezone_ is specified in the > _TimeZone.getDefault()_ and _TimeZone.setDefault()_ methods. The javadoc > search box should be able to match on the system property name. > > This change replaces the **@code** tag with the **@systemProperty** tag for > instances of

Re: RFR: 8299836: Make `user.timezone` system property searchable

2023-01-09 Thread Naoto Sato
On Mon, 9 Jan 2023 23:59:19 GMT, Justin Lu wrote: > The system property _user.timezone_ is specified in the > _TimeZone.getDefault()_ and _TimeZone.setDefault()_ methods. The javadoc > search box should be able to match on the system property name. > > This change replaces the **@code** tag w

Re: RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v18]

2023-01-09 Thread Sandhya Viswanathan
On Mon, 9 Jan 2023 23:13:29 GMT, Claes Redestad wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Explicitly lea external address > > Explicitly loading the address to a register seems to do the trick, avoiding >

Re: RFR: 8299513: Cleanup java.io [v4]

2023-01-09 Thread Sergey Bylokhov
On Mon, 9 Jan 2023 08:57:11 GMT, Per Minborg wrote: >> Code in java.io contains many legacy constructs and semantics not >> recommended including: >> >> * C-style array declaration >> * Unnecessary visibility >> * Redundant keywords in interfaces (e.g. public, static) >> * Non-standard nami

RFR: 8299836: Make `user.timezone` system property searchable

2023-01-09 Thread Justin Lu
The system property _user.timezone_ is specified in the _TimeZone.getDefault()_ and _TimeZone.setDefault()_ methods. The javadoc search box should be able to match on the system property name. This change replaces the **@code** tag with the **@systemProperty** tag for instances of _user.timezo

Re: RFR: 8299498: Usage of constructors of primitive wrapper classes should be avoided in java.lang API docs

2023-01-09 Thread Naoto Sato
On Mon, 9 Jan 2023 21:46:49 GMT, Justin Lu wrote: > The javadocs of the following methods used deprecated constructors of the > primitive wrapper classes: > > java.lang.ArrayStoreException > java.lang.ClassCastException > java.lang.Double.compare(double, double) > java.lang.Float.compare(float,

Integrated: Merge jdk20

2023-01-09 Thread Jesper Wilhelmsson
On Mon, 9 Jan 2023 22:22:11 GMT, Jesper Wilhelmsson wrote: > Forwardport JDK 20 -> JDK 21 This pull request has now been integrated. Changeset: 4395578b Author:Jesper Wilhelmsson URL: https://git.openjdk.org/jdk/commit/4395578b6f0432d158c4b6c0c0a9d0838f74baa8 Stats: 48 lines in

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v2]

2023-01-09 Thread Serguei Spitsyn
On Wed, 23 Nov 2022 10:14:23 GMT, Serguei Spitsyn wrote: >> This problem has two sides. >> One is that the `VirtualThread::run() `cashes the field `notifyJvmtiEvents` >> value. >> It caused the native method `notifyJvmtiUnmountBegin()` not called after the >> field `notifyJvmtiEvents` >> value

Re: RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v18]

2023-01-09 Thread Claes Redestad
On Mon, 9 Jan 2023 16:49:25 GMT, Claes Redestad wrote: >> Continuing the work initiated by @luhenry to unroll and then intrinsify >> polynomial hash loops. >> >> I've rewired the library changes to route via a single `@IntrinsicCandidate` >> method. To make this work I've harmonized how they a

RFR: 8298735: Some tools/jpackage/windows/* tests fails with jtreg test timeout

2023-01-09 Thread Alexey Semenyuk
Increase failed test timeouts. Simple tests got an x1.5 increase and parametrized tests got an x2 increase - Commit messages: - 8298735: Some tools/jpackage/windows/* tests fails with jtreg test timeout Changes: https://git.openjdk.org/jdk/pull/11914/files Webrev: https://webrevs.o

Re: jpackageapplauncher linker arguments for osx

2023-01-09 Thread Alexey Semenyuk
Hi David, The request to adjust osx linker command lines looks reasonable. Please go ahead with a pull request. - Alexey On 1/9/2023 1:21 AM, David Holmes wrote: On 8/01/2023 8:39 pm, David Schumann wrote: Hello, I'm not 100% sure if this list is the correct one for this topic, feel free

RFR: Merge jdk20

2023-01-09 Thread Jesper Wilhelmsson
Forwardport JDK 20 -> JDK 21 - Commit messages: - Merge remote-tracking branch 'jdk20/master' into Merge_jdk20 - 8299689: Make use of JLine for Console as "opt-in" The webrevs contain the adjustments done while merging with regards to each parent branch: - master: https://webrevs

Integrated: 6381945: (cal) Japanese calendar unit test system should avoid multiple static imports

2023-01-09 Thread Justin Lu
On Wed, 4 Jan 2023 21:49:18 GMT, Justin Lu wrote: > Within _test/jdk/java/util/Calendar/CalendarTestScripts/Symbol.java_ > > GregorianCalendar alone handles all the necessary imports, Calendar is not > needed This pull request has now been integrated. Changeset: f79b3d42 Author:Justin Lu

RFR: 8299498: Usage of constructors of primitive wrapper classes should be avoided in java.lang API docs

2023-01-09 Thread Justin Lu
The javadocs of the following methods used deprecated constructors of the primitive wrapper classes: java.lang.ArrayStoreException java.lang.ClassCastException java.lang.Double.compare(double, double) java.lang.Float.compare(float, float) java.lang.Integer.getInteger(String, int) java.lang.Intege

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option

2023-01-09 Thread Mandy Chung
On Mon, 12 Dec 2022 14:17:43 GMT, Alan Bateman wrote: > I skimmed through this (not a detailed review) and I think it's mostly okay. > It's --compress 0 and 2 that should be listed as deprecated as --compress 1 > is string sharing rather than zip compression. I also think it's good to deprecat

Re: RFR: 8299444 java.util.Set.copyOf allocates needlessly for empty input collections [v2]

2023-01-09 Thread Viktor Klang
On Mon, 9 Jan 2023 18:34:57 GMT, Per Minborg wrote: >> Viktor Klang has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - 8299444: java.util.Set.copyOf allocates needlessly for empty input >> collections >> >>Modifies ImmutableC

Integrated: 8299501: Usage of constructors of primitive wrapper classes should be avoided in java.util API docs

2023-01-09 Thread Justin Lu
On Fri, 6 Jan 2023 18:54:07 GMT, Justin Lu wrote: > Removed constructors of primitive wrapper classes (deprecated for removal) in > _java.util.Arrays_ > > Replaced with .valueOf() method This pull request has now been integrated. Changeset: f36f1354 Author:Justin Lu Committer: Naoto Sat

Integrated: 8299502: Usage of constructors of primitive wrapper classes should be avoided in javax.xml API docs

2023-01-09 Thread Justin Lu
On Thu, 5 Jan 2023 21:59:30 GMT, Justin Lu wrote: > Removed constructors of primitive wrapper classes (deprecated for removal) in > _javax.xml.stream.XMLOutputFactory_ > > Replaced with Boolean static fields: Boolean.TRUE and Boolean.FALSE This pull request has now been integrated. Changeset

RFR: 8299835: (jrtfs) Unnecessary null check in JrtPath.getAttributes

2023-01-09 Thread Andrey Turbanov
`jdk.internal.jrtfs.JrtFileSystem#getFileAttributes` never return `null` https://github.com/openjdk/jdk/blob/679e485838881c1364845072af305fb60d95e60a/src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystem.java#L206-L213 So, no need to check for `null` its result. Seems it was copied from Zip

RFR: 8203035: Implement equals() and hashCode() for Throwable

2023-01-09 Thread Victor Toni
Being able to compare instances of Throwable allows simple detection of exceptions raised by the same circumstances. Comparison allows for reduction of excessive logging e.g. in hotspots without requiring custom code to compare Throwables. - Commit messages: - 8203035: Implement e

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v2]

2023-01-09 Thread Ian Graves
On Thu, 15 Dec 2022 06:45:22 GMT, Jaikiran Pai wrote: >> Ian Graves has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Swapping deprecations in properties > > src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ZipPlugin.java > li

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-09 Thread Joe Darcy
On Mon, 9 Jan 2023 13:17:42 GMT, Raffaello Giulietti wrote: >> I see - thanks for the explanation - the problem is with `floatToIntBits` vs >> `floatToRawIntBits` in the "put" operation. The get operation is ok, but >> then having asymmetry where we use a float VH in one case (get) but not in

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v2]

2023-01-09 Thread Ian Graves
On Thu, 15 Dec 2022 06:43:40 GMT, Jaikiran Pai wrote: >> Ian Graves has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Swapping deprecations in properties > > src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/DefaultCompressPlugi

Re: RFR: JDK-8262994: Refactor String.split to help method inlining

2023-01-09 Thread Christian Wimmer
On Wed, 28 Dec 2022 20:42:15 GMT, Sergey Tsypanov wrote: > Is there any benchmark proving the benefit? The Graal compiler can do the inlining and constant folding. That is especially important when doing AOT compilation as part of GraalVM Native Image builds, in which case the regular expressi

Re: RFR: JDK-8262994: Refactor String.split to help method inlining [v2]

2023-01-09 Thread Christian Wimmer
On Tue, 27 Dec 2022 23:36:52 GMT, Ismael Juma wrote: >> Christian Wimmer has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add comment about method inlining > > src/java.base/share/classes/java/lang/String.java line 3133: > >> 3131:

Re: RFR: JDK-8262994: Refactor String.split to help method inlining [v2]

2023-01-09 Thread Christian Wimmer
> The method `String.split` contains a fast-path when the regular expression > parameter is not really a regular expression, but just a single split > character. > This fast path vs. slow path check can be constant folded when the regular > expression parameter is a literal constant - a quite fr

RFR: 8298939: Refactor open/test/jdk/javax/rmi/ssl/SSLSocketParametersTestsh to jtreg java test

2023-01-09 Thread Matthew Donovan
Removed SSLSocketParametersTest.sh script (which just called a Java file) and configured the java code to run directly with jtreg - Commit messages: - 8298939: Refactor open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.sh to jtreg java test Changes: https://git.openjdk.org/jdk/p

Re: RFR: 8299444 java.util.Set.copyOf allocates needlessly for empty input collections [v2]

2023-01-09 Thread Per Minborg
On Mon, 9 Jan 2023 08:33:09 GMT, Viktor Klang wrote: >> Currently Set.copyOf allocates both a HashSet and a new empty array when the >> input collection is empty. >> >> This patch avoids allocating anything for the case where the parameter >> collection's isEmpty returns true. > > Viktor Klang

Re: RFR: 8299807: newStringUTF8NoRepl and getBytesUTF8NoRepl always copy arrays

2023-01-09 Thread Glavo
On Mon, 9 Jan 2023 17:07:53 GMT, Sergey Tsypanov wrote: > Why don't we just call `s.isLatin1()` instead of `coder == LATIN1 && > isASCII(val)`? The `isLatin1()` can only replace `coder == LATIN1`, and it is necessary to check whether it is ASCII. In the following, we also need to pass the `co

Re: RFR: 8299444 java.util.Set.copyOf allocates needlessly for empty input collections [v2]

2023-01-09 Thread Stuart Marks
On Mon, 9 Jan 2023 08:33:09 GMT, Viktor Klang wrote: >> Currently Set.copyOf allocates both a HashSet and a new empty array when the >> input collection is empty. >> >> This patch avoids allocating anything for the case where the parameter >> collection's isEmpty returns true. > > Viktor Klang

[jdk20] Integrated: 8299689: Make use of JLine for Console as "opt-in"

2023-01-09 Thread Naoto Sato
On Fri, 6 Jan 2023 17:57:47 GMT, Naoto Sato wrote: > Due to the fact that JLine spawns native processes to obtain terminal > information on macOS/Linux, we decided to disable the JLine by default for > performance degradation reasons. It is still possible to enable it by > specifying it on the

Re: RFR: 8299444 java.util.Set.copyOf allocates needlessly for empty input collections [v2]

2023-01-09 Thread Stuart Marks
On Mon, 9 Jan 2023 08:33:09 GMT, Viktor Klang wrote: >> Currently Set.copyOf allocates both a HashSet and a new empty array when the >> input collection is empty. >> >> This patch avoids allocating anything for the case where the parameter >> collection's isEmpty returns true. > > Viktor Klang

Re: RFR: 8299183: Invokers.checkExactType passes parameters to create WMTE in opposite order [v3]

2023-01-09 Thread Mandy Chung
> Trivial fix. Fix `Invokers.checkExactType` to call > `newWrongMethodTypeException(actual, expected)` with parameters in right > order. Mandy Chung has updated the pull request incrementally with one additional commit since the last revision: Update VarHandleTestExact test and new test's c

Integrated: 8299500: Usage of constructors of primitive wrapper classes should be avoided in java.text API docs

2023-01-09 Thread Justin Lu
On Fri, 6 Jan 2023 17:42:53 GMT, Justin Lu wrote: > Removed constructors of primitive wrapper classes (deprecated for removal) > for the following > - _java.text.ChoiceFormat_ > - _java.text.MessageFormat_ > > Replaced with .valueOf() method This pull request has now been integrated. Changes

Re: RFR: 8299183: Invokers.checkExactType passes parameters to create WMTE in opposite order [v2]

2023-01-09 Thread Mandy Chung
On Sat, 7 Jan 2023 10:46:40 GMT, Jaikiran Pai wrote: >> Mandy Chung has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Add a regression test >> - further cleanup newWrongMethodTypeException for clarity > > test/jdk/java/lang/invoke/Wrong

Re: RFR: 8299444 java.util.Set.copyOf allocates needlessly for empty input collections [v2]

2023-01-09 Thread Viktor Klang
On Mon, 9 Jan 2023 17:09:02 GMT, Sergey Bylokhov wrote: >> Viktor Klang has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - 8299444: java.util.Set.copyOf allocates needlessly for empty input >> collections >> >>Modifies Immuta

Re: [jdk20] RFR: 8299689: Make use of JLine for Console as "opt-in" [v2]

2023-01-09 Thread Alan Bateman
On Mon, 9 Jan 2023 17:09:29 GMT, Naoto Sato wrote: >> Due to the fact that JLine spawns native processes to obtain terminal >> information on macOS/Linux, we decided to disable the JLine by default for >> performance degradation reasons. It is still possible to enable it by >> specifying it on

Re: RFR: 8299444 java.util.Set.copyOf allocates needlessly for empty input collections [v2]

2023-01-09 Thread Sergey Bylokhov
On Mon, 9 Jan 2023 08:33:09 GMT, Viktor Klang wrote: >> Currently Set.copyOf allocates both a HashSet and a new empty array when the >> input collection is empty. >> >> This patch avoids allocating anything for the case where the parameter >> collection's isEmpty returns true. > > Viktor Klang

Re: RFR: 8299807: newStringUTF8NoRepl and getBytesUTF8NoRepl always copy arrays

2023-01-09 Thread Sergey Tsypanov
On Mon, 9 Jan 2023 03:34:55 GMT, Glavo wrote: > `JavaLangAccess::newStringUTF8NoRepl` and > `JavaLangAccess::getBytesUTF8NoRepl` are not implemented correctly. They > always copy arrays, rather than avoiding copying as much as possible as > javadoc says. > > I ran the tier1 test without any n

Re: [jdk20] RFR: 8299689: Make use of JLine for Console as "opt-in" [v2]

2023-01-09 Thread Naoto Sato
> Due to the fact that JLine spawns native processes to obtain terminal > information on macOS/Linux, we decided to disable the JLine by default for > performance degradation reasons. It is still possible to enable it by > specifying it on the command line with `jdk.console` system property (not

Re: [jdk20] RFR: 8299689: Make use of JLine for Console as "opt-in" [v2]

2023-01-09 Thread Naoto Sato
On Sat, 7 Jan 2023 10:35:50 GMT, Alan Bateman wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Addressing review suggestions > > src/java.base/share/classes/jdk/internal/io/JdkConsoleProvider.java line 35: > >> 33:

Re: RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v18]

2023-01-09 Thread Claes Redestad
> Continuing the work initiated by @luhenry to unroll and then intrinsify > polynomial hash loops. > > I've rewired the library changes to route via a single `@IntrinsicCandidate` > method. To make this work I've harmonized how they are invoked so that > there's less special handling and checks

Re: RFR: 8177418: TimeZone.getTimeZone(String id) throws NullPointerException when id is null

2023-01-09 Thread Naoto Sato
On Fri, 6 Jan 2023 22:38:13 GMT, Justin Lu wrote: > When ID is null, TimeZone.getTimeZone(String ID) throws a > NullPointerException. > > For example, > > > String someID = null; > TimeZone tz1 = TimeZone.getTimeZone(someID); > ``` > > throws a `NullPointerException` > > This change updat

Re: RFR: 8297306: Incorrect brackets in Javadoc for a constructor of IteratorSpliterator [v2]

2023-01-09 Thread Naoto Sato
On Mon, 9 Jan 2023 01:09:04 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which fixes an issue in the javadoc >> text of the internal class IteratorSpliterator? This addresses the issue >> reported at https://bugs.openjdk.org/browse/JDK-8297306. > > Jaikiran Pai has upda

Re: RFR: 6381945: (cal) Japanese calendar unit test system should avoid multiple static imports

2023-01-09 Thread Naoto Sato
On Wed, 4 Jan 2023 21:49:18 GMT, Justin Lu wrote: > Within _test/jdk/java/util/Calendar/CalendarTestScripts/Symbol.java_ > > GregorianCalendar alone handles all the necessary imports, Calendar is not > needed Marked as reviewed by naoto (Reviewer). - PR: https://git.openjdk.org/j

Re: RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v13]

2023-01-09 Thread Claes Redestad
On Thu, 22 Dec 2022 13:10:02 GMT, Claes Redestad wrote: >> @cl4es Thanks for passing the constant node through, the code looks much >> cleaner now. The attached patch should handle the signed bytes/shorts as >> well. Please take a look. >> [signed.patch](https://github.com/openjdk/jdk/files/10

Re: RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v17]

2023-01-09 Thread Claes Redestad
> Continuing the work initiated by @luhenry to unroll and then intrinsify > polynomial hash loops. > > I've rewired the library changes to route via a single `@IntrinsicCandidate` > method. To make this work I've harmonized how they are invoked so that > there's less special handling and checks

Re: RFR: 8293841: RISC-V: Implementation of Foreign Function & Memory API (Preview) [v3]

2023-01-09 Thread Feilong Jiang
> Add experimental Foreign Function & Memory API support for RISC-V. > > For details of the FFM API RISC-V port please refer to [JBS > issue](https://bugs.openjdk.org/browse/JDK-8293841) > > Testing: > > - [x] jdk_foreign with release/fastdebug build > - [x] run TestMatrix.java manually with re

RFR: 8299807: newStringUTF8NoRepl and getBytesUTF8NoRepl always copy arrays

2023-01-09 Thread Glavo
`JavaLangAccess::newStringUTF8NoRepl` and `JavaLangAccess::getBytesUTF8NoRepl` are not implemented correctly. They always copy arrays, rather than avoiding copying as much as possible as javadoc says. I ran the tier1 test without any new errors. - Commit messages: - fix: newString

Re: RFR: 8299807: newStringUTF8NoRepl and getBytesUTF8NoRepl always copy arrays

2023-01-09 Thread Glavo
On Mon, 9 Jan 2023 03:34:55 GMT, Glavo wrote: > `JavaLangAccess::newStringUTF8NoRepl` and > `JavaLangAccess::getBytesUTF8NoRepl` are not implemented correctly. They > always copy arrays, rather than avoiding copying as much as possible as > javadoc says. > > I ran the tier1 test without any n

Re: RFR: 8293841: RISC-V: Implementation of Foreign Function & Memory API (Preview) [v2]

2023-01-09 Thread Feilong Jiang
> Add experimental Foreign Function & Memory API support for RISC-V. > > For details of the FFM API RISC-V port please refer to [JBS > issue](https://bugs.openjdk.org/browse/JDK-8293841) > > Testing: > > - [x] jdk_foreign with release/fastdebug build > - [x] run TestMatrix.java manually with re

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v5]

2023-01-09 Thread Archie L . Cobbs
On Mon, 9 Jan 2023 06:37:22 GMT, David Holmes wrote: > All your new files need a copyright and GPL header. Sorry if I'm being blind but I'm not seeing it. Which file(s) are you referring to? The `@test /nodynamiccopyright/` files don't get one per [this](https://openjdk.org/groups/compiler/te

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-09 Thread Raffaello Giulietti
On Mon, 9 Jan 2023 12:12:08 GMT, Maurizio Cimadamore wrote: >> For the other direction it uses the `floatToRawIntBits`: >> https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template#L148-L153 >> >> I think for symmatry we shou

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-09 Thread Maurizio Cimadamore
On Mon, 9 Jan 2023 11:07:51 GMT, Uwe Schindler wrote: >> src/java.base/share/classes/java/io/Bits.java line 77: >> >>> 75: // Using Double.longBitsToDouble collapses NaN values to a >>> single >>> 76: // "canonical" NaN value >>> 77: return Double.longBitsToDouble((long)

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-09 Thread Uwe Schindler
On Mon, 9 Jan 2023 10:33:44 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove faulty test tag, improve other test tag, fix comments > > src/java.base/share/classes/java/io/Bits.java li

Re: RFR: 8299513: Cleanup java.io [v4]

2023-01-09 Thread Lance Andersen
On Mon, 9 Jan 2023 08:57:11 GMT, Per Minborg wrote: >> Code in java.io contains many legacy constructs and semantics not >> recommended including: >> >> * C-style array declaration >> * Unnecessary visibility >> * Redundant keywords in interfaces (e.g. public, static) >> * Non-standard nami

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-09 Thread Maurizio Cimadamore
On Mon, 9 Jan 2023 09:22:25 GMT, Per Minborg wrote: >> Currently, `java.io.Bits` is using explicit logic to read/write various >> primitive types to/from byte arrays. Switching to the use of `VarHandle` >> access would provide better performance and less code. >> >> Also, using a standard API

Re: RFR: 8292914: Introduce a system property that enables stable names for lambda proxy classes [v7]

2023-01-09 Thread Strahinja Stanojevic
On Mon, 21 Nov 2022 16:46:43 GMT, Strahinja Stanojevic wrote: >> This PR introduces an option to output stable names for the lambda classes >> in the JDK. A stable name consists of two parts: The first part is the >> predefined value `$$Lambda$` appended to the lambda capturing class, and the

Re: RFR: 8299513: Cleanup java.io [v4]

2023-01-09 Thread Alan Bateman
On Mon, 9 Jan 2023 08:57:11 GMT, Per Minborg wrote: >> Code in java.io contains many legacy constructs and semantics not >> recommended including: >> >> * C-style array declaration >> * Unnecessary visibility >> * Redundant keywords in interfaces (e.g. public, static) >> * Non-standard nami

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-09 Thread Alan Bateman
On Mon, 9 Jan 2023 09:22:25 GMT, Per Minborg wrote: >> Currently, `java.io.Bits` is using explicit logic to read/write various >> primitive types to/from byte arrays. Switching to the use of `VarHandle` >> access would provide better performance and less code. >> >> Also, using a standard API

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-09 Thread Per Minborg
> Currently, `java.io.Bits` is using explicit logic to read/write various > primitive types to/from byte arrays. Switching to the use of `VarHandle` > access would provide better performance and less code. > > Also, using a standard API for these conversions means future `VarHandle` > improvem

Re: RFR: 8299513: Cleanup java.io [v4]

2023-01-09 Thread Per Minborg
> Code in java.io contains many legacy constructs and semantics not recommended > including: > > * C-style array declaration > * Unnecessary visibility > * Redundant keywords in interfaces (e.g. public, static) > * Non-standard naming for constants > * Javadoc typos > * Missing final declar

Re: RFR: 8299513: Cleanup java.io [v3]

2023-01-09 Thread Per Minborg
> Code in java.io contains many legacy constructs and semantics not recommended > including: > > * C-style array declaration > * Unnecessary visibility > * Redundant keywords in interfaces (e.g. public, static) > * Non-standard naming for constants > * Javadoc typos > * Missing final declar

Re: RFR: 8299444 java.util.Set.copyOf allocates needlessly for empty input collections

2023-01-09 Thread Viktor Klang
On Thu, 5 Jan 2023 01:02:11 GMT, Sergey Bylokhov wrote: >> There's no regression test. However, with the current code (prior to this >> change) a call to `Set.of(zeroLengthArray)` returns the same instance as >> `Set.of()`, so it's difficult to write a simple functional test for this >> change

Re: RFR: 8299444 java.util.Set.copyOf allocates needlessly for empty input collections [v2]

2023-01-09 Thread Viktor Klang
> Currently Set.copyOf allocates both a HashSet and a new empty array when the > input collection is empty. > > This patch avoids allocating anything for the case where the parameter > collection's isEmpty returns true. Viktor Klang has updated the pull request incrementally with two additional