Re: RFR: 8355954: File.delete removes read-only files (win) [v4]

2025-05-15 Thread Brian Burkhalter
On Fri, 16 May 2025 06:17:32 GMT, Alan Bateman wrote: >> 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 five additional >> com

Re: RFR: 8355954: File.delete removes read-only files (win) [v4]

2025-05-15 Thread Alan Bateman
On Thu, 15 May 2025 22:42:15 GMT, Brian Burkhalter wrote: >> This change proposes to modify `java.io.File.delete()` so that regular files >> on Windows will not be deleted by default if their read-only attribute is >> set. A boolean-valued system compatibility property >> `jdk.io.File.deleteRe

Re: ProcessImpl: Can we obsolete the vfork mode?

2025-05-15 Thread Alan Bateman
On 16/05/2025 05:10, Thomas Stüfe wrote: Thank you, Alan. I will prepare a patch and a CSR. Okay, and maybe something for early in JDK 26 to avoid touching this area close to the fork for JDK 25 RDP1. -Alan

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

2025-05-15 Thread Alan Bateman
On Thu, 15 May 2025 18:27:35 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: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v12]

2025-05-15 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: ProcessImpl: Can we obsolete the vfork mode?

2025-05-15 Thread Thomas Stüfe
On Thu, May 15, 2025 at 8:00 PM Alan Bateman wrote: > > > On 15/05/2025 17:52, Thomas Stüfe wrote: > > : > > > > However, we also could just get rid of vfork. That would simplify > > things alot. We have moved to posix_spawn-by-default with JDK 13 in > > 2019 (https://bugs.openjdk.org/browse/JDK

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v25]

2025-05-15 Thread Chen Liang
On Fri, 16 May 2025 01:50:06 GMT, ExE Boss wrote: >> Adam Sotona has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - removed empty line >> - problem-listed runtime/ClassInitErrors/TestStackOverflowDuringInit.java > > src/java.base/share/c

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v25]

2025-05-15 Thread ExE Boss
On Wed, 19 Jun 2024 09:08:35 GMT, Adam Sotona wrote: >> java.base java.lang.invoke package heavily uses ASM to generate lambdas and >> method handles. >> >> This patch converts ASM calls to Classfile API. >> >> This PR is continuation of https://github.com/openjdk/jdk/pull/12945 >> >> Any com

Re: RFR: 8333664: Decouple command line parsing and package building in jpackage [v4]

2025-05-15 Thread Alexander Matveev
On Sat, 10 May 2025 19:02:45 GMT, Alexey Semenyuk wrote: >> Refactor jpackage to separate the configuration and execution phases. >> At the configuration phase, jpackage parses command-line arguments and >> validates them. >> At the execution phase, jpackage builds a bundle based on data collect

Re: RFR: 8283660: Convert com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java finalizer to Cleaner [v2]

2025-05-15 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/bro

Re: RFR: 8283660: Convert com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java finalizer to Cleaner [v2]

2025-05-15 Thread Brent Christian
On Thu, 15 May 2025 21:35:14 GMT, Hendrik Schick wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> update copyright > > test/jdk/com/sun/jndi/ldap/CleanerTests/LdapEnumeration.ldap line 2: > >> 1: # >> 2: # Copyr

RFR: 8357081: Removed unused methods of HexDigits

2025-05-15 Thread Shaojin Wen
In HexDigits, getCharsLatin1 and getCharsUTF16 are no longer used, so remove these methods - Commit messages: - remove unused code Changes: https://git.openjdk.org/jdk/pull/25258/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25258&range=00 Issue: https://bugs.openjdk.o

Re: RFR: 8353888: Implement JEP 510: Key Derivation Function API [v7]

2025-05-15 Thread Valerie Peng
On Fri, 9 May 2025 20:05:10 GMT, Weijun Wang wrote: >> Finalize the KDF API. > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > new algorithms in SunJCE Updates look good. Thanks~ - Marked as reviewed by valeriep

Re: Towards a JSON API for the JDK

2025-05-15 Thread Ethan McCue
I present for your consideration the library I made when spiraling about this problem space a few years ago https://github.com/bowbahdoe/json https://javadoc.io/doc/dev.mccue/json/latest/dev.mccue.json/dev/mccue/json/package-summary.html Notably missing during the design process here were patter

Re: RFR: 8356891: Some code simplifications for basic BigIntegers' bit operations [v6]

2025-05-15 Thread Shaojin Wen
On Thu, 15 May 2025 15:37:39 GMT, fabioromano1 wrote: >> 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

Re: RFR: 8355954: File.delete removes read-only files (win) [v4]

2025-05-15 Thread Brian Burkhalter
> This change proposes to modify `java.io.File.delete()` so that regular files > on Windows will not be deleted by default if their read-only attribute is > set. A boolean-valued system compatibility property > `jdk.io.File.deleteReadOnly` is defined to reinstate legacy behavior if > desired.

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

2025-05-15 Thread Vicente Romero
> 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 constructor parameter will be an object > with a unique ident

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

2025-05-15 Thread Vicente Romero
On Wed, 14 May 2025 18:27:18 GMT, Jan Lahoda wrote: >> Vicente Romero has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 34 commits: >> >> - Merge branch 'master' into JDK-8354556 >> - Update src/jdk.compiler/share/classes/com/sun/

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

2025-05-15 Thread Brian Burkhalter
On Thu, 15 May 2025 11:01:36 GMT, Markus KARG wrote: >> Thanks for the examples. Imho I think that performance sensitive, >> specialised code can invest some lines to put together the best solution for >> the context whereas the majority of code can simply use a convenient >> `reader.readAllAs

Re: RFR: 8356891: Some code simplifications for basic BigIntegers' bit operations [v6]

2025-05-15 Thread Raffaello Giulietti
On Thu, 15 May 2025 15:37:39 GMT, fabioromano1 wrote: >> 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

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

2025-05-15 Thread Henry Jen
On Wed, 7 May 2025 17:28:34 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 232: > >> 230: var err = e.get

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

2025-05-15 Thread Henry Jen
On Wed, 7 May 2025 18:00:23 GMT, Henry Jen wrote: >> src/jdk.jartool/share/classes/sun/tools/jar/Validator.java line 127: >> >>> 125: >>> 126: public DedupEntryNames(boolean isCEN) { >>> 127: this.isCEN = isCEN; >> >> Might be clearer if this was an enum vs boolean? > > I f

Re: RFR: 8357063: Document preconditions for DecimalDigits methods

2025-05-15 Thread Shaojin Wen
On Thu, 15 May 2025 18:12:28 GMT, Raffaello Giulietti wrote: > @wenshao I understand this is a kind of followup of #24982, but why this > title? It seems just renaming some methods with more speaking names. Yes, it is just a renaming of some methods, the title is followup #24982, does the sam

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

2025-05-15 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: 8283660: Convert com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java finalizer to Cleaner

2025-05-15 Thread Hendrik Schick
On Wed, 14 May 2025 23:51:36 GMT, Brent Christian wrote: > 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

Re: Towards a JSON API for the JDK

2025-05-15 Thread Remi Forax
Hi Paul, yes, not having a simple JSON API in Java is an issue for beginners. It's not clear to me why JsonArray (for example) has to be an interface instead of a record ? I understand why Json.parse() only works on String and char[] but the API make it too easy to have many performance issues.

Integrated: 8354083: Support --add-reads with -XX:+AOTClassLinking

2025-05-15 Thread Calvin Cheung
On Thu, 8 May 2025 00:19:17 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][cds

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

2025-05-15 Thread Calvin Cheung
On Thu, 8 May 2025 03:22:32 GMT, Ioi Lam 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][cds]

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

2025-05-15 Thread Archie Cobbs
On Thu, 15 May 2025 18:33:22 GMT, Raffaello Giulietti wrote: > Here are many > [exmaples](https://github.com/openjdk/jmh/tree/master/jmh-samples/src/main/java/org/openjdk/jmh/samples) > on how to correctly use JMH. > > A > [blackhole](https://github.com/openjdk/jmh/blob/master/jmh-samples/sr

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

2025-05-15 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

Re: RFR: 8357075: Remove leftover COMPAT locale data tests [v2]

2025-05-15 Thread Naoto Sato
> Removing now-defunct COMPAT locale provider tests. Naoto Sato has updated the pull request incrementally with three additional commits since the last revision: - Update test/jdk/sun/text/resources/LocaleDataTest.java Co-authored-by: Justin Lu - Update test/jdk/sun/text/resources/Loca

Re: RFR: 8357075: Remove leftover COMPAT locale data tests [v2]

2025-05-15 Thread Naoto Sato
On Thu, 15 May 2025 20:39:28 GMT, Justin Lu wrote: >> Naoto Sato has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - Update test/jdk/sun/text/resources/LocaleDataTest.java >> >>Co-authored-by: Justin Lu >> - Update test/jdk/sun

Re: RFR: 8357075: Remove leftover COMPAT locale data tests

2025-05-15 Thread Justin Lu
On Thu, 15 May 2025 19:31:45 GMT, Naoto Sato wrote: > Removing now-defunct COMPAT locale provider tests. Nice cleanup; lgtm test/jdk/sun/text/resources/LocaleDataTest.java line 178: > 176: public class LocaleDataTest > 177: { > 178: static final String TEXT_RESOURCES_PACKAGE > ="sun.text.

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

2025-05-15 Thread Brian Burkhalter
On Thu, 15 May 2025 05:53:44 GMT, Markus KARG wrote: >> @mkarg Please don't invoke my name to try to buttress your arguments. The >> calls the Reader.of() instance makes on its backing CharSequence is a >> different kind of issue from what promises or guarantees the concrete >> methods of the

Integrated: 8351996: Behavioral updates for ClassValue::remove

2025-05-15 Thread Chen Liang
On Fri, 14 Mar 2025 00:01:21 GMT, Chen Liang wrote: > The recent patch #23866 makes calling `ClassValue::remove()` from > `ClassValue::computeValue()` end up in infinite loops while fixing the stale > value risk from the method. > > The proposed fix is to preserve the stale value risk fix, and

Re: RFR: 8351996: Behavioral updates for ClassValue::remove [v15]

2025-05-15 Thread Chen Liang
On Tue, 13 May 2025 13:56:37 GMT, Chen Liang wrote: >> The recent patch #23866 makes calling `ClassValue::remove()` from >> `ClassValue::computeValue()` end up in infinite loops while fixing the stale >> value risk from the method. >> >> The proposed fix is to preserve the stale value risk fix

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

2025-05-15 Thread Weibing Xiao
On Sun, 11 May 2025 08:42:41 GMT, Abhishek N wrote: >> Create a Test case to have special cases coverage for currency.getInstance(). >> >> The test Validates that all currency codes and country-currency mappings in >> the input file are consistent with the Java Currency API. >> >> test results

Towards a JSON API for the JDK

2025-05-15 Thread Paul Sandoz
Hi, We would like to share with you our thoughts and plans towards a JSON API for the JDK. Please see the document below. - We have had the pleasure of using a clone of this API in some experiments we are conducting with ONNX and code reflection [1]. Using the API we were able to quickly writ

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

2025-05-15 Thread Vicente Romero
> 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 constructor parameter will be an object > with a unique ident

Re: RFR: 8357075: Remove leftover COMPAT locale data tests

2025-05-15 Thread Joe Wang
On Thu, 15 May 2025 19:31:45 GMT, Naoto Sato wrote: > Removing now-defunct COMPAT locale provider tests. Marked as reviewed by joehw (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/25257#pullrequestreview-2844891980

RFR: 8357063: Document preconditions for DecimalDigits methods

2025-05-15 Thread Shaojin Wen
Similar to PR #24982 Document preconditions on certain DecimalDigits methods that use operations either unsafe and/or without range checks. - Commit messages: - Document preconditions for DecimalDigits methods Changes: https://git.openjdk.org/jdk/pull/25246/files Webrev: https:/

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

2025-05-15 Thread Archie Cobbs
On Thu, 15 May 2025 19:53:03 GMT, ExE Boss wrote: > Note that `Arrays.fill(…)` is simply a `for(…)` loop with an additional range > check Interesting... I was assuming that most of the "bulk" methods in `Arrays` were being hand-optimized with special hardware magic (e.g., vector instructions),

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

2025-05-15 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: 8356993: ArrayDeque should use Arrays.fill() instead of for() loops [v2]

2025-05-15 Thread ExE Boss
On Thu, 15 May 2025 17:46:39 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 u

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

2025-05-15 Thread Vicente Romero
On Wed, 14 May 2025 18:25:26 GMT, Jan Lahoda wrote: >> Vicente Romero has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 34 commits: >> >> - Merge branch 'master' into JDK-8354556 >> - Update src/jdk.compiler/share/classes/com/sun/

RFR: 8357075: Remove leftover COMPAT locale data tests

2025-05-15 Thread Naoto Sato
Removing now-defunct COMPAT locale provider tests. - Commit messages: - initial commit Changes: https://git.openjdk.org/jdk/pull/25257/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25257&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8357075 Stats: 8496 lines in

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

2025-05-15 Thread Vicente Romero
On Wed, 14 May 2025 18:23:09 GMT, Jan Lahoda wrote: >> Vicente Romero has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 34 commits: >> >> - Merge branch 'master' into JDK-8354556 >> - Update src/jdk.compiler/share/classes/com/sun/

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

2025-05-15 Thread Sean Mullan
On Tue, 13 May 2025 14:01:10 GMT, Artur Barashev wrote: > > It is nice to refactor the common code for algorithm constraints checking > > into a new class, `X509KeyManagerConstraints.java`, used by both > > `SunX509KeyManagerImpl` and `X509KeyManagerImpl`. However, it looks like a > > new syst

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

2025-05-15 Thread Alan Bateman
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: 8354556: Expand value-based class warnings to java.lang.ref API [v14]

2025-05-15 Thread Vicente Romero
> 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 constructor parameter will be an object > with a unique ident

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

2025-05-15 Thread Justin Lu
On Sun, 11 May 2025 08:42:41 GMT, Abhishek N wrote: >> Create a Test case to have special cases coverage for currency.getInstance(). >> >> The test Validates that all currency codes and country-currency mappings in >> the input file are consistent with the Java Currency API. >> >> test results

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

2025-05-15 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: 8356993: ArrayDeque should use Arrays.fill() instead of for() loops [v2]

2025-05-15 Thread Raffaello Giulietti
On Thu, 15 May 2025 17:56:10 GMT, Archie Cobbs wrote: >> test/jdk/java/util/ArrayDeque/ClearBenchmarkTestJMH.java line 64: >> >>> 62: @Measurement(iterations = 10) >>> 63: @Warmup(iterations = 3) >>> 64: public void fillAndClear() { >> >> I think you need to return the collection or

Re: RFR: 8356977: UTF-8 cleanups

2025-05-15 Thread Naoto Sato
On Wed, 14 May 2025 14:23:31 GMT, Magnus Ihse Bursie wrote: > I found a few other places in the code that can be cleaned up after the > conversion to UTF-8. test/jdk/sun/text/resources/LocaleDataTest.java line 106: > 104: *FormatData/fr_FR/MonthNames/0=janvier > 105: *FormatD

Withdrawn: 8352489: Relax jspawnhelper version checks to informative

2025-05-15 Thread duke
On Thu, 20 Mar 2025 09:52:02 GMT, Aleksey Shipilev wrote: > See the bug for rationale. > > This goal for this improvement is to be easily backportable, so we can catch > up with update releases. As such, it does a few borderline-trivial changes, > and _does not_ change the jspawnhelper protoc

Re: RFR: 8357063: Document preconditions for DecimalDigits methods

2025-05-15 Thread Raffaello Giulietti
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. @wenshao I understand this is a kind of followup of #24982, but why this title? It seems just

Re: ProcessImpl: Can we obsolete the vfork mode?

2025-05-15 Thread Alan Bateman
On 15/05/2025 17:52, Thomas Stüfe wrote: : However,  we also could just get rid of vfork. That would simplify things alot. We have moved to posix_spawn-by-default with JDK 13 in 2019 (https://bugs.openjdk.org/browse/JDK-8213192). That is a long time ago; probably long enough to ween all cu

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

2025-05-15 Thread Archie Cobbs
On Thu, 15 May 2025 17:50:30 GMT, Rémi Forax wrote: > I think you need to return the collection or send it to a BlackHole I'm fairly new to the benchmark game so I would not be surprised if this is broken. Previously I was adding them to a list but that caused OOMs. Can you clarify what you m

RFR: 8357016: Candidate main methods not computed properly

2025-05-15 Thread Jan Lahoda
A consider class like this: public class TwoMains { private static void main(String... args) {} static void main() { System.out.println("Should be called, but is not."); } } The `MethodFinder` will do lookup for the `main(String[])` method, and it finds one, so does not pro

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

2025-05-15 Thread David Beaumont
On Mon, 12 May 2025 20:12:53 GMT, David Beaumont wrote: >> src/jdk.zipfs/share/classes/module-info.java line 281: >> >>> 279: * Even if a zip file system is writable ({@code fs.isReadOnly() >>> == false}), >>> 280: * this says nothing about whether individual files can be >>> cre

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

2025-05-15 Thread David Beaumont
On Wed, 14 May 2025 17:04:01 GMT, Lance Andersen wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix comment based on current behaviour. > > test/jdk/jdk/nio/zipfs/NewFileSystemTests.java line 207: > >> 205:

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

2025-05-15 Thread David Beaumont
On Tue, 13 May 2025 06:12:11 GMT, Alan Bateman wrote: >> Is this comment just agreeing with the proposed behaviour stated here? >> >> At the moment the code prohibits "read-only && create". It's an illegal >> argument exception (see tests). >> >> The only allowed access mode options with "crea

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

2025-05-15 Thread Rémi Forax
On Thu, 15 May 2025 17:46:39 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 u

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

2025-05-15 Thread Archie Cobbs
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: 8356993: ArrayDeque should use Arrays.fill() instead of for() loops [v2]

2025-05-15 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

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

2025-05-15 Thread Jaikiran Pai
On Thu, 15 May 2025 17:30:35 GMT, David Beaumont wrote: >> I created JDK-8356888 yesterday and [bplb](https://github.com/bplb) has >> picked it up already. > > So does this mean the code is good as-is now? Hello David, yes it's fine to throw `IllegalArgumentException` from here. The specificat

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

2025-05-15 Thread David Beaumont
On Wed, 14 May 2025 15:40:41 GMT, Lance Andersen wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix comment based on current behaviour. > > src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystem.java line 95: >

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

2025-05-15 Thread David Beaumont
On Wed, 14 May 2025 16:39:18 GMT, Lance Andersen wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix comment based on current behaviour. > > test/jdk/jdk/nio/zipfs/NewFileSystemTests.java line 219: > >> 217:

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

2025-05-15 Thread Andrew Dinn
On Thu, 15 May 2025 16:03:44 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: 8350880: (zipfs) Add support for read-only zip file systems [v3]

2025-05-15 Thread David Beaumont
On Tue, 13 May 2025 13:56:34 GMT, Jaikiran Pai wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix comment based on current behaviour. > > src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystem.java line 160: >

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

2025-05-15 Thread David Beaumont
On Wed, 14 May 2025 07:43:54 GMT, Alan Bateman wrote: >> I'll file an issue for this today, shortly. > > I created JDK-8356888 yesterday and [bplb](https://github.com/bplb) has > picked it up already. So does this mean the code is good as-is now? - PR Review Comment: https://git.o

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

2025-05-15 Thread David Beaumont
On Tue, 13 May 2025 13:48:32 GMT, Jaikiran Pai wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix comment based on current behaviour. > > src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystem.java line 174: >

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

2025-05-15 Thread David Beaumont
On Tue, 13 May 2025 12:32:56 GMT, Jaikiran Pai wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix comment based on current behaviour. > > src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystem.java line 147: >

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

2025-05-15 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

ProcessImpl: Can we obsolete the vfork mode?

2025-05-15 Thread Thomas Stüfe
Hi, I am currently working on child process issues and again noticed how inherently dangerous the vfork mode is. The child process can damage or kill the parent process if bad things happen in the time window between vfork and exec, when we prepare the target binary execution. For a non-exclusive

Re: RFR: 8352533: Report useful IOExceptions when jspawnhelper fails [v4]

2025-05-15 Thread Thomas Stuefe
On Wed, 14 May 2025 00:32:08 GMT, David Holmes wrote: >> Hmm, glibc keeps it very vague in the vfork() manpage, stating that "On some >> implementations, vfork() is equivalent to fork()." AIX manpage says just >> "The vfork subroutine is supported as a compatibility interface for older >> Berk

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

2025-05-15 Thread Johannes Graham
On Sun, 11 May 2025 16:22: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. This pull request has now been integrated. Chan

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

2025-05-15 Thread Raffaello Giulietti
On Wed, 14 May 2025 14:39:37 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: 8352926: New test TestDockerMemoryMetricsSubgroup.java fails [v5]

2025-05-15 Thread Leonid Mesnik
On Thu, 15 May 2025 10:03:11 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: > > Remove unused import Changes requested by lmesnik

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

2025-05-15 Thread duke
On Wed, 14 May 2025 14:39:37 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)

2025-05-15 Thread Johannes Graham
On Mon, 12 May 2025 02:06:23 GMT, Chen Liang 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. > > Sorry, didn't see your core-libs-dev mail. Crea

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

2025-05-15 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: 8355954: File.delete removes read-only files (win) [v3]

2025-05-15 Thread Brian Burkhalter
On Thu, 15 May 2025 11:11:06 GMT, Johannes Döbler wrote: > [I]t could be useful to let JUnit create and inject a temporary root > directory [...] I am not sure about this. The temporary file path created by JUnit, on macOS at least, is in a different directory hierarchy (`/var/...`) from the j

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

2025-05-15 Thread Andrew Haley
On Wed, 14 May 2025 15:36:32 GMT, Andrew Dinn wrote: > Looks good to me. Sorry, please approve again. - PR Comment: https://git.openjdk.org/jdk/pull/25147#issuecomment-2884310593

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

2025-05-15 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: 8352926: New test TestDockerMemoryMetricsSubgroup.java fails [v5]

2025-05-15 Thread Mikhailo Seledtsov
On Thu, 15 May 2025 10:03:11 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: > > Remove unused import Marked as reviewed by mseledt

Re: RFR: 8356891: Some code simplifications for basic BigIntegers' bit operations [v6]

2025-05-15 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: make magBitLength() an instance method - Cha

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v7]

2025-05-15 Thread Chen Liang
On Mon, 12 May 2025 19:42:15 GMT, Volkan Yazici wrote: >> Document preconditions on certain `JavaLangAccess` methods that use >> operations either unsafe and/or without range checks. > > Volkan Yazici has updated the pull request with a new target base due to a > merge or a rebase. The incremen

Integrated: 8353197: Document preconditions for JavaLangAccess methods

2025-05-15 Thread Volkan Yazici
On Thu, 1 May 2025 05:33:29 GMT, Volkan Yazici wrote: > Document preconditions on certain `JavaLangAccess` methods that use > operations either unsafe and/or without range checks. This pull request has now been integrated. Changeset: 8fcfddb2 Author:Volkan Yazici Committer: Chen Liang UR

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

2025-05-15 Thread Roger Riggs
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: 8356891: Some code simplifications for basic BigIntegers' bit operations [v5]

2025-05-15 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: Make javaIncrement(int[]) static - Changes:

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

2025-05-15 Thread Archie Cobbs
On Thu, 15 May 2025 06:07:06 GMT, Alan Bateman wrote: > Are you planning to add some JMH benchmarks to go with this? I wasn't planning to, but I'm inferring from your question that you'd prefer to see one. Which also makes me curious. I'd be shocked if this were slower, but even if not, I won

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

2025-05-15 Thread duke
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: 8356891: Some code simplifications for basic BigIntegers' bit operations [v4]

2025-05-15 Thread Raffaello Giulietti
On Tue, 13 May 2025 21:24:08 GMT, fabioromano1 wrote: >> 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

Re: RFR: 8356891: Some code simplifications for basic BigIntegers' bit operations [v4]

2025-05-15 Thread fabioromano1
On Thu, 15 May 2025 13:51:29 GMT, Raffaello Giulietti wrote: > It cannot be made an instance method, though. There's one usage which needs a > static invocation. @rgiulietti If you are referring to [this invocation](https://github.com/fabioromano1/jdk/blob/5ad26a14049e1765d9ef46f307d723dd4b31

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

2025-05-15 Thread Abhishek N
On Mon, 12 May 2025 23:24:03 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 > > Hi @abhn-git, I thi

Re: JDK-8352891 Performance improvements to ByteArrayOutputStream

2025-05-15 Thread Archie Cobbs
On Thu, May 15, 2025 at 2:02 AM Peter Levart wrote: > On 4/11/25 6:19 PM, Archie Cobbs wrote: > > Sorry if that wasn't clear - I didn't mean power-of-two exponential > > growth, I meant all segments were literally fixed size, like 256 or > > something (or maybe this value would be provided to the

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v7]

2025-05-15 Thread duke
On Mon, 12 May 2025 19:42:15 GMT, Volkan Yazici wrote: >> Document preconditions on certain `JavaLangAccess` methods that use >> operations either unsafe and/or without range checks. > > Volkan Yazici has updated the pull request with a new target base due to a > merge or a rebase. The incremen

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v7]

2025-05-15 Thread Volkan Yazici
On Mon, 12 May 2025 19:42:15 GMT, Volkan Yazici wrote: >> Document preconditions on certain `JavaLangAccess` methods that use >> operations either unsafe and/or without range checks. > > Volkan Yazici has updated the pull request with a new target base due to a > merge or a rebase. The incremen

Re: RFR: 8356891: Some code simplifications for basic BigIntegers' bit operations [v4]

2025-05-15 Thread Raffaello Giulietti
On Tue, 13 May 2025 21:24:08 GMT, fabioromano1 wrote: >> 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

  1   2   >