Re: RFR: 8347050: Console.readLine() drops '\' when reading through JLine [v2]

2025-05-21 Thread Jan Lahoda
> JLine can do history expansion, and interpret escapes, when returning a > value. That is not desirable when using JLine as a backend for > Console.readLine(). > > This PR proposes to disable the history expansion. Jan Lahoda has updated the pull request incrementally with one additional comm

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods [v2]

2025-05-21 Thread Volkan Yazici
On Tue, 20 May 2025 22:04:24 GMT, Naoto Sato wrote: >> All `FileDescriptor.in` encounters in `jdk.internal.org.jline.terminal` that >> might need attention: >> >> src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/DumbTerminalProvider.java >> src/jdk.internal.le/share/classe

Re: RFR: 8357179: Deprecate VFORK launch mechanism from Process implementation (linux) [v2]

2025-05-21 Thread Aleksey Shipilev
On Mon, 19 May 2025 16:59:06 GMT, Thomas Stuefe wrote: >> For the ratio behind this please see the companion CSR: >> https://bugs.openjdk.org/browse/JDK-8357180. >> >> We plan to deprecate this in JDK 25 and to remove it in JDK 26. >> >> This patch just writes a deprecation message to stderr:

Re: RFR: 8356891: Some code simplifications in BigInteger [v21]

2025-05-21 Thread fabioromano1
> Some changes in `Biginteger`s' bit operations that increase the code > readability and slightly optimize the execution time. fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: Correct typo in comment - Changes: - all:

Re: RFR: 8356995: Provide default methods min(T, T) and max(T, T) in Comparator interface [v2]

2025-05-21 Thread Tagir F . Valeev
> Implementation of Comparator.min and Comparator.max methods. Preliminary > discussion is in this thread: > https://mail.openjdk.org/pipermail/core-libs-dev/2025-May/145638.html > The specification is mostly composed of Math.min/max and Collections.min/max > specifications. > > The methods are

Re: RFR: 8356891: Some code simplifications in BigInteger [v20]

2025-05-21 Thread fabioromano1
> Some changes in `Biginteger`s' bit operations that increase the code > readability and slightly optimize the execution time. fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: Use one less counter in makePositive(int[]) -

Re: RFR: 8356995: Provide default methods min(T, T) and max(T, T) in Comparator interface

2025-05-21 Thread Tagir F . Valeev
On Mon, 19 May 2025 17:06:17 GMT, Raffaello Giulietti wrote: >> Implementation of Comparator.min and Comparator.max methods. Preliminary >> discussion is in this thread: >> https://mail.openjdk.org/pipermail/core-libs-dev/2025-May/145638.html >> The specification is mostly composed of Math.min/

Re: RFR: 8356891: Some code simplifications in BigInteger [v22]

2025-05-21 Thread fabioromano1
> Some changes in `Biginteger`s' bit operations that increase the code > readability and slightly optimize the execution time. fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: Correct typo in comment - Changes: - all:

Re: RFR: 8356128: Correct documentation for --linux-package-deps [v2]

2025-05-21 Thread Stefan Lobbenmeier
On Wed, 21 May 2025 09:57:10 GMT, Stefan Lobbenmeier wrote: >> src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties >> line 298: >> >>> 296: \ --linux-menu-group \n\ >>> 297: \ Menu group this application is placed in\n\ >>> 298: \ --linux-package-d

Re: RFR: 8357436: Change jspawnhelper warning recommendation from VFORK to FORK

2025-05-21 Thread Alan Bateman
On Wed, 21 May 2025 08:34:21 GMT, Aleksey Shipilev wrote: > In [JDK-8352533](https://bugs.openjdk.org/browse/JDK-8352533), we print the > suggestion to use VFORK in jspawnhelper misbehaves. But > [JDK-8357179](https://bugs.openjdk.org/browse/JDK-8357179) deprecated VFORK! > So the warning mess

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

2025-05-21 Thread PAWAN CHAWDHARY
> 8352926: New test TestDockerMemoryMetricsSubgroup.java fails PAWAN CHAWDHARY has updated the pull request incrementally with one additional commit since the last revision: address review comments - Changes: - all: https://git.openjdk.org/jdk/pull/24948/files - new: https://

Re: RFR: 8354323: Safeguard SwitchBootstraps.typeSwitch when used outside the compiler [v3]

2025-05-21 Thread Jan Lahoda
On Tue, 13 May 2025 09:56:31 GMT, Aggelos Biboudis wrote: >> While the compiler does not allow invalid queries to flow into >> `SwitchBootstraps:typeSwitch`, a library user could do that and `typeSwitch` >> does not prevent such usage pattern errors resulting in erroneous evaluation. >> >> Fo

Re: Towards a JSON API for the JDK

2025-05-21 Thread Cay Horstmann
Data binding is indeed complex because real-life JSON is messy. I reviewed some code in which I use Jackson data binding. Here is an example of a sticky issue. I have Content that's either a list of strings or a list of string pairs (don't ask). The JSON is { "strings": [..., ..., ... ] } or

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

2025-05-21 Thread Alan Bateman
On Tue, 20 May 2025 15:05:17 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: 8356985: Use "stdin.encoding" in Console's read*() methods [v2]

2025-05-21 Thread Volkan Yazici
On Tue, 20 May 2025 22:04:41 GMT, Naoto Sato wrote: >> test/jdk/java/io/Console/StdinEncodingTest.java line 46: >> >>> 44: * @run junit StdinEncodingTest >>> 45: */ >>> 46: public class StdinEncodingTest { >> >> AFAICT, there is no similar test (e.g., one using a mock `CharsetProvider`) >> f

Re: RFR: 8357436: Change jspawnhelper warning recommendation from VFORK to FORK

2025-05-21 Thread Aleksey Shipilev
On Wed, 21 May 2025 08:34:21 GMT, Aleksey Shipilev wrote: > In [JDK-8352533](https://bugs.openjdk.org/browse/JDK-8352533), we print the > suggestion to use VFORK in jspawnhelper misbehaves. But > [JDK-8357179](https://bugs.openjdk.org/browse/JDK-8357179) deprecated VFORK! > So the warning mess

RFR: 8357436: Change jspawnhelper warning recommendation from VFORK to FORK

2025-05-21 Thread Aleksey Shipilev
In [JDK-8352533](https://bugs.openjdk.org/browse/JDK-8352533), we print the suggestion to use VFORK in jspawnhelper misbehaves. But [JDK-8357179](https://bugs.openjdk.org/browse/JDK-8357179) deprecated VFORK! So the warning message should actually suggest using FORK. This seems to be in line wi

Re: Towards a JSON API for the JDK

2025-05-21 Thread Viktor Klang
Hi, The way to layer a cake like this is as follows: [ class ] <- describes the general structure of the type (the types, names, and order of the parameter lists) [ instance ] <- describes the specific structure of the instance (the values) [ structure ]

Re: RFR: 8357436: Change jspawnhelper warning recommendation from VFORK to FORK

2025-05-21 Thread Thomas Stuefe
On Wed, 21 May 2025 08:34:21 GMT, Aleksey Shipilev wrote: > In [JDK-8352533](https://bugs.openjdk.org/browse/JDK-8352533), we print the > suggestion to use VFORK in jspawnhelper misbehaves. But > [JDK-8357179](https://bugs.openjdk.org/browse/JDK-8357179) deprecated VFORK! > So the warning mess

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

2025-05-21 Thread David Beaumont
> 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 little refactoring to ensure that "read only" state was set > ini

Re: RFR: 8347027: String replaceAll with Function

2025-05-21 Thread Markus KARG
What is the benefit over the existing replacement methods? Is it easier to use, uses less resources, runs quicker...? Am 20.05.2025 um 19:04 schrieb kieran-farrell: New API to the String.java class - replaceAllMapped(String, Function) that allows regex based replacement via a user defined funct

Re: RFR: 8357436: Change jspawnhelper warning recommendation from VFORK to FORK

2025-05-21 Thread Aleksey Shipilev
On Wed, 21 May 2025 08:34:21 GMT, Aleksey Shipilev wrote: > In [JDK-8352533](https://bugs.openjdk.org/browse/JDK-8352533), we print the > suggestion to use VFORK in jspawnhelper misbehaves. But > [JDK-8357179](https://bugs.openjdk.org/browse/JDK-8357179) deprecated VFORK! > So the warning mess

Re: RFR: 8357165: test java/lang/invoke/ClassValueTest.java fails intermittently

2025-05-21 Thread Jaikiran Pai
On Sun, 18 May 2025 21:58:04 GMT, Chen Liang wrote: > The test was originally written with product builds in mind; it didn't > consider the slowness of debug builds, thus causing tests to fail. > > Also there was a bug in testWeakAgainstClassValue: the test need to flush the > backing map in t

Integrated: 8357436: Change jspawnhelper warning recommendation from VFORK to FORK

2025-05-21 Thread Aleksey Shipilev
On Wed, 21 May 2025 08:34:21 GMT, Aleksey Shipilev wrote: > In [JDK-8352533](https://bugs.openjdk.org/browse/JDK-8352533), we print the > suggestion to use VFORK in jspawnhelper misbehaves. But > [JDK-8357179](https://bugs.openjdk.org/browse/JDK-8357179) deprecated VFORK! > So the warning mess

Re: RFR: 8347491: IllegalArgumentationException thrown by ThreadPoolExecutor doesn't have a useful message [v5]

2025-05-21 Thread Viktor Klang
On Tue, 20 May 2025 10:54:44 GMT, He-Pin(kerr) wrote: >> Motivation: >> When a user passes a wrong parameter, the current implementation throws an >> IllegalArgumentException with an error message `null`, which is not helpful. >> >> Modification: >> Add detail error messages. >> >> Result: >>

Integrated: 8357173: Split jtreg test group jdk tier3

2025-05-21 Thread Erik Joelsson
On Fri, 16 May 2025 20:16:02 GMT, Erik Joelsson wrote: > We need to be able to run the jdk_jpackage tests separately from the rest of > jdk tier3. To achieve this we would like to introduce tier3_part1 and > tier3_part2 groups similar to how lower tiers are split. This pull request has now bee

Re: Towards a JSON API for the JDK

2025-05-21 Thread Ethan McCue
I think you missed a 2.5 which is to use the information in DOM objects to perform useful work. On Wed, May 21, 2025, 1:04 PM Archie Cobbs wrote: > On Wed, May 21, 2025 at 11:30 AM Paul Sandoz > wrote: > >> I consider this a “known unknown” (in the words of Mr. Rumsfeld). We >> would need to ex

Re: RFR: 8353741: Eliminate table lookup in UUID.toString [v8]

2025-05-21 Thread Roger Riggs
On Wed, 21 May 2025 00:57:30 GMT, Shaojin Wen wrote: >> Improve the performance of UUID::toString by using Long.expand and SWAR >> (SIMD within a register) instead of table lookup. Eliminating the table >> lookup can also avoid the performance degradation problem when the cache >> misses. > >

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods [v4]

2025-05-21 Thread Naoto Sato
> `java.io.Console` uses the charset specified by the `stdout.encoding` system > property for both input and output. While this is generally sufficient, since > Console is intended for interactive terminal use, some platforms allow > different encodings to be configured for input and output. In

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

2025-05-21 Thread Roger Riggs
On Wed, 21 May 2025 19:18:03 GMT, Brian Burkhalter wrote: >> Implement the requested methods and add a test thereof. > > Brian Burkhalter 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 m

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

2025-05-21 Thread David Beaumont
> 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 little refactoring to ensure that "read only" state was set > ini

Re: RFR: 8357281: sun.util.Locale.LanguageTag should be immutable

2025-05-21 Thread Naoto Sato
On Wed, 21 May 2025 21:19:36 GMT, Justin Lu wrote: > _sun.util.Locale.LanguageTag_ is essentially a BCP47 language tag data > carrier for Locale. The class, once created is not modified; the class should > be made immutable. Converting the class to a record accomplishes this and > also simplif

Re: RFR: 8345431: Improve jar --validate to detect duplicate or invalid entries [v12]

2025-05-21 Thread Henry Jen
> This PR check the jar file to ensure entries are consistent from the central > directory and local file header. Also check there is no duplicate entry names > that could override the desired content by accident. Henry Jen has updated the pull request incrementally with one additional commit s

Re: RFR: 8357281: sun.util.Locale.LanguageTag should be immutable

2025-05-21 Thread Shaojin Wen
On Wed, 21 May 2025 21:19:36 GMT, Justin Lu wrote: > _sun.util.Locale.LanguageTag_ is essentially a BCP47 language tag data > carrier for Locale. The class, once created is not modified; the class should > be made immutable. Converting the class to a record accomplishes this and > also simplif

Re: RFR: 8345431: Improve jar --validate to detect duplicate or invalid entries [v11]

2025-05-21 Thread Lance Andersen
On Thu, 22 May 2025 01:39:45 GMT, Henry Jen wrote: >>> Nit - we should call it exit code instead of status code, both for 0 and >>> non-zero exit codes. >> >> I don't have a preference but unix/MacOS commands vary: >> >> - ls command: The ls utility exits 0 on success, and >0 if an error occu

Re: RFR: 8345431: Improve jar --validate to detect duplicate or invalid entries [v11]

2025-05-21 Thread Henry Jen
On Wed, 21 May 2025 16:53:17 GMT, Jaikiran Pai wrote: >> Henry Jen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Mismatched order is considered invalid > > src/jdk.jartool/share/classes/sun/tools/jar/Main.java line 454: > >> 452:

Re: RFR: 8345431: Improve jar --validate to detect duplicate or invalid entries [v11]

2025-05-21 Thread Henry Jen
On Wed, 21 May 2025 20:21:18 GMT, Lance Andersen wrote: >> src/jdk.jartool/share/man/jar.md line 223: >> >>> 221: As a jar archive is based on ZIP format, it is possible to create a >>> jar archive using tools >>> 222: other than the `jar` command. The --validate option may be used to >>> perf

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

2025-05-21 Thread Jaikiran Pai
On Sun, 20 Apr 2025 13:01:30 GMT, Jason Zaugg wrote: >> zipfs has a (undocumented) property "zipinfo-time" which was introduced in >> https://bugs.openjdk.org/browse/JDK-8150496 to help improve performance of >> the ZipFileSystem. When a ZipFileSystem is created with this property's >> value s

Re: RFR: 8347491: IllegalArgumentationException thrown by ThreadPoolExecutor doesn't have a useful message

2025-05-21 Thread kerr
On Tue, 20 May 2025 10:11:03 GMT, Viktor Klang wrote: >> It would be much nicer if you take this one:), we are on JDK 21 and want to >> have this in the next LTS. > > @He-Pin Just pinging you here, in case the notification from my most recent > comments got lost in transit. @viktorklang-ora @l

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

2025-05-21 Thread Jiangli Zhou
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: 8356904: Skip jdk/test/lib/process/TestNativeProcessBuilder on static-jdk [v2]

2025-05-21 Thread Jiangli Zhou
On Wed, 21 May 2025 18:46:25 GMT, Roger Riggs 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. > > lgtm @RogerRiggs Tha

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

2025-05-21 Thread Roger Riggs
On Wed, 14 May 2025 15:44:08 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/TestNativeProcessBuild

Re: RFR: 8355393: Create a Test case to have special cases coverage for currency.getInstance() [v2]

2025-05-21 Thread Abhishek N
On Thu, 15 May 2025 18:50:35 GMT, Justin Lu wrote: >> Abhishek N has updated the pull request incrementally with one additional >> commit since the last revision: >> >> correcting jtreg header order, add meaningful comments for each test >> methods and properties file > > This test is not ef

Re: RFR: 8357173: Split jtreg test group jdk tier3 [v2]

2025-05-21 Thread Mikael Vidstedt
On Wed, 21 May 2025 13:53:37 GMT, Erik Joelsson wrote: >> We need to be able to run the jdk_jpackage tests separately from the rest of >> jdk tier3. To achieve this we would like to introduce tier3_part1 and >> tier3_part2 groups similar to how lower tiers are split. > > Erik Joelsson has updat

RFR: 8357281: sun.util.Locale.LanguageTag should be immutable

2025-05-21 Thread Justin Lu
_sun.util.Locale.LanguageTag_ is essentially a BCP47 language tag data carrier for Locale. The class, once created is not modified; the class should be made immutable. Converting the class to a record accomplishes this and also simplifies some of the existing code. - Commit message

Re: RFR: 8355223: Improve documentation on @IntrinsicCandidate [v6]

2025-05-21 Thread Chen Liang
On Wed, 21 May 2025 20:11:39 GMT, Chen Liang wrote: >> src/java.base/share/classes/jdk/internal/vm/annotation/IntrinsicCandidate.java >> line 50: >> >>> 48: * For example, the bytecodes of a candidate method may be executed by >>> lower >>> 49: * compilation tiers of VM execution, while high

Re: RFR: 8355223: Improve documentation on @IntrinsicCandidate [v6]

2025-05-21 Thread Roger Riggs
On Wed, 21 May 2025 21:28:07 GMT, Chen Liang wrote: >> src/java.base/share/classes/jdk/internal/vm/annotation/IntrinsicCandidate.java >> line 90: >> >>> 88: * intrinsic.) For example, the documentation can simply say that the >>> result is >>> 89: * undefined if a race happens. However, ra

Re: RFR: 8210549: Runtime.exec: in closeDescriptors(), use FD_CLOEXEC instead of close()

2025-05-21 Thread Roger Riggs
On Mon, 19 May 2025 12:23:07 GMT, Thomas Stuefe wrote: > Hi, please consider the following patch. > > This patch replaces the existing close-file-descriptors-logic we follow > before exec'ing a target binary: instead of explicitly closing the file > descriptors, we mark them as CLOEXEC. That s

Re: RFR: 8356128: Correct documentation for --linux-package-deps [v3]

2025-05-21 Thread Alexander Matveev
On Wed, 21 May 2025 12:41:24 GMT, Stefan Lobbenmeier wrote: >> The documentation suggests that --linux-package-deps is a boolean option, >> while in fact it is a string option with dependencies separated by comma and >> space >> >> You can tell that this option is supposed to have an argument

Re: RFR: 8356128: Correct documentation for --linux-package-deps [v3]

2025-05-21 Thread Alexander Matveev
On Wed, 21 May 2025 12:03:16 GMT, Alexey Semenyuk wrote: >> As in, this worked in my testing: `--linux-package-deps "foo, bar"`, see >> https://github.com/JetBrains/compose-multiplatform/pull/5227#issuecomment-2659470908 > >> As in, this worked in my testing: --linux-package-deps "foo, bar" > >

Re: RFR: 8356128: Correct documentation for --linux-package-deps [v3]

2025-05-21 Thread Stefan Lobbenmeier
On Wed, 21 May 2025 19:33:13 GMT, Alexander Matveev wrote: >> Stefan Lobbenmeier has updated the pull request incrementally with one >> additional commit since the last revision: >> >> also use in other locations > > src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResourc

Re: RFR: 8345431: Improve jar --validate to detect duplicate or invalid entries [v11]

2025-05-21 Thread Lance Andersen
On Wed, 21 May 2025 16:42:14 GMT, Jaikiran Pai wrote: >> Henry Jen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Mismatched order is considered invalid > > src/jdk.jartool/share/man/jar.md line 223: > >> 221: As a jar archive is based

Re: RFR: 8347491: IllegalArgumentationException thrown by ThreadPoolExecutor doesn't have a useful message [v5]

2025-05-21 Thread Chen Liang
On Tue, 20 May 2025 10:54:44 GMT, He-Pin(kerr) wrote: >> Motivation: >> When a user passes a wrong parameter, the current implementation throws an >> IllegalArgumentException with an error message `null`, which is not helpful. >> >> Modification: >> Add detail error messages. >> >> Result: >>

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

2025-05-21 Thread Mikhailo Seledtsov
On Wed, 21 May 2025 06:54:37 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: > > address review comments Thanks for the updates. Ch

Re: RFR: 8357275: Locale.Builder.setLanguageTag should mention conversions made on language tag [v4]

2025-05-21 Thread Justin Lu
> It is not clear that `Locale.Builder.setLanguageTag(String)` accepts > _extlang_ subtags in the input as well as what behavior occurs. Additionally, > both this method and `Locale.forLanguageTag(String)` should mention their > behavior when more than three _extlang_ subtags are provided. This

Re: Towards a JSON API for the JDK

2025-05-21 Thread Ethan McCue
I think what has been proposed so far is powerful enough to perform that task *if* there is an intermediate object in the mix. if ( // Assuming a dual pattern for JsonString.of and the SAP // strategy outlined in the doc json instanceof index(0, JsonString::of).decode(var firstName) )

Integrated: 8357063: Document preconditions for DecimalDigits methods

2025-05-21 Thread Shaojin Wen
On Thu, 15 May 2025 06:24:44 GMT, Shaojin Wen wrote: > Similar to PR #24982 > Document preconditions on certain DecimalDigits methods that use operations > either unsafe and/or without range checks. This pull request has now been integrated. Changeset: 07871cd7 Author:Shaojin Wen URL:

Re: RFR: 8357145: CRC/Inflater/Deflater/Adler32 methods that take a ByteBuffer throw UOE if backed by shared memory segment

2025-05-21 Thread Jaikiran Pai
On Tue, 20 May 2025 07:37:34 GMT, Per Minborg wrote: > This PR proposes to use ` JavaNioAccess::getBufferAdress` rather than > `DirectBuffer::address` in the package `java.util.zip` so that `Buffer` > instances backed by `MemorySegment` instances can be used. > > This PR passes tier1, tier2, a

Re: RFR: 8357173: Split jtreg test group jdk tier3 [v2]

2025-05-21 Thread Erik Joelsson
> We need to be able to run the jdk_jpackage tests separately from the rest of > jdk tier3. To achieve this we would like to introduce tier3_part1 and > tier3_part2 groups similar to how lower tiers are split. Erik Joelsson has updated the pull request incrementally with two additional commits

Re: RFR: 8357173: Split jtreg test group jdk tier3

2025-05-21 Thread Erik Joelsson
On Fri, 16 May 2025 20:16:02 GMT, Erik Joelsson wrote: > We need to be able to run the jdk_jpackage tests separately from the rest of > jdk tier3. To achieve this we would like to introduce tier3_part1 and > tier3_part2 groups similar to how lower tiers are split. Renamed tier3_part2 -> tier3_

Re: RFR: 8345431: Improve jar --validate to detect duplicate or invalid entries [v9]

2025-05-21 Thread Lance Andersen
On Wed, 21 May 2025 12:58:37 GMT, Jaikiran Pai wrote: >> Hello Lance/Henry, >> >>> Well, now would be a good time to consider say a value of 2 for duplicates, >>> 3 for invalid names, etc... >> >> I think from a specification point of view, for this current PR, we should >> only specify that

Re: RFR: 8345431: Improve jar --validate to detect duplicate or invalid entries [v9]

2025-05-21 Thread Henry Jen
On Wed, 21 May 2025 14:00:03 GMT, Lance Andersen wrote: >>> For the inconsistent order in the LOC and CEN, we can treat it as invalid, >>> I chose not to because that's not a violation, but if we do extend that as >>> specification for JAR file format, then we can change that to invalid and >>

Re: RFR: 8357462: Amend open/test/jdk//java/foreign/TestMatrix.java test scenario to run as manual

2025-05-21 Thread Jorn Vernee
On Wed, 21 May 2025 13:44:09 GMT, serhiysachkov wrote: > Amend open/test/jdk//java/foreign/TestMatrix.java test scenario to run as > manual Marked as reviewed by jvernee (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/25355#pullrequestreview-2858676969

Re: RFR: 8356893: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner

2025-05-21 Thread Alan Bateman
On Wed, 21 May 2025 20:56:31 GMT, Volkan Yazici wrote: > There are several locations in the JDK source where `System.in` and > `FileDescriptor.in` is read with `InputStreamReader` and `Scanner` using the > default charset. As recommended by the recently merged > [JDK-8356420](https://bugs.open

Integrated: 8347050: Console.readLine() drops '\' when reading through JLine

2025-05-21 Thread Jan Lahoda
On Tue, 20 May 2025 13:07:55 GMT, Jan Lahoda wrote: > JLine can do history expansion, and interpret escapes, when returning a > value. That is not desirable when using JLine as a backend for > Console.readLine(). > > This PR proposes to disable the history expansion. This pull request has now

Re: RFR: 8347050: Console.readLine() drops '\' when reading through JLine [v2]

2025-05-21 Thread Jan Lahoda
On Wed, 21 May 2025 07:23:07 GMT, Jan Lahoda wrote: >> JLine can do history expansion, and interpret escapes, when returning a >> value. That is not desirable when using JLine as a backend for >> Console.readLine(). >> >> This PR proposes to disable the history expansion. > > Jan Lahoda has up

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

2025-05-21 Thread duke
On Wed, 21 May 2025 06:54:37 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: > > address review comments @pawanchawdhary1 Your cha

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

2025-05-21 Thread Jaikiran Pai
On Mon, 24 Mar 2025 22:33:56 GMT, Jason Zaugg wrote: >> Good catch, thanks! Ordinarily, I would say a test is required, but I can't >> think up a viable test to verify the effect of this change in a test, so we >> probably need to do it without a test. > >> Ordinarily, I would say a test is req

Re: RFR: 8353124: java/lang/Thread/virtual/stress/Skynet.java#Z times out on macosx-x64-debug

2025-05-21 Thread SendaoYan
On Tue, 20 May 2025 15:25:52 GMT, Michael McMahon wrote: > Hi, > > This is a simple test update which increases a timeout from 300s to 400 to > account for slow mac os test machines. > A repeat 50 test of :jdk_lang passes. I will run this a few more times before > pushing, if the change is acc

Re: RFR: 8357462: Amend open/test/jdk//java/foreign/TestMatrix.java test scenario to run as manual

2025-05-21 Thread SendaoYan
On Wed, 21 May 2025 13:44:09 GMT, serhiysachkov wrote: > Amend open/test/jdk//java/foreign/TestMatrix.java test scenario to run as > manual Changes requested by syan (Committer). test/jdk/java/foreign/TestMatrix.java line 38: > 36: * @build NativeTestHelper CallGeneratorHelper TestUpcallHigh

Re: RFR: 8355223: Improve documentation on @IntrinsicCandidate [v6]

2025-05-21 Thread Chen Liang
On Fri, 16 May 2025 19:45:16 GMT, John R Rose wrote: > Or just: s/, unlike the other methods// Removed mention of "the other methods". > src/java.base/share/classes/jdk/internal/vm/annotation/IntrinsicCandidate.java > line 90: > >> 88: * intrinsic.) For example, the documentation can simply

Re: RFR: 8356893: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner

2025-05-21 Thread Roger Riggs
On Wed, 21 May 2025 20:56:31 GMT, Volkan Yazici wrote: > There are several locations in the JDK source where `System.in` and > `FileDescriptor.in` is read with `InputStreamReader` and `Scanner` using the > default charset. As recommended by the recently merged > [JDK-8356420](https://bugs.open

Re: RFR: 8355223: Improve documentation on @IntrinsicCandidate [v7]

2025-05-21 Thread Chen Liang
> In offline discussion, we noted that the documentation on this annotation > does not recommend minimizing the intrinsified section and moving whatever > can be done in Java to Java; thus I prepared this documentation update, to > shrink a "TLDR" essay to something concise for readers, such as

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

2025-05-21 Thread Chen Liang
On Wed, 21 May 2025 19:18:03 GMT, Brian Burkhalter wrote: >> Implement the requested methods and add a test thereof. > > Brian Burkhalter 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 m

Re: RFR: 8355223: Improve documentation on @IntrinsicCandidate [v6]

2025-05-21 Thread Chen Liang
On Wed, 21 May 2025 21:31:39 GMT, Roger Riggs wrote: >> I have appened this teaching paragraph also as a blockquote inlined note >> after this current paragraph. > > This unnecessary detail goes will beyond the description of the annotation > and is more of a design doc for VM implementation so

Re: RFR: 8356995: Provide default methods min(T, T) and max(T, T) in Comparator interface [v2]

2025-05-21 Thread Roger Riggs
On Wed, 21 May 2025 09:09:15 GMT, Tagir F. Valeev wrote: >> Implementation of Comparator.min and Comparator.max methods. Preliminary >> discussion is in this thread: >> https://mail.openjdk.org/pipermail/core-libs-dev/2025-May/145638.html >> The specification is mostly composed of Math.min/max a

Re: RFR: 8347050: Console.readLine() drops '\' when reading through JLine [v2]

2025-05-21 Thread Naoto Sato
On Wed, 21 May 2025 07:23:07 GMT, Jan Lahoda wrote: >> JLine can do history expansion, and interpret escapes, when returning a >> value. That is not desirable when using JLine as a backend for >> Console.readLine(). >> >> This PR proposes to disable the history expansion. > > Jan Lahoda has up

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

2025-05-21 Thread Lance Andersen
On Wed, 21 May 2025 10:43:12 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: 8357281: sun.util.Locale.LanguageTag should be immutable

2025-05-21 Thread Chen Liang
On Wed, 21 May 2025 21:19:36 GMT, Justin Lu wrote: > _sun.util.Locale.LanguageTag_ is essentially a BCP47 language tag data > carrier for Locale. The class, once created is not modified; the class should > be made immutable. Converting the class to a record accomplishes this and > also simplif

Re: RFR: 8355223: Improve documentation on @IntrinsicCandidate [v6]

2025-05-21 Thread Chen Liang
On Tue, 20 May 2025 06:08:37 GMT, Jaikiran Pai wrote: >> Chen Liang 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 eight additional >> commits

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods [v4]

2025-05-21 Thread Naoto Sato
On Wed, 21 May 2025 18:07:39 GMT, Justin Lu wrote: >>> There is script.exp, but it tests sun.stdout.encoding, not stdout.encoding. >> >> It is addressed in this PR > > I think the JBS bug ID needs to be added to `CharsetTest.java` as well then. Bugid added to the test. Additionally replaced tes

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods [v3]

2025-05-21 Thread Justin Lu
On Wed, 21 May 2025 16:54:22 GMT, Naoto Sato wrote: >> Actually providing mock charset was a workaround of not having public method >> for getting the input encoding. I think it would be an overkill to introduce >> a new public method because it will not be used much, as most cases are >> suff

Re: RFR: 8356128: Correct documentation for --linux-package-deps [v3]

2025-05-21 Thread Alexander Matveev
On Wed, 21 May 2025 12:41:24 GMT, Stefan Lobbenmeier wrote: >> The documentation suggests that --linux-package-deps is a boolean option, >> while in fact it is a string option with dependencies separated by comma and >> space >> >> You can tell that this option is supposed to have an argument

Re: RFR: 8356995: Provide default methods min(T, T) and max(T, T) in Comparator interface [v2]

2025-05-21 Thread Peter Levart
On Wed, 21 May 2025 09:09:15 GMT, Tagir F. Valeev wrote: >> Implementation of Comparator.min and Comparator.max methods. Preliminary >> discussion is in this thread: >> https://mail.openjdk.org/pipermail/core-libs-dev/2025-May/145638.html >> The specification is mostly composed of Math.min/max a

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

2025-05-21 Thread Brian Burkhalter
> Implement the requested methods and add a test thereof. Brian Burkhalter 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 29 additional commits since

Re: RFR: 8345431: Improve jar --validate to detect duplicate or invalid entries [v11]

2025-05-21 Thread Lance Andersen
On Wed, 21 May 2025 16:45:51 GMT, Jaikiran Pai wrote: > Nit - we should call it exit code instead of status code, both for 0 and > non-zero exit codes. I don't have a preference but unix/MacOS commands vary: - ls command: The ls utility exits 0 on success, and >0 if an error occurs. - grep co

RFR: 8356893: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner

2025-05-21 Thread Volkan Yazici
There are several locations in the JDK source where `System.in` and `FileDescriptor.in` is read with `InputStreamReader` and `Scanner` using the default charset. As recommended by the recently merged [JDK-8356420](https://bugs.openjdk.org/browse/JDK-8356420), this PR replaces the default charse

Re: RFR: 8356128: Correct documentation for --linux-package-deps [v3]

2025-05-21 Thread Alexey Semenyuk
On Wed, 21 May 2025 20:17:45 GMT, Stefan Lobbenmeier wrote: >> src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties >> line 298: >> >>> 296: \ --linux-menu-group \n\ >>> 297: \ Menu group this application is placed in\n\ >>> 298: \ --linux-package-d

Re: RFR: 8349176: Speed up Integer/Long.toString via allocateUninitializedArray [v5]

2025-05-21 Thread Shaojin Wen
> The byte[] allocated in Integer/Long.toString is fully filled, so we can use > StringConcatHelper::newArray to create byte[] to improve performance. Shaojin Wen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits: - Merge r

Re: RFR: 8356128: Correct documentation for --linux-package-deps [v3]

2025-05-21 Thread Stefan Lobbenmeier
> The documentation suggests that --linux-package-deps is a boolean option, > while in fact it is a string option with dependencies separated by comma and > space > > You can tell that this option is supposed to have an argument here: > https://github.com/openjdk/jdk/blob/fea5f2b1458cdd53f437e5

Re: RFR: 8357165: test java/lang/invoke/ClassValueTest.java fails intermittently

2025-05-21 Thread Chen Liang
On Sun, 18 May 2025 21:58:04 GMT, Chen Liang wrote: > The test was originally written with product builds in mind; it didn't > consider the slowness of debug builds, thus causing tests to fail. > > Also there was a bug in testWeakAgainstClassValue: the test need to flush the > backing map in t

Re: RFR: 8357145: CRC/Inflater/Deflater/Adler32 methods that take a ByteBuffer throw UOE if backed by shared memory segment

2025-05-21 Thread Alan Bateman
On Tue, 20 May 2025 07:37:34 GMT, Per Minborg wrote: > This PR proposes to use ` JavaNioAccess::getBufferAdress` rather than > `DirectBuffer::address` in the package `java.util.zip` so that `Buffer` > instances backed by `MemorySegment` instances can be used. > > This PR passes tier1, tier2, a

Withdrawn: 8347027: String replaceAll with Function

2025-05-21 Thread kieran-farrell
On Tue, 20 May 2025 16:59:10 GMT, kieran-farrell wrote: > New API to the String.java class - replaceAllMapped(String, > Function) that allows regex based replacement via a user > defined function allowing dynamic replacemnt based on the match. It delegates > to the already existing Pattern.mat

Re: Towards a JSON API for the JDK

2025-05-21 Thread Paul Sandoz
I consider this a “known unknown” (in the words of Mr. Rumsfeld). We would need to explore this area throughly, which includes the interconnection with Serialization 2.0, before we really know what we can and should do in the near and long term. That’s a significant effort, and I would like to s

Integrated: 8357478: Fix copyright header in src/jdk.jpackage/share/classes/jdk/jpackage/internal/AppImageDesc.java

2025-05-21 Thread Alexey Semenyuk
Add a missing line to the copyright header - Commit messages: - 8357478: Fix copyright header in src/jdk.jpackage/share/classes/jdk/jpackage/internal/AppImageDesc.java Changes: https://git.openjdk.org/jdk/pull/25362/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25362&ran

Re: RFR: 8345431: Improve jar --validate to detect duplicate or invalid entries [v11]

2025-05-21 Thread Jaikiran Pai
On Wed, 21 May 2025 15:49:29 GMT, Henry Jen wrote: >> This PR check the jar file to ensure entries are consistent from the central >> directory and local file header. Also check there is no duplicate entry >> names that could override the desired content by accident. > > Henry Jen has updated t

Re: Integrated: 8357478: Fix copyright header in src/jdk.jpackage/share/classes/jdk/jpackage/internal/AppImageDesc.java

2025-05-21 Thread Jaikiran Pai
On Wed, 21 May 2025 16:26:39 GMT, Alexey Semenyuk wrote: > Add a missing line to the copyright header The change looks correct and trivial to me. Thank you Alexey. - Marked as reviewed by jpai (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/25362#pullrequestreview-28584432

Integrated: 8357478: Fix copyright header in src/jdk.jpackage/share/classes/jdk/jpackage/internal/AppImageDesc.java

2025-05-21 Thread Alexey Semenyuk
On Wed, 21 May 2025 16:26:39 GMT, Alexey Semenyuk wrote: > Add a missing line to the copyright header This pull request has now been integrated. Changeset: 6546de1d Author:Alexey Semenyuk URL: https://git.openjdk.org/jdk/commit/6546de1d3adb8c4755950ee6fb858ec9ee1c5294 Stats: 1 l

Re: [External] : Re: Towards a JSON API for the JDK

2025-05-21 Thread Viktor Klang
I'd say it's more nuanced than that—Serialization 2.0 can improve over Serializion 1.0 by allowing users to decide what their formats should be. With Serialization 1.0, it's Java Serialization. Now, the act of defining (possibly bidirectional) conversions between the in-memory structure of clas

Re: RFR: 8356128: Correct documentation for --linux-package-deps [v2]

2025-05-21 Thread Stefan Lobbenmeier
On Wed, 21 May 2025 12:07:52 GMT, Alexey Semenyuk wrote: >> Stefan Lobbenmeier has updated the pull request incrementally with one >> additional commit since the last revision: >> >> change cli option to single string as suggested in PR review > > src/jdk.jpackage/share/man/jpackage.md line 4

  1   2   >