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

2023-01-11 Thread Jorn Vernee
On Wed, 11 Jan 2023 02:19:26 GMT, Jorn Vernee wrote: > 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. This pull

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

2023-01-11 Thread Archie L . Cobbs
On Thu, 12 Jan 2023 00:15:08 GMT, Maurizio Cimadamore wrote: > So, for static methods, it could go down two ways: either we don't even look > at referenced method bodies, give up and just declare "sorry, escaping". Or, > if we look into method bodies, and see that the relationship between

RFR: 8038146: Clarify NavigableMap/TreeMap support for Entry.setValue

2023-01-11 Thread Stuart Marks
Also additional verbiage regarding Map.Entry objects in general and their possible connection to an underlying Map. - Commit messages: - 8038146: Clarify NavigableMap/TreeMap support for Entry.setValue Changes: https://git.openjdk.org/jdk/pull/11956/files Webrev:

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

2023-01-11 Thread Maurizio Cimadamore
On Wed, 11 Jan 2023 22:40:43 GMT, Archie L. Cobbs wrote: > > D'oh, you're right. But if you made `returnMe()` static or private then the > argument would still hold. > > > And, if the method is static, same story - you are passing ref3 somewhere > > else, and ref3 potentially contains this.

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

2023-01-11 Thread Stuart Marks
On Wed, 11 Jan 2023 15:31:22 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

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

2023-01-11 Thread Archie L . Cobbs
On Wed, 11 Jan 2023 21:51:45 GMT, Maurizio Cimadamore wrote: > So, in this example though you are calling an instance method before the > object is initialized, which would seem to me like a leak D'oh, you're right. But if you made `returnMe()` static or private then the argument would still

Integrated: Merge jdk20

2023-01-11 Thread Jesper Wilhelmsson
On Wed, 11 Jan 2023 17:47:27 GMT, Jesper Wilhelmsson wrote: > Forwardport JDK 20 -> JDK 21 This pull request has now been integrated. Changeset: 33f3bd8f Author:Jesper Wilhelmsson URL: https://git.openjdk.org/jdk/commit/33f3bd8fadb26a0f99c6a13474f8676639f91c0c Stats: 98 lines

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

2023-01-11 Thread Maurizio Cimadamore
On Wed, 11 Jan 2023 21:45:20 GMT, Maurizio Cimadamore wrote: >> Regarding the assignment graph approach, I think that would work if the >> references are bouncing around strictly between variables, but what if the >> chain includes any of the more complicated stuff that is currently being >>

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

2023-01-11 Thread Maurizio Cimadamore
On Wed, 11 Jan 2023 19:10:04 GMT, Archie L. Cobbs wrote: >> Good idea. Looks like the difference is in the noise, at least on my Macbook: >> >> Builds of master (jdk-21+3-69-gc6588d5bb3f) >> == >> >> Build times: >> >> real 2m24.650s >> user

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

2023-01-11 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

Re: RFR: 8177418: NPE is not apparent for methods in java.util.TimeZone API docs [v3]

2023-01-11 Thread Justin Lu
> When their input is null, the following methods in java.util.TimeZone throw a > NullPointerException: > > TimeZone.getTimeZone(String ID) > TimeZone.setID(String ID) > TimeZone.inDaylightTime(Date date) > > For example, > > > String someID = null; > TimeZone tz1 =

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

2023-01-11 Thread Joe Darcy
On Wed, 11 Jan 2023 03:30:03 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

Re: [jdk20] RFR: 8299034: Runtime::exec clarification of inherited environment

2023-01-11 Thread Alan Bateman
On Wed, 11 Jan 2023 18:31:06 GMT, Roger Riggs wrote: > The current description of Runtime.exec, ProcessBuilder.start, and > ProcessBuilder.startPipeline identifies a minimum set of system dependent > environment variables needed to launch a process and allows additional system > dependent

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

2023-01-11 Thread Archie L . Cobbs
On Wed, 11 Jan 2023 15:59:29 GMT, Maurizio Cimadamore wrote: > What I'm interested in though is what incremental improvement is brought by > the more complex analysis you have in this PR? It's a good question. Here are some thoughts... One meta-goal is that this analysis be conservative. In

Re: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point [v4]

2023-01-11 Thread Raffaello Giulietti
> This change transforms a O(n^2) path to O(n) when prepending zero padding to > decimal outputs, where n is the length of the padding. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8299677: Formatter.format might take a

Re: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point [v3]

2023-01-11 Thread Raffaello Giulietti
> This change transforms a O(n^2) path to O(n) when prepending zero padding to > decimal outputs, where n is the length of the padding. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8299677: Formatter.format might take a

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

2023-01-11 Thread Vladimir Ivanov
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

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

2023-01-11 Thread Archie L . Cobbs
On Wed, 11 Jan 2023 18:44:20 GMT, Archie L. Cobbs wrote: >> Also, looking at the loop test more closely, it seems to me that what the >> compiler needs to do is to prove that there can be possible paths by which a >> `this` can land into ref4. >> >> If we build a graph of all the assignments,

Re: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point

2023-01-11 Thread Raffaello Giulietti
On Wed, 11 Jan 2023 10:47:03 GMT, Raffaello Giulietti wrote: > This change transforms a O(n^2) path to O(n) when prepending zero padding to > decimal outputs, where n is the length of the padding. Added straightforward tests for padding. - PR:

Re: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point [v2]

2023-01-11 Thread Raffaello Giulietti
> This change transforms a O(n^2) path to O(n) when prepending zero padding to > decimal outputs, where n is the length of the padding. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8299677: Formatter.format might take a

Re: RFR: 8299502: Usage of constructors of primitive wrapper classes should be avoided in javax.xml API docs [v2]

2023-01-11 Thread Justin Lu
On Wed, 11 Jan 2023 18:41:59 GMT, altrisi wrote: > Why not just `true` and `false`? Autoboxing handles that. That was a topic that was talked about in [8299498](https://github.com/openjdk/jdk/pull/11912). It seemed that there was a consensus from a documentation standpoint that it was more

[jdk20] RFR: 8299034: Runtime::exec clarification of inherited environment

2023-01-11 Thread Roger Riggs
The current description of Runtime.exec, ProcessBuilder.start, and ProcessBuilder.startPipeline identifies a minimum set of system dependent environment variables needed to launch a process and allows additional system dependent environment variables to be present in the child. However, it does

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

2023-01-11 Thread Archie L . Cobbs
On Wed, 11 Jan 2023 16:14:24 GMT, Maurizio Cimadamore wrote: >> True - probably 3 * 3 can be achieved if this: >> >> >> ThisEscapeLoop ref21 = ref14; >> >> Is replaced with >> >> >> ThisEscapeLoop ref21 = this; >> >> >> In which case the inner loop won't converge immediately

Re: RFR: 8299502: Usage of constructors of primitive wrapper classes should be avoided in javax.xml API docs [v2]

2023-01-11 Thread altrisi
On Fri, 6 Jan 2023 21:59:13 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 > > Justin Lu has updated the pull request

Re: RFR: 8177418: NPE is not apparent for methods in java.util.TimeZone API docs [v2]

2023-01-11 Thread Justin Lu
> When their input is null, the following methods in java.util.TimeZone throw a > NullPointerException: > > TimeZone.getTimeZone(String ID) > TimeZone.setID(String ID) > TimeZone.inDaylightTime(Date date) > > For example, > > > String someID = null; > TimeZone tz1 =

RFR: Merge jdk20

2023-01-11 Thread Jesper Wilhelmsson
Forwardport JDK 20 -> JDK 21 - Commit messages: - Merge remote-tracking branch 'jdk20/master' into Merge_jdk20 - 8299862: OfAddress setter should disallow heap segments - 8299849: Revert JDK-8294461: wrong effectively final determination by javac - 8299227: host `exif.org` not

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

2023-01-11 Thread Justin Lu
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.Byte.valueOf(String) > java.lang.Byte.valueOf(String, int) > java.lang.ClassCastException >

Re: RFR: 8299978: Remove MethodHandleNatives.getMembers

2023-01-11 Thread Mandy Chung
On Wed, 11 Jan 2023 15:13:14 GMT, Claes Redestad wrote: > This removes `MethodHandleNatives.getMembers`, which has fallen into disuse. Marked as reviewed by mchung (Reviewer). - PR: https://git.openjdk.org/jdk/pull/11949

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

2023-01-11 Thread Justin Lu
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

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

2023-01-11 Thread Naoto Sato
On Tue, 10 Jan 2023 17:17:41 GMT, Naoto Sato wrote: > Fixing the subject method to recover gracefully on a failed > `ZoneRulesProvider` registration. This pull request has now been integrated. Changeset: c7716a01 Author:Naoto Sato URL:

Re: [jdk20] RFR: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR

2023-01-11 Thread Naoto Sato
On Wed, 11 Jan 2023 09:21:18 GMT, Christoph Langer wrote: > Hi all, > > This pull request contains a backport of > [JDK-8299439](https://bugs.openjdk.org/browse/JDK-8299439), commit > [3b374c01](https://github.com/openjdk/jdk/commit/3b374c0153950ab193f3a188b57d3404b4ce2fe2) > from the

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

2023-01-11 Thread Maurizio Cimadamore
On Wed, 11 Jan 2023 14:12:46 GMT, Maurizio Cimadamore wrote: >> Actually I think it would take 1 + 1 + 3 iterations. >> >> During the first two iterations of the outer loop, nothing changes after the >> first go round of the inner loop - i.e., the total set of possible >> references in

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

2023-01-11 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

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

2023-01-11 Thread Maurizio Cimadamore
On Wed, 11 Jan 2023 03:30:03 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

Re: RFR: 8299978: Remove MethodHandleNatives.getMembers

2023-01-11 Thread Jorn Vernee
On Wed, 11 Jan 2023 15:13:14 GMT, Claes Redestad wrote: > This removes `MethodHandleNatives.getMembers`, which has fallen into disuse. Marked as reviewed by jvernee (Reviewer). - PR: https://git.openjdk.org/jdk/pull/11949

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

2023-01-11 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

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

2023-01-11 Thread Per Minborg
On Wed, 11 Jan 2023 10:36:57 GMT, Andrey Turbanov wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert renaming > > src/java.base/share/classes/java/io/DataInputStream.java line 2: > >> 1: /* >> 2: * Copyright

RFR: 8299978: Remove MethodHandleNatives.getMembers

2023-01-11 Thread Claes Redestad
This removes `MethodHandleNatives.getMembers`, which has fallen into disuse. - Commit messages: - 8299978: Remove MethodHandleNatives.getMembers Changes: https://git.openjdk.org/jdk/pull/11949/files Webrev: https://webrevs.openjdk.org/?repo=jdk=11949=00 Issue:

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

2023-01-11 Thread Andrey Turbanov
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,

Re: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point

2023-01-11 Thread Raffaello Giulietti
On Wed, 11 Jan 2023 10:47:03 GMT, Raffaello Giulietti wrote: > This change transforms a O(n^2) path to O(n) when prepending zero padding to > decimal outputs, where n is the length of the padding. Since specific tests for padding seem lacking, I'll add some as part of this PR. Please expect

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

2023-01-11 Thread Jorn Vernee
On Wed, 11 Jan 2023 13:52:07 GMT, Jorn Vernee wrote: >> 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. > >

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

2023-01-11 Thread Per Minborg
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`. This pull request has now been integrated. Changeset: 7d3400b1 Author:Per Minborg URL:

[PATCH]: Code optimization for BitSet

2023-01-11 Thread Fabio Romano
The cardinality is saved as a field, new method for testing subset relation. The enanchment is useful for applications that make heavy use of BitSet objects as sets of integers, and therefore they need to make a lot of calls to cardinality() method, which actually require linear time in the number

[PATCH] 8173962: Add API for Deep copy of multi-dimensional arrays

2023-01-11 Thread Fabio Romano
Added the methods deepCopyOf(U[] original, Class newType) and deepCopyOf(T[] original), that perform a deep copy of the structure of multidimensional arrays. Also, added a pre-calculation of the string builders capacity for toString() of primitive array types, based on the mold of

Re: RFR: 8206890: jlink --endian XXX generates unusable image if endian-ness does not match architecture

2023-01-11 Thread Jaikiran Pai
On Wed, 11 Jan 2023 13:19:32 GMT, Jaikiran Pai wrote: > Can I please get a review for this change which proposes to fix the issue > reported in https://bugs.openjdk.org/browse/JDK-8206890? > > The `jlink` command allows a `--endian` option to specify the byte order in > the generated image.

Re: RFR: 8206890: jlink --endian XXX generates unusable image if endian-ness does not match architecture

2023-01-11 Thread Jaikiran Pai
On Wed, 11 Jan 2023 13:50:11 GMT, Alan Bateman wrote: >> Can I please get a review for this change which proposes to fix the issue >> reported in https://bugs.openjdk.org/browse/JDK-8206890? >> >> The `jlink` command allows a `--endian` option to specify the byte order in >> the generated

Re: RFR: 8206890: jlink --endian XXX generates unusable image if endian-ness does not match architecture

2023-01-11 Thread Alan Bateman
On Wed, 11 Jan 2023 13:19:32 GMT, Jaikiran Pai wrote: > Can I please get a review for this change which proposes to fix the issue > reported in https://bugs.openjdk.org/browse/JDK-8206890? > > The `jlink` command allows a `--endian` option to specify the byte order in > the generated image.

RFR: 8206890: jlink --endian XXX generates unusable image if endian-ness does not match architecture

2023-01-11 Thread Jaikiran Pai
Can I please get a review for this change which proposes to fix the issue reported in https://bugs.openjdk.org/browse/JDK-8206890? The `jlink` command allows a `--endian` option to specify the byte order in the generated image. Before this change, when such a image was being launched, the code

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

2023-01-11 Thread Lance Andersen
On Wed, 11 Jan 2023 08:43:36 GMT, Per Minborg wrote: >> This PR proposes to add null-checking for some parameter arguments in >> `ZipFileStore`. > > Per Minborg has updated the pull request incrementally with one additional > commit since the last revision: > > Fix typo and add bug ref

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

2023-01-11 Thread Lance Andersen
On Wed, 11 Jan 2023 08:59:53 GMT, Alan Bateman wrote: > This is a implementation class in a non-exported package so it's okay. Fair point - PR: https://git.openjdk.org/jdk/pull/11926

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

2023-01-11 Thread Maurizio Cimadamore
On Wed, 11 Jan 2023 00:22:03 GMT, Archie L. Cobbs wrote: >> So, if the code was be like this: >> >> >> ThisEscapeLoop ref11 = this; >> ThisEscapeLoop ref12 = null; >> ThisEscapeLoop ref13 = null; >> ThisEscapeLoop ref14 = null; >> for (int i = 0; i < 100; i++) { >> ref14 = ref13; >>

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v34]

2023-01-11 Thread Jim Laskey
> Enhance the Java programming language with string templates, which are > similar to string literals but contain embedded expressions. A string > template is interpreted at run time by replacing each expression with the > result of evaluating that expression, possibly after further validation

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v33]

2023-01-11 Thread Jim Laskey
> Enhance the Java programming language with string templates, which are > similar to string literals but contain embedded expressions. A string > template is interpreted at run time by replacing each expression with the > result of evaluating that expression, possibly after further validation

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

2023-01-11 Thread Jorn Vernee
On Wed, 11 Jan 2023 13:33:30 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Mention SegmentAllocator parameter as well > > src/java.base/share/classes/java/lang/foreign/Linker.java line

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

2023-01-11 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. Jorn Vernee has updated the pull request incrementally with one

Re: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point

2023-01-11 Thread Alan Bateman
On Wed, 11 Jan 2023 11:53:58 GMT, Alan Bateman wrote: >> This change transforms a O(n^2) path to O(n) when prepending zero padding to >> decimal outputs, where n is the length of the padding. > > I assume this issue has been there for a long time, just not noticed because > it would be unusual

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

2023-01-11 Thread Maurizio Cimadamore
On Wed, 11 Jan 2023 13:17:53 GMT, Jorn Vernee wrote: >> 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. > >

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

2023-01-11 Thread Jorn Vernee
On Wed, 11 Jan 2023 12:53:04 GMT, Jorn Vernee wrote: >> src/java.base/share/classes/java/lang/foreign/Linker.java line 328: >> >>> 326: * For this purpose, a downcall method handle linked with the >>> {@link #captureCallState(String[])} >>> 327: * option will feature an

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

2023-01-11 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. Jorn Vernee has updated the pull request incrementally with one

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

2023-01-11 Thread Glavo
On Wed, 11 Jan 2023 09:56:58 GMT, Alan Bateman 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

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

2023-01-11 Thread Jorn Vernee
On Wed, 11 Jan 2023 12:33:37 GMT, Maurizio Cimadamore wrote: >> 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

Re: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point

2023-01-11 Thread Jim Laskey
On Wed, 11 Jan 2023 10:47:03 GMT, Raffaello Giulietti wrote: > This change transforms a O(n^2) path to O(n) when prepending zero padding to > decimal outputs, where n is the length of the padding. Just as a note, I've been thinking about adding a `repeat(String src, int count)` method to

Re: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point

2023-01-11 Thread Raffaello Giulietti
On Wed, 11 Jan 2023 11:53:58 GMT, Alan Bateman wrote: >> This change transforms a O(n^2) path to O(n) when prepending zero padding to >> decimal outputs, where n is the length of the padding. > > I assume this issue has been there for a long time, just not noticed because > it would be unusual

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

2023-01-11 Thread Maurizio Cimadamore
On Wed, 11 Jan 2023 02:19:26 GMT, Jorn Vernee wrote: > 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.

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

2023-01-11 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

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

2023-01-11 Thread Per Minborg
On Wed, 11 Jan 2023 02:19:26 GMT, Jorn Vernee wrote: > 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. LGTM

Re: RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point

2023-01-11 Thread Alan Bateman
On Wed, 11 Jan 2023 10:47:03 GMT, Raffaello Giulietti wrote: > This change transforms a O(n^2) path to O(n) when prepending zero padding to > decimal outputs, where n is the length of the padding. I assume this issue has been there for a long time, just not noticed because it would be

RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point

2023-01-11 Thread Raffaello Giulietti
This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding. - Commit messages: - 8299677: Formatter.format might take a long time to format an integer or floating-point Changes:

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

2023-01-11 Thread Andrey Turbanov
On Wed, 11 Jan 2023 09:22:24 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

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

2023-01-11 Thread Maurizio Cimadamore
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

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

2023-01-11 Thread Alan Bateman
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

[jdk20] RFR: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR

2023-01-11 Thread Christoph Langer
Hi all, This pull request contains a backport of [JDK-8299439](https://bugs.openjdk.org/browse/JDK-8299439), commit [3b374c01](https://github.com/openjdk/jdk/commit/3b374c0153950ab193f3a188b57d3404b4ce2fe2) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being

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

2023-01-11 Thread Per Minborg
On Wed, 11 Jan 2023 09:13:27 GMT, Andrey Turbanov wrote: >> Per Minborg has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Update src/java.base/share/classes/java/io/ObjectStreamConstants.java >> >>Co-authored-by: Andrey Turbanov

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

2023-01-11 Thread Andrey Turbanov
On Wed, 11 Jan 2023 09:17:52 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

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

2023-01-11 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

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

2023-01-11 Thread Andrey Turbanov
On Wed, 11 Jan 2023 09:13:28 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

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

2023-01-11 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

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

2023-01-11 Thread Alan Bateman
On Wed, 11 Jan 2023 08:30:01 GMT, Per Minborg wrote: >> src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileStore.java line 43: >> >>> 41: * @author Xueming Shen, Rajendra Gutupalli, Jaya Hangal >>> 42: */ >>> 43: final class ZipFileStore extends FileStore { >> >> This should be OK but might

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

2023-01-11 Thread Per Minborg
On Tue, 10 Jan 2023 17:33:26 GMT, Roger Riggs wrote: > The `static` declarations should be restored in ObjectStreamConstants. This has been fixed in [a previous commit](https://github.com/openjdk/jdk/pull/11848/commits/f231c16b9074c711ed6a417331a35a205516532a) - PR:

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

2023-01-11 Thread Per Minborg
> This PR proposes to add null-checking for some parameter arguments in > `ZipFileStore`. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Fix typo and add bug ref - Changes: - all:

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

2023-01-11 Thread Per Minborg
> This PR proposes to add null-checking for some parameter arguments in > `ZipFileStore`. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Add test method comment - Changes: - all:

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

2023-01-11 Thread Per Minborg
On Tue, 10 Jan 2023 17:29:56 GMT, Lance Andersen wrote: > This should be OK but might suggest adding a release note Do we need to do that for a package-private class? Maybe for internal use? - PR: https://git.openjdk.org/jdk/pull/11926

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

2023-01-11 Thread Per Minborg
> This PR proposes to add null-checking for some parameter arguments in > `ZipFileStore`. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Rename and improve NPE testing - Changes: - all: