Re: RFR: 8299513: Clean up java.io [v6]

2023-01-10 Thread Andrey Turbanov
On Tue, 10 Jan 2023 16:06:15 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 nam

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

2023-01-10 Thread Archie L . Cobbs
On Tue, 10 Jan 2023 23:38:14 GMT, Maurizio Cimadamore wrote: >> OK I'm glad you pointed that out because I'm a little unclear on the best >> way to do this bit. >> >> Just to confirm, you are saying that this: >> >> `if (erasure(type).equalsIgnoreMetadata(outerType)) {` >> >> should be repla

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

2023-01-10 Thread Archie L . Cobbs
> This PR adds a new lint warning category `this-escape`. > > It also adds `@SuppressWarnings` annotations as needed to the JDK itself to > allow the JDK to continue to compile with `-Xlint:all`. > > A 'this' escape warning is generated for a constructor `A()` in a class `A` > when the compiler

[jdk20] RFR: 8299090: Specify coordinate order for additional CaptureCallState parameters on class as well

2023-01-10 Thread Jorn Vernee
A small doc clarification that also specifies where the additional MemorySegment parameter of a downcall method handle linked with the captureCallState option appears in the parameter list, on the CaptureCallState class. - Commit messages: - add parameter order clarification Chan

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

2023-01-10 Thread Archie L . Cobbs
On Wed, 11 Jan 2023 00:04:14 GMT, Maurizio Cimadamore wrote: >> Yes, because the 'this' reference can bounce around through different >> variables in scope each time around the loop. So we have to repeat the loop >> until all 'this' references have "flooded" into all the nooks and crannies. >>

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

2023-01-10 Thread Maurizio Cimadamore
On Tue, 10 Jan 2023 19:20:35 GMT, Archie L. Cobbs wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java >> line 1098: >> >>> 1096: private void visitLooped(T tree, Consumer >>> visitor) { >>> 1097: this.visitScoped(tree, false, t -> { >>> 1098:

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

2023-01-10 Thread Archie L . Cobbs
On Tue, 10 Jan 2023 23:45:59 GMT, Maurizio Cimadamore wrote: >> It's slightly different from that. >> >> Considering any of the various things in scope that can point to an object >> (these are: the current 'this' instance, the current outer 'this' instance, >> method parameter/variable, meth

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

2023-01-10 Thread Maurizio Cimadamore
On Tue, 10 Jan 2023 19:18:04 GMT, Archie L. Cobbs wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java >> line 85: >> >>> 83: * >>> 84: * >>> 85: * When tracking references, we distinguish between direct references >>> and indirect references, >> >> I'

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

2023-01-10 Thread Maurizio Cimadamore
On Tue, 10 Jan 2023 19:42:06 GMT, Archie L. Cobbs wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 2345: >> >>> 2343: if (!innerType.hasTag(CLASS) || !outerType.hasTag(CLASS)) >>> 2344: return false; >>> 2345: innerType = erasure(inner

Re: RFR: 8299852: Modernize ConcurrentHashMap

2023-01-10 Thread Martin Buchholz
On Tue, 10 Jan 2023 10:32:34 GMT, Per Minborg wrote: > `java.util.concurrent.ConcurrentHashMap` is relatively old and has not been > updated to reflect the current state of Java and can be modernized: > > * Add `@Serial` annotations > * Seal classes and restrict subclassing for internal class

Re: RFR: 8299571: ZoneRulesProvider.registerProvider() can leave inconsistent state on failure

2023-01-10 Thread Joe Wang
On Tue, 10 Jan 2023 17:17:41 GMT, Naoto Sato wrote: > Fixing the subject method to recover gracefully on a failed > `ZoneRulesProvider` registration. Marked as reviewed by joehw (Reviewer). - PR: https://git.openjdk.org/jdk/pull/11928

Re: RFR: 8299852: Modernize ConcurrentHashMap

2023-01-10 Thread Martin Buchholz
On Tue, 10 Jan 2023 10:32:34 GMT, Per Minborg wrote: > `java.util.concurrent.ConcurrentHashMap` is relatively old and has not been > updated to reflect the current state of Java and can be modernized: > > * Add `@Serial` annotations > * Seal classes and restrict subclassing for internal class

Re: RFR: 8299852: Modernize ConcurrentHashMap

2023-01-10 Thread Martin Buchholz
On Tue, 10 Jan 2023 10:32:34 GMT, Per Minborg wrote: > `java.util.concurrent.ConcurrentHashMap` is relatively old and has not been > updated to reflect the current state of Java and can be modernized: > > * Add `@Serial` annotations > * Seal classes and restrict subclassing for internal class

Re: RFR: 8299852: Modernize ConcurrentHashMap

2023-01-10 Thread Martin Buchholz
On Tue, 10 Jan 2023 10:32:34 GMT, Per Minborg wrote: > `java.util.concurrent.ConcurrentHashMap` is relatively old and has not been > updated to reflect the current state of Java and can be modernized: > > * Add `@Serial` annotations > * Seal classes and restrict subclassing for internal class

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

2023-01-10 Thread Justin Lu
On Tue, 10 Jan 2023 19:59:36 GMT, Roger Riggs wrote: > Since you are updating the example, perhaps they should use `@snippet > lang="java" { }` instead of the @code and blockquote markup. That's a good point and Lance brought that up as well, I will create a separate issue to address inst

Re: RFR: 8299571: ZoneRulesProvider.registerProvider() can leave inconsistent state on failure

2023-01-10 Thread Roger Riggs
On Tue, 10 Jan 2023 17:17:41 GMT, Naoto Sato wrote: > Fixing the subject method to recover gracefully on a failed > `ZoneRulesProvider` registration. LGTM - Marked as reviewed by rriggs (Reviewer). PR: https://git.openjdk.org/jdk/pull/11928

Re: RFR: 8299571: ZoneRulesProvider.registerProvider() can leave inconsistent state on failure

2023-01-10 Thread Iris Clark
On Tue, 10 Jan 2023 17:17:41 GMT, Naoto Sato wrote: > Fixing the subject method to recover gracefully on a failed > `ZoneRulesProvider` registration. Marked as reviewed by iris (Reviewer). - PR: https://git.openjdk.org/jdk/pull/11928

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

2023-01-10 Thread Lance Andersen
On Tue, 10 Jan 2023 18:02:22 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.compar

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

2023-01-10 Thread Mandy Chung
On Tue, 10 Jan 2023 18:02:22 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.compar

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

2023-01-10 Thread Roger Riggs
On Tue, 10 Jan 2023 18:02:22 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.compar

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

2023-01-10 Thread Mandy Chung
On Tue, 10 Jan 2023 18:02:22 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.compar

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

2023-01-10 Thread Archie L . Cobbs
> This PR adds a new lint warning category `this-escape`. > > It also adds `@SuppressWarnings` annotations as needed to the JDK itself to > allow the JDK to continue to compile with `-Xlint:all`. > > A 'this' escape warning is generated for a constructor `A()` in a class `A` > when the compiler

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

2023-01-10 Thread Joe Darcy
On Tue, 10 Jan 2023 18:40:28 GMT, Justin Lu wrote: > > Given that type conversions create the primitive wrapper instances when > > they are needed, I think the examples should be reconsidered. They > > needlessly suggest that the wrapper instances need to be explicitly created. > > Hi Roger, t

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

2023-01-10 Thread Roger Riggs
On Tue, 10 Jan 2023 18:02:22 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.compar

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

2023-01-10 Thread Archie L . Cobbs
On Mon, 9 Jan 2023 14:23:47 GMT, Maurizio Cimadamore wrote: >> Archie L. Cobbs has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix incorrect @bug numbers in unit tests. > > src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.j

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

2023-01-10 Thread Archie L . Cobbs
On Mon, 9 Jan 2023 15:03:10 GMT, Maurizio Cimadamore wrote: >> Archie L. Cobbs has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix incorrect @bug numbers in unit tests. > > src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEsc

Re: RFR: 8299513: Clean up java.io [v6]

2023-01-10 Thread Sergey Bylokhov
On Tue, 10 Jan 2023 16:06:15 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 nam

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

2023-01-10 Thread Maurizio Cimadamore
On Sat, 7 Jan 2023 21:08:07 GMT, Archie L. Cobbs wrote: >> This PR adds a new lint warning category `this-escape`. >> >> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to >> allow the JDK to continue to compile with `-Xlint:all`. >> >> A 'this' escape warning is gener

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

2023-01-10 Thread Justin Lu
On Tue, 10 Jan 2023 18:07:54 GMT, Roger Riggs wrote: > Given that type conversions create the primitive wrapper instances when they > are needed, I think the examples should be reconsidered. They needlessly > suggest that the wrapper instances need to be explicitly created. Hi Roger, thanks fo

Re: RFR: 8299513: Clean up java.io [v6]

2023-01-10 Thread Sergey Bylokhov
On Tue, 10 Jan 2023 16:06:15 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 nam

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

2023-01-10 Thread Roger Riggs
On Tue, 10 Jan 2023 18:02:22 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.compar

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

2023-01-10 Thread Alexey Semenyuk
On Thu, 5 Jan 2023 20:10:45 GMT, Alexey Semenyuk wrote: > 8299278: tools/jpackage/share/AddLauncherTest.java#id1 failed > AddLauncherTest.bug8230933 This pull request has now been integrated. Changeset: c595f965 Author:Alexey Semenyuk URL: https://git.openjdk.org/jdk/commit/c595f96

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

2023-01-10 Thread Alexey Semenyuk
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 This pull request has now been integrated. Changeset: 3c99e786 Author:Alexey Semenyuk URL: https://git.openjdk.org/j

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

2023-01-10 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)

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

2023-01-10 Thread Justin Lu
On Tue, 10 Jan 2023 01:50:45 GMT, Jaikiran Pai wrote: >> Like Naoto notes, my understanding of it is that the `@systemProperty` >> should appear only once at the place where the semantics of that system >> property is being defined. This mail, which was sent when this tag was >> introduced, ha

Re: RFR: 8299864: ZipFileStore#supportsFileAttributeView(String) doesn't throw NPE

2023-01-10 Thread Lance Andersen
On Tue, 10 Jan 2023 15:26:05 GMT, Per Minborg wrote: > This PR proposes to add null-checking for some parameter arguments in > `ZipFileStore`. Thanks for taking this on Per. I think we also need to add a test for getAttribute() and getFileStoreAttributeView() as I do not see it being tested

Re: RFR: 8299513: Clean up java.io [v5]

2023-01-10 Thread Roger Riggs
On Tue, 10 Jan 2023 15:52:51 GMT, Per Minborg wrote: >> src/java.base/share/classes/java/io/ObjectStreamConstants.java line 38: >> >>> 36: * Magic number that is written to the stream header. >>> 37: */ >>> 38: short STREAM_MAGIC = (short)0xaced; >> >> I'd prefer to retain the `st

Re: RFR: 8299513: Clean up java.io [v6]

2023-01-10 Thread Roger Riggs
On Tue, 10 Jan 2023 16:06:15 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 nam

RFR: 8299571: ZoneRulesProvider.registerProvider() can leave inconsistent state on failure

2023-01-10 Thread Naoto Sato
Fixing the subject method to recover gracefully on a failed `ZoneRulesProvider` registration. - Commit messages: - Added a test - 8299571: ZoneRulesProvider.registerProvider() can leave inconsistent state on failure Changes: https://git.openjdk.org/jdk/pull/11928/files Webrev: h

Integrated: 8299183: Invokers.checkExactType passes parameters to create WMTE in opposite order

2023-01-10 Thread Mandy Chung
On Thu, 5 Jan 2023 20:45:20 GMT, Mandy Chung wrote: > Trivial fix. Fix `Invokers.checkExactType` to call > `newWrongMethodTypeException(actual, expected)` with parameters in right > order. This pull request has now been integrated. Changeset: a86b6f6f Author:Mandy Chung URL: http

ZipFile.isSignatureRelated returns true for files in META-INF subdirectories

2023-01-10 Thread Eirik Bjørsnøs
Hi, ZipFile.isSignatureRelated currently returns true for paths such as the following: META-INF/libraries/org.bouncycastle:bcprov-jdk15on:jar-1.70/META-INF/BC2048KE.DSA While this path does start with "META-INF/" and ends with ".DSA", the file does not live in the META-INF/ directory _directly_,

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

2023-01-10 Thread Naoto Sato
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: 8299513: Cleanup java.io [v6]

2023-01-10 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 [v5]

2023-01-10 Thread Per Minborg
On Tue, 10 Jan 2023 14:59:35 GMT, Roger Riggs wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert removal of a final keyword > > src/java.base/share/classes/java/io/ObjectStreamConstants.java line 38: > >> 36:

RFR: 8299864: ZipFileStore#supportsFileAttributeView(String) doesn't throw NPE

2023-01-10 Thread Per Minborg
This PR proposes to add null-checking for some parameter arguments in `ZipFileStore`. - Commit messages: - Check null invariants Changes: https://git.openjdk.org/jdk/pull/11926/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11926&range=00 Issue: https://bugs.openjdk.org/

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

2023-01-10 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: 8299513: Cleanup java.io [v5]

2023-01-10 Thread Roger Riggs
On Tue, 10 Jan 2023 13:34:49 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 nam

Re: [jdk20] RFR: 8299862: OfAddress setter should disallow heap segments

2023-01-10 Thread Jorn Vernee
On Tue, 10 Jan 2023 14:04:38 GMT, Maurizio Cimadamore wrote: > When unifying memory address with memory segments, we missed the case where a > heap memory segment is passed as a value to a var handle address setters. > > The solution is to reuse the same check we use when validating segment >

[jdk20] RFR: 8299862: OfAddress setter should disallow heap segments

2023-01-10 Thread Maurizio Cimadamore
When unifying memory address with memory segments, we missed the case where a heap memory segment is passed as a value to a var handle address setters. The solution is to reuse the same check we use when validating segment downcall parameters also for segment memory writes. - Commi

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

2023-01-10 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: 8299852: Modernize ConcurrentHashMap

2023-01-10 Thread Per Minborg
On Tue, 10 Jan 2023 12:04:10 GMT, Pavel Rappo wrote: > I'm sure others will note or have already noted elsewhere that we don't do > direct PRs against JSR 166. Yes. I will change the PR to a draft as we explore ways to integrate the spirit of the proposed changes. - PR: https://g

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

2023-01-10 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: ZipFileStore#supportsFileAttributeView(String) doesn't throw NPE

2023-01-10 Thread Andrey Turbanov
Filled https://bugs.openjdk.org/browse/JDK-8299864 Andrey Turbanov вт, 10 янв. 2023 г. в 13:24, Alan Bateman : > > > > On 10/01/2023 09:35, Andrey Turbanov wrote: > > Hello. > > I've noticed that ZipFileStore#supportsFileAttributeView(String) > > doesn't throw NullPointerException when 'null' is

Re: RFR: 8299852: Modernize ConcurrentHashMap

2023-01-10 Thread Pavel Rappo
On Tue, 10 Jan 2023 10:32:34 GMT, Per Minborg wrote: > `java.util.concurrent.ConcurrentHashMap` is relatively old and has not been > updated to reflect the current state of Java and can be modernized: > > * Add `@Serial` annotations > * Seal classes and restrict subclassing for internal class

Re: RFR: 8299835: (jrtfs) Unnecessary null check in JrtPath.getAttributes [v2]

2023-01-10 Thread Lance Andersen
On Tue, 10 Jan 2023 09:14:11 GMT, Andrey Turbanov wrote: >> `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 >> S

RFR: 8299852: Modernize ConcurrentHashMap

2023-01-10 Thread Per Minborg
`java.util.concurrent.ConcurrentHashMap` is relatively old and has not been updated to reflect the current state of Java and can be modernized: * Add `@Serial` annotations * Seal classes and restrict subclassing for internal classes * Use pattern matching for instance * Remove redundant modif

Re: ZipFileStore#supportsFileAttributeView(String) doesn't throw NPE

2023-01-10 Thread Alan Bateman
On 10/01/2023 09:35, Andrey Turbanov wrote: Hello. I've noticed that ZipFileStore#supportsFileAttributeView(String) doesn't throw NullPointerException when 'null' is passed as an argument. public boolean supportsFileAttributeView(String name) { return "basic".equals(name) || "zip".equals

Re: jpackageapplauncher linker arguments for osx

2023-01-10 Thread David Schumann
Hi Alexey, great! I've created the PR: https://github.com/openjdk/jdk/pull/11922 Best regards, David Schumann Am Mo., 9. Jan. 2023 um 23:57 Uhr schrieb Alexey Semenyuk < alexey.semen...@oracle.com>: > Hi David, > > The request to adjust osx linker command lines looks reasonable. Please > go a

ZipFileStore#supportsFileAttributeView(String) doesn't throw NPE

2023-01-10 Thread Andrey Turbanov
Hello. I've noticed that ZipFileStore#supportsFileAttributeView(String) doesn't throw NullPointerException when 'null' is passed as an argument. public boolean supportsFileAttributeView(String name) { return "basic".equals(name) || "zip".equals(name) || (("owner".equals(name) || "po

Re: RFR: 8299835: (jrtfs) Unnecessary null check in JrtPath.getAttributes [v2]

2023-01-10 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 copie

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

2023-01-10 Thread Alan Bateman
On Mon, 9 Jan 2023 20:55:14 GMT, Andrey Turbanov wrote: > `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

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

2023-01-10 Thread Per Minborg
On Mon, 9 Jan 2023 18:34:57 GMT, Per Minborg wrote: > On the note of `CHM::isEmpty`: It would be better to rewrite this method as a > short-circuitable reduction of the many CounterCells' values. As soon as at > least one of them are >0 then the map is not empty. In contrast, today we sum > al

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

2023-01-10 Thread Alan Bateman
On Sat, 10 Dec 2022 18:11:30 GMT, Victor Toni wrote: > 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 Throw