Re: RFR: 8351897: Extra closing curly brace typos in Javadoc

2025-03-23 Thread Chen Liang
On Thu, 13 Mar 2025 01:57:20 GMT, Archie Cobbs wrote: >> src/java.base/share/classes/java/text/MessageFormat.java line 327: >> >>> 325: * {@code unit} >>> 326: * {@link ListFormat#getInstance(Locale, ListFormat.Type, >>> ListFormat.Style) >>> 327: * ListFormat.getInstance}{

Re: RFR: 8352642: Set zipinfo-time=false when constructing zipfs FileSystem in com.sun.tools.javac.file.JavacFileManager$ArchiveContainer for better performance

2025-03-23 Thread Chen Liang
On Sun, 23 Mar 2025 12:38:04 GMT, Jason Zaugg wrote: > 8352642: Set zipinfo-time=false when constructing zipfs FileSystem in > com.sun.tools.javac.file.JavacFileManager$ArchiveContainer for better > performance Looks good. Indeed JavacTask sets Option.MULTIRELEASE explicitly. Might need anoth

Re: Request for Enhancement: java.io.Writer.of(Appendable) as an efficient alternative to java.io.StringWriter

2025-03-23 Thread Chen Liang
Indeed, you are right: The Writer is for legacy APIs to consume instead of intended for users to operate on directly. The lack of IOE on those methods have no impact on the users. Even if we bikeshed about try-catching the returned Writer, StringWriter still declares to throw IOE on its close me

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v2]

2025-03-23 Thread Chen Liang
On Sun, 23 Mar 2025 10:37:47 GMT, Markus KARG wrote: >> This Pull Request proposes an implementation for >> [JDK-8343110](https://bugs.openjdk.org/browse/JDK-8343110): Adding the new >> method `public void getChars(int srcBegin, int srcEnd, char[] dst, int >> dstBegin)` to the `CharSequence` i

Re: RFR: 8347712: IllegalStateException on multithreaded ZipFile access with non-UTF8 charset [v6]

2025-03-23 Thread Chen Liang
On Sun, 23 Mar 2025 09:28:38 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to fix an issue >> `java.util.zip.ZipFile` which would cause failures when multiple instances >> of `ZipFile` using non-UTF8 `Charset` were operating against the same >> underlying

Re: RFR: 8066583: DeflaterInput/OutputStream and InflaterInput/OutputStream should explain responsibility for freeing resources [v5]

2025-03-23 Thread Chen Liang
On Thu, 20 Mar 2025 12:38:00 GMT, Jaikiran Pai wrote: >> Can I please get a review of this doc-only change which proposes to improve >> the API documentation of `DeflaterInputStream`, `DeflaterOutputStream`, >> `InflaterInputStream` and `InflaterOutputStream` classes? >> >> As noted in https:/

Re: RFR: 8066583: DeflaterInput/OutputStream and InflaterInput/OutputStream should explain responsibility for freeing resources [v5]

2025-03-23 Thread Chen Liang
On Thu, 20 Mar 2025 12:38:00 GMT, Jaikiran Pai wrote: >> Can I please get a review of this doc-only change which proposes to improve >> the API documentation of `DeflaterInputStream`, `DeflaterOutputStream`, >> `InflaterInputStream` and `InflaterOutputStream` classes? >> >> As noted in https:/

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

2025-03-23 Thread Chen Liang
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: Request for Enhancement: java.io.Writer.of(Appendable) as an efficient alternative to java.io.StringWriter

2025-03-23 Thread Markus KARG
Chen, limiting param type to StringBuilder (instead of Appendable) really makes things easier (without standing in the way of some future more general of() variant, eventually): We can easily clarify in JavaDocs how things work like (in the sense of "close and flush are no-ops"). I will prepa

Re: RFR: 8352064: AIX: now also able to build static-jdk image with a statically linked launcher [v4]

2025-03-23 Thread Magnus Ihse Bursie
On Fri, 21 Mar 2025 11:44:49 GMT, Joachim Kern wrote: >> After "JDK-8339480: Build static-jdk image with a statically linked >> launcher" AIX was not able to build the new target. Therefore with >> "JDK-8345590 AIX 'make all' fails after JDK-8339480" the new target was >> disabled again. >> >

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer

2025-03-23 Thread Markus KARG
On Sun, 23 Mar 2025 08:42:55 GMT, Chen Liang wrote: > Oops sorry, did a round of review but forgot to finish it :( No problem. I had the same problem several times before. 😃 - PR Comment: https://git.openjdk.org/jdk/pull/21730#issuecomment-2746137326

Re: RFR: 8347712: IllegalStateException on multithreaded ZipFile access with non-UTF8 charset [v2]

2025-03-23 Thread Eirik Bjørsnøs
On Sun, 23 Mar 2025 08:34:18 GMT, Eirik Bjørsnøs wrote: > This seems like a separate bug, independent of the concurrency concerns > described JDK-8347712. Consider the following test, which when added to `ZipCoding.java` fails in master but succeeds in this PR: /** * Verifies that opening a

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v2]

2025-03-23 Thread Markus KARG
On Sun, 23 Mar 2025 04:34:29 GMT, Chen Liang wrote: >> Markus KARG has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Applied changes requested by Chen > > src/java.base/share/classes/java/lang/CharSequence.java line 340: > >> 338: pub

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v2]

2025-03-23 Thread Markus KARG
> This Pull Request proposes an implementation for > [JDK-8343110](https://bugs.openjdk.org/browse/JDK-8343110): Adding the new > method `public void getChars(int srcBegin, int srcEnd, char[] dst, int > dstBegin)` to the `CharSequence` interface, providing a **bulk-read** > facility including a

Re: RFR: 8347712: IllegalStateException on multithreaded ZipFile access with non-UTF8 charset [v6]

2025-03-23 Thread Jaikiran Pai
> Can I please get a review of this change which proposes to fix an issue > `java.util.zip.ZipFile` which would cause failures when multiple instances of > `ZipFile` using non-UTF8 `Charset` were operating against the same underlying > ZIP file? This addresses https://bugs.openjdk.org/browse/JDK

Re: Request for Enhancement: java.io.Writer.of(Appendable) as an efficient alternative to java.io.StringWriter

2025-03-23 Thread Chen Liang
Sorry for a late reply. I wonder if we should make the return type StringWriter, given StringWriter does not throw on its Writer methods and has a convenient toString. (Making its close() not throws IOE is binary compatible but possibly not source compatible) I think this StringBuilder-accepting ve

Re: Missing offset+length Arrays.hashCode() methods?

2025-03-23 Thread Chen Liang
Indeed, this is a good proposal to reduce unnecessary allocation, especially if the executing thread does not share the array with another thread. FYI for String, I believe the no-low-allocation was mainly due to that Strings may have extended lifespan, and it's not feasible for a small substring t

Re: RFR: 8347712: IllegalStateException on multithreaded ZipFile access with non-UTF8 charset [v5]

2025-03-23 Thread Jaikiran Pai
On Sat, 22 Mar 2025 17:21:49 GMT, Alan Bateman wrote: >> Jaikiran Pai has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains nine additional >> commits

Re: RFR: 8347712: IllegalStateException on multithreaded ZipFile access with non-UTF8 charset [v2]

2025-03-23 Thread Jaikiran Pai
On Sat, 22 Mar 2025 17:17:26 GMT, Alan Bateman wrote: >> src/java.base/share/classes/java/util/zip/ZipFile.java line 86: >> >>> 84: private final String fileName; // name of the file >>> 85: // the ZipCoder instance is derived from the Charset passed to the >>> ZipFile constructor >

Re: RFR: 8347712: IllegalStateException on multithreaded ZipFile access with non-UTF8 charset [v5]

2025-03-23 Thread Eirik Bjørsnøs
On Sat, 22 Mar 2025 17:28:04 GMT, Alan Bateman wrote: >> Jaikiran Pai has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains nine additional >> commits

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer

2025-03-23 Thread Chen Liang
On Sat, 26 Oct 2024 15:48:11 GMT, Markus KARG wrote: > This Pull Request proposes an implementation for > [JDK-8343110](https://bugs.openjdk.org/browse/JDK-8343110): Adding the new > method `public void getChars(int srcBegin, int srcEnd, char[] dst, int > dstBegin)` to the `CharSequence` inter

Re: RFR: 8347712: IllegalStateException on multithreaded ZipFile access with non-UTF8 charset [v2]

2025-03-23 Thread Eirik Bjørsnøs
On Wed, 12 Mar 2025 06:35:54 GMT, Jaikiran Pai wrote: >> src/java.base/share/classes/java/util/zip/ZipFile.java line 1434: >> >>> 1432: @Override >>> 1433: public int hashCode() { >>> 1434: long t = entryNameCommentCharset.hashCode(); >> >> This represent

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer

2025-03-23 Thread Markus KARG
On Sun, 23 Mar 2025 06:43:04 GMT, Chen Liang wrote: > Indeed, we can go with Alternative A. Great to see that we finally found an agreement and nobody vetoed in the past months. 😃 As Alternative A actually is the current status already found in https://github.com/openjdk/jdk/pull/21730, and