Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v12]

2025-05-14 Thread Timofei Pushkin
On Wed, 14 May 2025 08:18:39 GMT, Timofei Pushkin wrote: >> If a base class is package-private then its subclasses should have the same >> package name and defining class loader, otherwise `IllegalAccessError` is >> thrown when linking a subclass. Currently when dumping a static archive >> sep

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Johannes Döbler
On Wed, 14 May 2025 20:52:00 GMT, Markus KARG wrote: >> There's nothing in the CharSequence interface that requires or indicates >> that the implementation is or is not immutable. Interfaces only have loosely >> defined contracts, only the signature of the methods, the caller can not >> hold a

Re: RFR: 8356993: ArrayDeque should use Arrays.fill() instead of for() loops

2025-05-14 Thread Alan Bateman
On Wed, 14 May 2025 19:37:37 GMT, Archie Cobbs wrote: > Please review this small performance tweak `ArrayDeque`. > > `ArrayDeque` has an invariant in which any unused elements in the array must > be null. In a couple of places, the code is setting contiguous ranges of > elements to null using

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Markus KARG
On Wed, 14 May 2025 22:31:46 GMT, Stuart Marks wrote: >> I know that comment already, but IMHO we can simply use `@implSpec` to >> unambiguously make clear that this method invokes `read(char[])` to allow >> optimized implementations, and it *might* in turn invoke >> `read(char[],int,int)`, bu

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v22]

2025-05-14 Thread Markus KARG
On Wed, 14 May 2025 22:19:39 GMT, Stuart Marks wrote: >> I meant that the implementation of `subSequence` *might or might not* >> perform copy (so we need to tell the javaDoc reader), while `getChar` >> *clearly* performs a copy as part of it design. So `subSequence` can be >> surprising as th

Re: RFR: 8354083: Support --add-reads with -XX:+AOTClassLinking [v2]

2025-05-14 Thread Ioi Lam
On Thu, 15 May 2025 00:16:32 GMT, Calvin Cheung wrote: >> This fix adds the `--add-reads` support for CDS and AOTClassLinking. >> Before the fix, if the `--add-reads` is specified during CDS archive >> dumping, the user will see the following log if `-Xlog:cds=info` is enabled: >> `[0.000s][info

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v9]

2025-05-14 Thread Vladimir Kozlov
On Thu, 15 May 2025 03:23:40 GMT, Ioi Lam wrote: >> This is the implementation of the draft [JEP: Ahead-of-time Command Line >> Ergonomics](https://bugs.openjdk.org/browse/JDK-8350022) >> >> - Implemented new flag `AOTCacheOutput`, which can be used to create an AOT >> cache using the "one-com

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v8]

2025-05-14 Thread Vladimir Kozlov
On Thu, 15 May 2025 03:15:23 GMT, Ioi Lam wrote: >> src/hotspot/share/runtime/arguments.cpp line 3060: >> >>> 3058: } >>> 3059: >>> 3060: static JavaVMOption* get_last_aotmode_arg(const JavaVMInitArgs* args) >>> { >> >> I don't like that we pollute `Arguments` code with AOT specific flags >>

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v9]

2025-05-14 Thread Ioi Lam
> This is the implementation of the draft [JEP: Ahead-of-time Command Line > Ergonomics](https://bugs.openjdk.org/browse/JDK-8350022) > > - Implemented new flag `AOTCacheOutput`, which can be used to create an AOT > cache using the "one-command workflow" > - Added processing of the `JAVA_AOT_OPT

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v8]

2025-05-14 Thread Ioi Lam
On Wed, 14 May 2025 15:38:06 GMT, Vladimir Kozlov wrote: >> Ioi Lam has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - java.md updates from @rose00 >> - Resolved differences with CSR JDK-8356010 > > src/hotspot/share/cds/cds_globals.hpp

Re: RFR: 8356980: Better handling of non-breaking space

2025-05-14 Thread Naoto Sato
On Thu, 15 May 2025 02:25:30 GMT, Sergey Bylokhov wrote: >> I believe it is OK to leave these as UTF-8 native characters, as these files >> are l10n resource bundles. If we wanted to replace those look-alike spaces >> to unicode escapes, other characters may also need the same treatment, such

Re: RFR: 8356980: Better handling of non-breaking space

2025-05-14 Thread Sergey Bylokhov
On Wed, 14 May 2025 17:34:45 GMT, Naoto Sato wrote: >> For the l10n files, they are synced by the translation team and we don't >> edit them. IMO, I think it's fine leaving those ones as is. Especially >> because language rules can cause different spacing and punctuation >> characters, so gene

Re: RFR: 8354083: Support --add-reads with -XX:+AOTClassLinking [v2]

2025-05-14 Thread Calvin Cheung
On Thu, 15 May 2025 00:16:32 GMT, Calvin Cheung wrote: >> This fix adds the `--add-reads` support for CDS and AOTClassLinking. >> Before the fix, if the `--add-reads` is specified during CDS archive >> dumping, the user will see the following log if `-Xlog:cds=info` is enabled: >> `[0.000s][info

Re: RFR: 8354083: Support --add-reads with -XX:+AOTClassLinking [v2]

2025-05-14 Thread Calvin Cheung
> This fix adds the `--add-reads` support for CDS and AOTClassLinking. > Before the fix, if the `--add-reads` is specified during CDS archive dumping, > the user will see the following log if `-Xlog:cds=info` is enabled: > `[0.000s][info][cds] optimized module handling: disabled due to incompatibl

Re: RFR: 8354475: TestDockerMemoryMetricsSubgroup.java fails with exitValue = 1 [v2]

2025-05-14 Thread Mikhailo Seledtsov
On Tue, 13 May 2025 04:06:34 GMT, PAWAN CHAWDHARY wrote: >> 8354475: TestDockerMemoryMetricsSubgroup.java fails with exitValue = 1 > > PAWAN CHAWDHARY has updated the pull request incrementally with one > additional commit since the last revision: > > Update TestDockerMemoryMetricsSubgroup.ja

RFR: 8283660: Convert com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java finalizer to Cleaner

2025-05-14 Thread Brent Christian
Please review this change to replace the finalizer in `AbstractLdapNamingEnumeration` with Cleaner. (The [first PR](https://github.com/openjdk/jdk/pull/8311) for this fix started some substantial discussions, leading to, among other things, the [8314480](https://bugs.openjdk.org/browse/JDK-8314

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v12]

2025-05-14 Thread Calvin Cheung
On Wed, 14 May 2025 08:18:39 GMT, Timofei Pushkin wrote: >> If a base class is package-private then its subclasses should have the same >> package name and defining class loader, otherwise `IllegalAccessError` is >> thrown when linking a subclass. Currently when dumping a static archive >> sep

Re: RFR: 8354475: TestDockerMemoryMetricsSubgroup.java fails with exitValue = 1 [v2]

2025-05-14 Thread Mikhailo Seledtsov
On Tue, 13 May 2025 04:06:34 GMT, PAWAN CHAWDHARY wrote: >> 8354475: TestDockerMemoryMetricsSubgroup.java fails with exitValue = 1 > > PAWAN CHAWDHARY has updated the pull request incrementally with one > additional commit since the last revision: > > Update TestDockerMemoryMetricsSubgroup.ja

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Stuart Marks
On Wed, 14 May 2025 17:53:48 GMT, Markus KARG wrote: >> The code should use the three-arg read() call in order to limit self-calls, >> in order to avoid the fragile base class problem. At some point we might >> want to add implSpec tags to specify this. See my previous comments relate >> to th

Re: RFR: 8352926: New test TestDockerMemoryMetricsSubgroup.java fails [v3]

2025-05-14 Thread Mikhailo Seledtsov
On Fri, 2 May 2025 10:00:07 GMT, PAWAN CHAWDHARY wrote: >> 8352926: New test TestDockerMemoryMetricsSubgroup.java fails > > PAWAN CHAWDHARY has updated the pull request incrementally with one > additional commit since the last revision: > > Refactor container runtime version code Overall cha

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v22]

2025-05-14 Thread Stuart Marks
On Wed, 14 May 2025 21:02:20 GMT, Markus KARG wrote: >> Both `subSequence` and `getChars` are implemented by the CharSequence. >> They have the same level of trustworthiness about their implementation. > > I meant that the implementation of `subSequence` *might or might not* perform > copy (so w

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v12]

2025-05-14 Thread Ioi Lam
On Wed, 14 May 2025 10:12:11 GMT, Timofei Pushkin wrote: > Sorry, had to pause working on this for some time because of other stuff. > > I believe I have addressed all the existing comments now. Thanks for making the changes. Once this PR has 2 reviews and is final, I will run some tests in o

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v12]

2025-05-14 Thread Ioi Lam
On Wed, 14 May 2025 08:18:39 GMT, Timofei Pushkin wrote: >> If a base class is package-private then its subclasses should have the same >> package name and defining class loader, otherwise `IllegalAccessError` is >> thrown when linking a subclass. Currently when dumping a static archive >> sep

Re: Finding max or min of exactly two objects

2025-05-14 Thread Peter Levart
Hi, I don't know if anyone still uses this, but some ideas are worth considering: https://github.com/google/guava/blob/master/guava/src/com/google/common/collect/Ordering.java This is a Comparator implementation that also defines min and max. As generic methods. So if I have: Comparator

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v22]

2025-05-14 Thread Markus KARG
On Wed, 14 May 2025 20:58:47 GMT, Roger Riggs wrote: >> BTW, paraphrasing Stuart here: "We want to reduce self-calls". `subSequence` >> is a self-call, *as we do not know* how it behaves in the actual >> implementation. For `getChars` we can be sure that it has no overridable >> side effects.

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v22]

2025-05-14 Thread Roger Riggs
On Wed, 14 May 2025 20:36:47 GMT, Markus KARG wrote: >> Actually I am working on exact these optimizations right now and do not like >> the idea that I have to file another JBS and PR just for a single code line. >> As `subSequence` typically *does* a copy (to not hold the original full text >

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Markus KARG
On Wed, 14 May 2025 20:22:02 GMT, Roger Riggs wrote: >>> Maybe a good idea at this point if @mkarg could provide an example of >>> server code benefitting from returning a CharSequence... >> >> The most simple example is a file server. Incidential fact, just today I >> wrote a function that si

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v22]

2025-05-14 Thread Markus KARG
On Wed, 14 May 2025 20:32:38 GMT, Markus KARG wrote: >> I have no idea whether `subSequence` is more performant than `getChars` but >> it seems cleaner. In any case, at this point we are concerned primarily with >> the APIs getting into JDK 25. We can improve performance after that. > > Actuall

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v22]

2025-05-14 Thread Markus KARG
On Wed, 14 May 2025 20:14:21 GMT, Brian Burkhalter wrote: >> I think this may be a good way to reduce redundant allocation if the >> CharSequence's subsequence is a simple view (frequently the case for user >> ones) or a String (for StringBuilder, String) > > I have no idea whether `subSequence

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Roger Riggs
On Wed, 14 May 2025 19:41:30 GMT, Markus KARG wrote: >> A "pure" `CharSequence` *is* immutable, as it does not have mutation >> methods. Also, why *should* the result be immutable? If someone wants to >> return a `StringBuilder` for example (for whatever intent), why shouldn't he >> allowed to

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v22]

2025-05-14 Thread Brian Burkhalter
On Wed, 14 May 2025 20:00:50 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/io/Reader.java line 206: >> >>> 204: ensureOpen(); >>> 205: int len = cs.length(); >>> 206: String result = cs.subSequence(next, len).toString(); >> >> Are you

Re: Finding max or min of exactly two objects

2025-05-14 Thread Tagir Valeev
Hello! On Tue, May 13, 2025 at 5:53 PM Brian Goetz wrote: > Let's separate these. I think the first two have a good claim to be in > Comparator; I think the latter two probably live better in Comparable, > which feels like a separate conversation (and maybe less important?) > (And also, there's

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v22]

2025-05-14 Thread Chen Liang
On Wed, 14 May 2025 19:44:56 GMT, Markus KARG wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8354724: Replace getChars in previous commit with subSequence > > src/java.base/share/classes/java/io/Reader.java li

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v22]

2025-05-14 Thread Markus KARG
On Wed, 14 May 2025 18:16:22 GMT, Brian Burkhalter wrote: >> Implement the requested methods and add a test thereof. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8354724: Replace getChars in previous commit with subS

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Markus KARG
On Wed, 14 May 2025 19:37:57 GMT, Markus KARG wrote: >> The result should be immutable and CharSequence does not provide that. >> The contents should not be modifiable after the method returns. > > A "pure" `CharSequence` *is* immutable, as it does not have mutation methods. > Also, why *should

RFR: 8356993: ArrayDeque should use Arrays.fill() instead of for() loops

2025-05-14 Thread Archie Cobbs
Please review this small performance tweak `ArrayDeque`. `ArrayDeque` has an invariant in which any unused elements in the array must be null. In a couple of places, the code is setting contiguous ranges of elements to null using `for()` loops. This can be both simplified and sped up by using `

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Markus KARG
On Wed, 14 May 2025 18:16:08 GMT, Roger Riggs wrote: >> Maybe a good idea at this point if @mkarg could provide an example of server >> code benefitting from returning a CharSequence... > > The result should be immutable and CharSequence does not provide that. > The contents should not be modif

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Markus KARG
On Wed, 14 May 2025 17:52:37 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/io/Reader.java line 500: >> >>> 498: * @since 25 >>> 499: */ >>> 500: public String readAllAsString() throws IOException { >> >> Still thinking that declaring `CharSequence` instead of `String`

Re: RFR: 8354556: Expand value-based class warnings to java.lang.ref API [v13]

2025-05-14 Thread Jan Lahoda
On Tue, 13 May 2025 19:36:11 GMT, Vicente Romero wrote: >> This PR is defining a new internal annotation, >> `@jdk.internal.RequiresIdentity`, with target types PARAMETER and >> TYPE_PARAMETER. The @RequiresIdentity annotation expresses the expectation >> that an argument to a given method or

Re: RFR: 8077587: BigInteger Roots [v15]

2025-05-14 Thread fabioromano1
On Wed, 14 May 2025 18:48:50 GMT, Raffaello Giulietti wrote: >> fabioromano1 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert "Use type long for bitLength instead of int" >> >> This reverts commit c8e1b8159206d9fb5532df7ccdf9

Re: RFR: 8077587: BigInteger Roots [v15]

2025-05-14 Thread Raffaello Giulietti
On Wed, 14 May 2025 18:07:08 GMT, fabioromano1 wrote: >> This PR implements nth root computation for BigIntegers using Newton method. > > fabioromano1 has updated the pull request incrementally with one additional > commit since the last revision: > > Revert "Use type long for bitLength inste

Re: RFR: 8354556: Expand value-based class warnings to java.lang.ref API [v13]

2025-05-14 Thread Jan Lahoda
On Tue, 13 May 2025 19:36:11 GMT, Vicente Romero wrote: >> This PR is defining a new internal annotation, >> `@jdk.internal.RequiresIdentity`, with target types PARAMETER and >> TYPE_PARAMETER. The @RequiresIdentity annotation expresses the expectation >> that an argument to a given method or

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Markus KARG
On Wed, 14 May 2025 17:56:04 GMT, Markus KARG wrote: >> I think this is just a convenience API. A CharSequence-returning API would >> suit better if it supports arbitrarily long lengths (assuming such a length >> is in the range of int), while String has implementation limits on lengths >> and

Re: RFR: 8077587: BigInteger Roots [v15]

2025-05-14 Thread fabioromano1
On Wed, 14 May 2025 18:27:28 GMT, Raffaello Giulietti wrote: > I doubt that the AKS primality test is of any practical relevance, although > it's a _great_ theoretical achievement. Yes, indeed it was just an example, but the exact power detection can be used also as a test apart from the enti

Re: RFR: 8077587: BigInteger Roots [v15]

2025-05-14 Thread Raffaello Giulietti
On Wed, 14 May 2025 18:07:08 GMT, fabioromano1 wrote: >> This PR implements nth root computation for BigIntegers using Newton method. > > fabioromano1 has updated the pull request incrementally with one additional > commit since the last revision: > > Revert "Use type long for bitLength inste

Re: RFR: 8353113: Peer supported certificate signature algorithms are not being checked with default SunX509 key manager [v4]

2025-05-14 Thread Artur Barashev
> When the deafult SunX509KeyManagerImpl is being used we are in violation of > TLSv1.3 RFC spec because we ignore peer supported certificate signatures sent > to us in "signature_algorithms"/"signature_algorithms_cert" extensions: > https://datatracker.ietf.org/doc/html/rfc8446#section-4.4.2.2 >

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Roger Riggs
On Wed, 14 May 2025 18:09:26 GMT, Johannes Döbler wrote: >> BTW, it will *already* throw OOME as-is, *because* it returns a `String` >> even if the Reader is attached to an infinite source. > > Maybe a good idea at this point if @mkarg could provide an example of server > code benefitting from

Re: RFR: 8077587: BigInteger Roots [v6]

2025-05-14 Thread fabioromano1
On Wed, 14 May 2025 17:59:59 GMT, Raffaello Giulietti wrote: > I guess this work will be the basis for a future work on `BigDecimal` _n_-th > root? @rgiulietti Yes, it is. Some use cases could be primality testing, like AKS, where part of the algorithm detect composite numbers by checking whe

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v22]

2025-05-14 Thread Brian Burkhalter
> Implement the requested methods and add a test thereof. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8354724: Replace getChars in previous commit with subSequence - Changes: - all: https://git.openjdk.org/jdk/

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Brian Burkhalter
On Wed, 14 May 2025 17:32:50 GMT, Markus KARG wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8354724: "stream" -> "reader" > > src/java.base/share/classes/java/io/Reader.java line 205: > >> 203: p

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Johannes Döbler
On Wed, 14 May 2025 17:57:36 GMT, Markus KARG wrote: >> BTW, it will not fail with OOME, but it should throw IOE in that case. > > BTW, it will *already* throw OOME as-is, *because* it returns a `String` even > if the Reader is attached to an infinite source. Maybe a good idea at this point if

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v21]

2025-05-14 Thread Brian Burkhalter
> Implement the requested methods and add a test thereof. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8354724: Improve readAllAsString method of Reader returned by Reader.of - Changes: - all: https://git.openjd

Re: RFR: 8077587: BigInteger Roots [v15]

2025-05-14 Thread fabioromano1
> This PR implements nth root computation for BigIntegers using Newton method. fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: Revert "Use type long for bitLength instead of int" This reverts commit c8e1b8159206d9fb5532df7ccdf98a

Re: RFR: 8077587: BigInteger Roots [v6]

2025-05-14 Thread Raffaello Giulietti
On Mon, 12 May 2025 19:23:16 GMT, fabioromano1 wrote: >> @fabioromano1 Is [this >> proof](https://github.com/user-attachments/files/19785045/nth_root_newton_proof_integers.pdf) >> still relevant? > > @rgiulietti No, the proof of the recurrence used is the one by Zimmermann > linked in the code

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Markus KARG
On Wed, 14 May 2025 17:56:44 GMT, Markus KARG wrote: >> As being a server developer for decades I need to say that I would love to >> have this not for convenience but for the performance reasons explained >> above, and that `int` length is perfect to speed up 99,9% of all cases. So >> we shou

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Chen Liang
On Wed, 14 May 2025 17:41:12 GMT, Markus KARG wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8354724: "stream" -> "reader" > > src/java.base/share/classes/java/io/Reader.java line 500: > >> 498: * @since

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Markus KARG
On Wed, 14 May 2025 17:42:33 GMT, Stuart Marks wrote: >>> so that all concrete implementations in this class call only the abstract >>> three-arg read() method >> >> Done in 3cbaede and also `str` -> `cbuf`. > > The code should use the three-arg read() call in order to limit self-calls, > in o

Re: RFR: 8077587: BigInteger Roots [v14]

2025-05-14 Thread fabioromano1
> This PR implements nth root computation for BigIntegers using Newton method. fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: Use type long for bitLength instead of int - Changes: - all: https://git.openjdk.org/jdk/pu

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Stuart Marks
On Wed, 14 May 2025 17:40:53 GMT, Brian Burkhalter wrote: >> All other self-calls to a `read` method are to the three-arg abstract method: >> >> $ grep read( src/java.base/share/classes/java/io/Reader.java | grep -v >> public | grep -v * >> nread = this.read(cbuf, off, rem); >>

Re: RFR: 8356980: Better handling of non-breaking space

2025-05-14 Thread Naoto Sato
On Wed, 14 May 2025 17:18:35 GMT, Justin Lu wrote: >> src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_fr.properties >> line 39: >> >>> 37: GTKColorChooserPanel.hue.textAndMnemonic=&Teinte : >>> 38: >>> 39: GTKColorChooserPanel.red.textAndMnemonic=Roug&e\u00a0: >> >> S

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Brian Burkhalter
On Wed, 14 May 2025 17:25:00 GMT, Markus KARG wrote: >> src/java.base/share/classes/java/io/Reader.java line 403: >> >>> 401: char[] str = new char[TRANSFER_BUFFER_SIZE]; >>> 402: int n; >>> 403: while ((n = read(str)) != -1) { >> >> I'd suggest changing this call to `th

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v20]

2025-05-14 Thread Brian Burkhalter
> Implement the requested methods and add a test thereof. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8354724: Change readAllCharsAsString as suggested; move test to proper location - Changes: - all: https://g

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Brian Burkhalter
On Wed, 14 May 2025 17:39:05 GMT, Brian Burkhalter wrote: >> I think `read(str)` is to be preferred over `read(str, 0, str.length()` as >> it allows implementations to provide optimized implementations. What the >> caller of the new methods wants to achieve is getting everything in the best >>

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Markus KARG
On Tue, 13 May 2025 15:33:39 GMT, Brian Burkhalter wrote: >> Implement the requested methods and add a test thereof. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8354724: "stream" -> "reader" src/java.base/share/cla

Integrated: 8356420: Provide examples on wrapping System.in

2025-05-14 Thread Naoto Sato
On Fri, 9 May 2025 19:53:24 GMT, Naoto Sato wrote: > With the introduction of `stdin.encoding` > ([JDK-8350703](https://bugs.openjdk.org/browse/JDK-8350703)), some guidance > for users to decode `System.in` would be desirable. Adding examples in the > field description would help. This pull r

Re: RFR: 8356420: Provide examples on wrapping System.in [v6]

2025-05-14 Thread Naoto Sato
On Tue, 13 May 2025 03:15:25 GMT, Naoto Sato wrote: >> With the introduction of `stdin.encoding` >> ([JDK-8350703](https://bugs.openjdk.org/browse/JDK-8350703)), some guidance >> for users to decode `System.in` would be desirable. Adding examples in the >> field description would help. > > Nao

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v6]

2025-05-14 Thread Lance Andersen
On Wed, 14 May 2025 16:39:54 GMT, Henry Jen wrote: > UTF-8 messed up the index, we don't want any conversion to happen. Warning: > Entry META-INFMAANIFEST.MF in local file header is not in central directory > Warning: Entry META-INF/BANIFEST.MF in local file header is not in central > director

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Markus KARG
On Wed, 14 May 2025 17:01:30 GMT, Stuart Marks wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8354724: "stream" -> "reader" > > src/java.base/share/classes/java/io/Reader.java line 403: > >> 401: char

Re: RFR: 8356980: Better handling of non-breaking space

2025-05-14 Thread Justin Lu
On Wed, 14 May 2025 16:59:23 GMT, Phil Race wrote: >> Non-breaking space characters are problematic. They look identical to the >> normal space character, but is not. For that reason, it should never be >> typed as an UTF-8 literal, but only by using unicode sequences. >> >> I have checked: >>

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v3]

2025-05-14 Thread Lance Andersen
On Mon, 12 May 2025 10:16:33 GMT, David Beaumont wrote: >> Adding read-only support to ZipFileSystem. >> >> The new `accessMode` environment property allows for readOnly and readWrite >> values, and ensures that the requested mode is consistent with what's >> returned. >> >> This involved a l

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Stuart Marks
On Tue, 13 May 2025 15:33:39 GMT, Brian Burkhalter wrote: >> Implement the requested methods and add a test thereof. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8354724: "stream" -> "reader" src/java.base/share/cla

Re: RFR: 8356980: Better handling of non-breaking space

2025-05-14 Thread Phil Race
On Wed, 14 May 2025 15:11:24 GMT, Magnus Ihse Bursie wrote: > Non-breaking space characters are problematic. They look identical to the > normal space character, but is not. For that reason, it should never be typed > as an UTF-8 literal, but only by using unicode sequences. > > I have checked

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v3]

2025-05-14 Thread Lance Andersen
On Mon, 12 May 2025 10:16:33 GMT, David Beaumont wrote: >> Adding read-only support to ZipFileSystem. >> >> The new `accessMode` environment property allows for readOnly and readWrite >> values, and ensures that the requested mode is consistent with what's >> returned. >> >> This involved a l

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v6]

2025-05-14 Thread Henry Jen
On Wed, 7 May 2025 17:41:07 GMT, Lance Andersen wrote: >> Henry Jen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Restore Validator access level > > test/jdk/tools/jar/ValidatorTest.java line 145: > >> 143: var template = out.

Withdrawn: 8143850: Add indexed get() and set() methods to ArrayDeque

2025-05-14 Thread Archie Cobbs
On Mon, 12 May 2025 18:24:27 GMT, Archie Cobbs wrote: > Because it is backed by an array, the `ArrayDeque` class has the ability to > get and replace any element in the list (accessed by index) in constant time. > However, this capability is not exposed in the API. > > Please review this PR wh

Re: RFR: 8143850: Add indexed get() and set() methods to ArrayDeque

2025-05-14 Thread Archie Cobbs
On Mon, 12 May 2025 18:24:27 GMT, Archie Cobbs wrote: > Because it is backed by an array, the `ArrayDeque` class has the ability to > get and replace any element in the list (accessed by index) in constant time. > However, this capability is not exposed in the API. > > Please review this PR wh

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v8]

2025-05-14 Thread Vladimir Kozlov
On Wed, 14 May 2025 06:16:15 GMT, Ioi Lam wrote: >> This is the implementation of the draft [JEP: Ahead-of-time Command Line >> Ergonomics](https://bugs.openjdk.org/browse/JDK-8350022) >> >> - Implemented new flag `AOTCacheOutput`, which can be used to create an AOT >> cache using the "one-com

Re: RFR: 8356904: Skip jdk/test/lib/process/TestNativeProcessBuilder on static-jdk [v2]

2025-05-14 Thread Jiangli Zhou
On Wed, 14 May 2025 13:21:37 GMT, SendaoYan wrote: >> Jiangli Zhou has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update copyright year in >> test/lib-test/jdk/test/lib/process/TestNativeProcessBuilder.java. > > test/lib-test/TEST.ROOT

Re: RFR: 8356904: Skip jdk/test/lib/process/TestNativeProcessBuilder on static-jdk [v2]

2025-05-14 Thread Jiangli Zhou
> Please review this PR for skipping > jdk/test/lib/process/TestNativeProcessBuilder on static-jdk. Duplicating the > context from https://bugs.openjdk.org/browse/JDK-8356904 description: > > jdk/test/lib/process/TestNativeProcessBuilder.java (in lib-test/tier1) uses a > native test launcher ex

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory [v6]

2025-05-14 Thread Andrew Dinn
On Wed, 14 May 2025 10:47:40 GMT, Andrew Haley wrote: >> This intrinsic is generally faster than the current implementation for >> Panama segment operations for all writes larger than about 8 bytes in size, >> increasing to more than 2* the performance on larger memory blocks on >> Graviton 2,

RFR: 8356980: Better handling of non-breaking space

2025-05-14 Thread Magnus Ihse Bursie
Non-breaking space characters are problematic. They look identical to the normal space character, but is not. For that reason, it should never be typed as an UTF-8 literal, but only by using unicode sequences. I have checked: * U+00A0 NO-BREAK SPACE (NBSP) * U+202F NARROW NO-BREAK SPACE (NNBSP)

RFR: 8356974: tools/launcher/ToolsOpts.java fails if the build id contains "-J"

2025-05-14 Thread Manuel Hässig
When passing `-J-version` to the patched javac, `tools/launcher/ToolsOpts.java` wants to verify that the output corresponds to the expected version output. However, if the build id of the JDK running this test contains the substring "-J", then the test fails incorrectly at: https://github.com/o

Re: RFR: 8356709: Avoid redundant String formatting in BigDecimal.valueOf(double)

2025-05-14 Thread Raffaello Giulietti
On Sun, 11 May 2025 16:32:02 GMT, Johannes Graham wrote: >> Optimize `BigDecimal.valueOf(double)` by using `FormattedFPDecimal` instead >> of converting to decimal string and then parsing it. This results in an >> approximate 6x improvement for me. > > On Aarch64 M4: > > Benchmark

Re: RFR: 8356709: Avoid redundant String formatting in BigDecimal.valueOf(double) [v2]

2025-05-14 Thread Raffaello Giulietti
On Wed, 14 May 2025 13:33:32 GMT, Johannes Graham wrote: >> test/jdk/java/math/BigDecimal/ValueOfDouble.java line 41: >> >>> 39: >>> 40: public class ValueOfDouble { >>> 41: private static final String DIGITS = "1234567899123456789"; // >>> Enough digits to fill a long >> >> Suggestion: >

Re: RFR: 8356709: Avoid redundant String formatting in BigDecimal.valueOf(double) [v3]

2025-05-14 Thread Raffaello Giulietti
On Wed, 14 May 2025 13:47:11 GMT, Johannes Graham wrote: >> Optimize `BigDecimal.valueOf(double)` by using `FormattedFPDecimal` instead >> of converting to decimal string and then parsing it. This results in an >> approximate 6x improvement for me. > > Johannes Graham has updated the pull reque

Re: RFR: 8356709: Avoid redundant String formatting in BigDecimal.valueOf(double) [v4]

2025-05-14 Thread Johannes Graham
> Optimize `BigDecimal.valueOf(double)` by using `FormattedFPDecimal` instead > of converting to decimal string and then parsing it. This results in an > approximate 6x improvement for me. Johannes Graham has updated the pull request incrementally with three additional commits since the last re

RFR: 8356978: Convert unicode sequences in Java source code to UTF-8

2025-05-14 Thread Magnus Ihse Bursie
After we converted the source base to be fully UTF-8, we do not need to use unicode sequences (like \u0123) in string literals. Sometimes, that might still make sense, as for control characters, non-breaking space, etc. But for strings that is supposed to be a coherent text in a language that ne

RFR: 8356977: UTF-8 cleanups

2025-05-14 Thread Magnus Ihse Bursie
I found a few other places in the code that can be cleaned up after the conversion to UTF-8. - Commit messages: - Replace uncessary unicode characters with ASCII in instructions, and fix typo - Seems like typos in the comments - Fix unicode sequences in comments (previously missed

Re: RFC: 8356679: Using CharSequence::getChars internally

2025-05-14 Thread Roger Riggs
Hi Markus, Starting out with the common case is a good idea for the first PR. I much prefer a PR with a single goal and that comes to a conclusion and does not add new features or changes after the PR is submitted. I tend to lose interest in PRs with lots of churn, it means I have to re-review

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory [v6]

2025-05-14 Thread Per Minborg
On Wed, 14 May 2025 10:47:40 GMT, Andrew Haley wrote: >> This intrinsic is generally faster than the current implementation for >> Panama segment operations for all writes larger than about 8 bytes in size, >> increasing to more than 2* the performance on larger memory blocks on >> Graviton 2,

Re: RFR: 8356709: Avoid redundant String formatting in BigDecimal.valueOf(double) [v3]

2025-05-14 Thread Johannes Graham
> Optimize `BigDecimal.valueOf(double)` by using `FormattedFPDecimal` instead > of converting to decimal string and then parsing it. This results in an > approximate 6x improvement for me. Johannes Graham has updated the pull request incrementally with one additional commit since the last revis

Re: RFR: 8356709: Avoid redundant String formatting in BigDecimal.valueOf(double) [v2]

2025-05-14 Thread Johannes Graham
On Wed, 14 May 2025 09:55:35 GMT, Raffaello Giulietti wrote: >> Johannes Graham has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fix code tag in javadoc > > src/java.base/share/classes/java/math/BigDecimal.java line 1408: > >> 1406:

Re: RFR: 8356904: Skip jdk/test/lib/process/TestNativeProcessBuilder on static-jdk

2025-05-14 Thread SendaoYan
On Tue, 13 May 2025 21:28:00 GMT, Jiangli Zhou wrote: > Please review this PR for skipping > jdk/test/lib/process/TestNativeProcessBuilder on static-jdk. Duplicating the > context from https://bugs.openjdk.org/browse/JDK-8356904 description: > > jdk/test/lib/process/TestNativeProcessBuilder.ja

Re: RFR: 8341184: Clean up the interaction between the launcher native code and the LauncherHelper [v16]

2025-05-14 Thread Jaikiran Pai
On Mon, 24 Feb 2025 09:46:29 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change, which simplifies the interaction >> between the `java` launcher's native code with the >> `sun.launcher.LauncherHelper`? >> >> As noted in https://bugs.openjdk.org/browse/JDK-8341184, this propo

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v12]

2025-05-14 Thread Timofei Pushkin
On Wed, 14 May 2025 08:18:39 GMT, Timofei Pushkin wrote: >> If a base class is package-private then its subclasses should have the same >> package name and defining class loader, otherwise `IllegalAccessError` is >> thrown when linking a subclass. Currently when dumping a static archive >> sep

Integrated: 8352533: Report useful IOExceptions when jspawnhelper fails

2025-05-14 Thread Aleksey Shipilev
On Fri, 21 Mar 2025 10:00:26 GMT, Aleksey Shipilev wrote: > When jspawnhelper fails for whatever reason, but more prominently due to > [JDK-8325621](https://bugs.openjdk.org/browse/JDK-8325621), it will report > the errors into stdout, but not to the relevant `IOException`. So, if the > applic

Re: RFR: 8342869: Errors related to unused code on Windows after 8339120 in awt

2025-05-14 Thread Julian Waters
On Wed, 23 Oct 2024 05:07:37 GMT, Julian Waters wrote: > After 8339120, gcc began catching many different instances of unused code in > the Windows specific codebase. Some of these seem to be bugs. I've taken the > effort to mark out all the relevant globals and locals that trigger the > unuse

Re: RFC: 8356679: Using CharSequence::getChars internally

2025-05-14 Thread Markus KARG
Many of the modified classes derive from a common super class and share one needed common change (which is one of the points which are easy to see once you see all of those classes in a single PR, but hard to explain in plaint-text pre-PR mailing list threads), so at least those need to be disc

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory [v6]

2025-05-14 Thread Andrew Haley
> This intrinsic is generally faster than the current implementation for Panama > segment operations for all writes larger than about 8 bytes in size, > increasing to more than 2* the performance on larger memory blocks on > Graviton 2, between "panama" (C2 generated, what we use now) and "unsaf

Re: RFR: 8356709: Avoid redundant String formatting in BigDecimal.valueOf(double) [v2]

2025-05-14 Thread Raffaello Giulietti
On Tue, 13 May 2025 13:03:42 GMT, Johannes Graham wrote: >> Optimize `BigDecimal.valueOf(double)` by using `FormattedFPDecimal` instead >> of converting to decimal string and then parsing it. This results in an >> approximate 6x improvement for me. > > Johannes Graham has updated the pull reque

  1   2   >