RFR: 8299504: Resolve `uses` and `provides` at run time if optional services are missing

2025-01-16 Thread Alan Bateman
Extend the support for optional dependences to allow for a service to be optional. The post-resolution consistency check specified by `Configuration.resolve` is relaxed to allow for the possibility that the service may be module that is not in the module graph. ConfigurationTest is ported from

Re: Factory methods for SequencedSet and SequencedMap

2025-01-16 Thread Rafael Winterhalter
Would it even be possible to change the return types of Set.of(...) and Map.of(...) without breaking binary compatibility? I also think that the randomization of Set.of(...) and Map.of(...) is a good property as it uncovers bugs early if one relies on iteration order. This especially since those m

Re: RFR: 8347840: Fix testlibrary compilation warnings [v3]

2025-01-16 Thread David Holmes
On Thu, 16 Jan 2025 17:53:48 GMT, Leonid Mesnik wrote: >> test/lib/jdk/test/lib/hprof/parser/ReadBuffer.java line 46: >> >>> 44: public int getInt(long pos) throws IOException; >>> 45: public long getLong(long pos) throws IOException; >>> 46: public void close() throws IOExceptio

Re: RFR: 8347840: Fix testlibrary compilation warnings [v3]

2025-01-16 Thread David Holmes
On Thu, 16 Jan 2025 18:18:15 GMT, Leonid Mesnik wrote: >> There few compiler warning disabled in the testlibary build. >> They should be fixed or localized and removed from build to prevent new >> possible issues. >> >> The main goal is to avoid new such issues in the testlibrary. >> Tested wi

Re: RFR: 8347841: Test fixes that use deprecated time zone IDs [v2]

2025-01-16 Thread Justin Lu
On Fri, 17 Jan 2025 00:42:03 GMT, Naoto Sato wrote: >> test/jdk/java/util/TimeZone/TimeZoneBoundaryTest.java line 417: >> >>> 415: //findBoundariesStepwise(1997, ONE_DAY, >>> TimeZone.getTimeZone("EST"), 2); >>> 416: findBoundariesStepwise(1997, ONE_DAY, >>> TimeZone.getTimeZon

Re: RFR: 8347841: Test fixes that use deprecated time zone IDs [v2]

2025-01-16 Thread Justin Lu
On Fri, 17 Jan 2025 00:45:54 GMT, Naoto Sato wrote: >> This fix is a follow on for >> [JDK-8342550](https://bugs.openjdk.org/browse/JDK-8342550). Replaces/Removes >> usages of those deprecated time zone ids in tests. > > Naoto Sato has updated the pull request incrementally with one additional

Re: RFR: 8347841: Test fixes that use deprecated time zone IDs [v2]

2025-01-16 Thread Naoto Sato
> This fix is a follow on for > [JDK-8342550](https://bugs.openjdk.org/browse/JDK-8342550). Replaces/Removes > usages of those deprecated time zone ids in tests. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Removed extra spaces --

Re: RFR: 8347841: Test fixes that use deprecated time zone IDs [v2]

2025-01-16 Thread Naoto Sato
On Thu, 16 Jan 2025 23:54:04 GMT, Justin Lu wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Removed extra spaces > > test/jdk/java/util/TimeZone/TimeZoneBoundaryTest.java line 417: > >> 415: //findBoundaries

Re: RFR: 8347841: Test fixes that use deprecated time zone IDs

2025-01-16 Thread Justin Lu
On Thu, 16 Jan 2025 23:38:48 GMT, Naoto Sato wrote: > This fix is a follow on for > [JDK-8342550](https://bugs.openjdk.org/browse/JDK-8342550). Replaces/Removes > usages of those deprecated time zone ids in tests. Looks good. test/jdk/java/text/Format/DateFormat/DateFormatTest.java line 190:

Re: RFR: 8343962: [REDO] Move getChars to DecimalDigits [v7]

2025-01-16 Thread Shaojin Wen
> This PR is a resubmission after PR #21593 was rolled back, and the unsafe > offset overflow issue has been fixed. > > 1) Move getChars methods of StringLatin1 and StringUTF16 to DecimalDigits to > reduce duplication. > > 2) HexDigits and OctalDigits also include getCharsLatin1 and getCharsUTF

Re: RFR: 8343962: [REDO] Move getChars to DecimalDigits [v6]

2025-01-16 Thread Shaojin Wen
On Thu, 16 Jan 2025 17:22:50 GMT, Raffaello Giulietti wrote: >> Shaojin Wen 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 19 additional >> co

RFR: 8347841: Test fixes that use deprecated time zone IDs

2025-01-16 Thread Naoto Sato
This fix is a follow on for [JDK-8342550](https://bugs.openjdk.org/browse/JDK-8342550). Replaces/Removes usages of those deprecated time zone ids in tests. - Commit messages: - initial commit Changes: https://git.openjdk.org/jdk/pull/23166/files Webrev: https://webrevs.openjdk.o

Re: Factory methods for SequencedSet and SequencedMap

2025-01-16 Thread David Alayachew
I should also add, the documentation went out of their way to specify that iteration order is unspecified. Also, I see Rémi's comment, but that's even more unconvincing to me. Map.of has an upper limit of 10 entries, and Map.ofEntries has an upper limit of that Java max file size limit thing. You

Re: Factory methods for SequencedSet and SequencedMap

2025-01-16 Thread David Alayachew
I guess let me ask the obvious question. Chesterton's fence -- why wasn't this done before? I refuse to believe that this idea wasn't thought up years ago, which leads me to believe there was a reason that it hasn't been done. Is there any way we can look this up in the bug database or something?

Re: RFR: 8347740: java/io/File/createTempFile/SpecialTempFile.java failing [v3]

2025-01-16 Thread Brian Burkhalter
On Thu, 16 Jan 2025 21:39:50 GMT, David Holmes wrote: > Not sure it is worth all this effort, but that's a core-libs decision. Neither am I. - PR Comment: https://git.openjdk.org/jdk/pull/23117#issuecomment-2597058064

Re: RFR: 8347949: Currency method to stream available Currencies [v2]

2025-01-16 Thread Justin Lu
> Please review this PR and CSR which adds a method to _java.util.Currency_ > which returns a stream of the available Currencies. > > The motivation can be found in the CSR. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: synchronize i

RFR: 8347949: Currency method to stream available Currencies

2025-01-16 Thread Justin Lu
Please review this PR and CSR which adds a method to _java.util.Currency_ which returns a stream of the available Currencies. The motivation can be found in the CSR. - Commit messages: - init Changes: https://git.openjdk.org/jdk/pull/23165/files Webrev: https://webrevs.openjdk.o

Re: RFR: 8347740: java/io/File/createTempFile/SpecialTempFile.java failing [v3]

2025-01-16 Thread David Holmes
On Wed, 15 Jan 2025 21:26:49 GMT, Brian Burkhalter wrote: >> Fix the means of determining whether an exception is to be expected in the >> Windows test. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8347740: Change W

Re: RFR: 8347740: java/io/File/createTempFile/SpecialTempFile.java failing [v3]

2025-01-16 Thread Brian Burkhalter
On Thu, 16 Jan 2025 20:38:40 GMT, David Holmes wrote: > Maybe I'm missing some subtlety here but shouldn't these special names always > fail on all Windows versions, so we just need to check Platform.isWindows() > from the test library? There was a change in Windows 11 as to which special name

Re: RFR: 8344943: Mark not subclassable classes final in java.base exported classes

2025-01-16 Thread Eirik Bjørsnøs
On Tue, 26 Nov 2024 20:08:28 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/net/InterfaceAddress.java line 45: >> >>> 43: >>> 44: /* >>> 45: * Package private constructor. Can't be built directly, instances >>> are >> >> The comment is outdated. This constructor is actua

Re: RFR: 8344943: Mark not subclassable classes final in java.base exported classes

2025-01-16 Thread Eirik Bjørsnøs
On Tue, 26 Nov 2024 13:04:41 GMT, Eirik Bjørsnøs wrote: > Please review this PR which adds the `final` modifier to non-subclassable > classes in `java.base`. > > The classes were identified using an automated analysis. See CSR for details. > > Besides simply adding the `final` access modifier,

Re: RFR: 8344943: Mark not subclassable classes final in java.base exported classes

2025-01-16 Thread Chen Liang
On Tue, 26 Nov 2024 20:03:39 GMT, Chen Liang wrote: >> Please review this PR which adds the `final` modifier to non-subclassable >> classes in `java.base`. >> >> The classes were identified using an automated analysis. See CSR for details. >> >> Besides simply adding the `final` access modifie

Re: RFR: 8344943: Mark not subclassable classes final in java.base exported classes

2025-01-16 Thread Eirik Bjørsnøs
On Tue, 26 Nov 2024 18:55:50 GMT, Eirik Bjørsnøs wrote: >> src/java.base/share/classes/java/lang/module/ModuleDescriptor.java line 1318: >> >>> 1316: Version version, >>> 1317: Set modifiers, >>> 1318: Set requires, >> >> I assume y

Re: RFR: 8344943: Mark not subclassable classes final in java.base exported classes

2025-01-16 Thread Chen Liang
On Tue, 26 Nov 2024 19:08:26 GMT, Eirik Bjørsnøs wrote: >> Thanks! Yes, that's good feedback. There are some non-API changes that I'd >> like to make, such as this and updating the comment for the >> `InterfaceAddress` constructor. >> >> I prefered to make the initial PR draft contain just the

Re: RFR: 8344943: Mark not subclassable classes final in java.base exported classes

2025-01-16 Thread Eirik Bjørsnøs
On Tue, 26 Nov 2024 18:00:21 GMT, Chen Liang wrote: >> Please review this PR which adds the `final` modifier to non-subclassable >> classes in `java.base`. >> >> The classes were identified using an automated analysis. See CSR for details. >> >> Besides simply adding the `final` access modifie

Re: RFR: 8344943: Mark not subclassable classes final in java.base exported classes

2025-01-16 Thread Alan Bateman
On Tue, 26 Nov 2024 13:04:41 GMT, Eirik Bjørsnøs wrote: > Please review this PR which adds the `final` modifier to non-subclassable > classes in `java.base`. > > The classes were identified using an automated analysis. See CSR for details. > > Besides simply adding the `final` access modifier,

Re: RFR: 8344943: Mark not subclassable classes final in java.base exported classes

2025-01-16 Thread Chen Liang
On Tue, 26 Nov 2024 13:04:41 GMT, Eirik Bjørsnøs wrote: > Please review this PR which adds the `final` modifier to non-subclassable > classes in `java.base`. > > The classes were identified using an automated analysis. See CSR for details. > > Besides simply adding the `final` access modifier,

RFR: 8344943: Mark not subclassable classes final in java.base exported classes

2025-01-16 Thread Eirik Bjørsnøs
Please review this PR which adds the `final` modifier to non-subclassable classes in `java.base`. The classes were identified using an automated analysis. See CSR for details. Besides simply adding the `final` access modifier, the PR: * Updates a note in `java.lang.constant.DynamicCallSiteDesc`

Re: RFR: 8344943: Mark not subclassable classes final in java.base exported classes

2025-01-16 Thread Eirik Bjørsnøs
On Tue, 26 Nov 2024 18:49:07 GMT, Alan Bateman wrote: >> Please review this PR which adds the `final` modifier to non-subclassable >> classes in `java.base`. >> >> The classes were identified using an automated analysis. See CSR for details. >> >> Besides simply adding the `final` access modif

Re: RFR: 8347740: java/io/File/createTempFile/SpecialTempFile.java failing [v3]

2025-01-16 Thread David Holmes
On Wed, 15 Jan 2025 21:26:49 GMT, Brian Burkhalter wrote: >> Fix the means of determining whether an exception is to be expected in the >> Windows test. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8347740: Change W

Re: Factory methods for SequencedSet and SequencedMap

2025-01-16 Thread Jens Lideström
Having the result Map.of and Set.of preserve the insertion order would often be convenient. More often than not programs iterate over the contents of a maps and sets at some point. For example to present the values in a GUI, for serialisation, or even for error printouts. In all those cases ha

Withdrawn: 8347408: Create an internal method handle adapter for system calls with errno

2025-01-16 Thread Per Minborg
On Tue, 26 Nov 2024 15:04:51 GMT, Per Minborg wrote: > Going forward, converting older JDK code to use the relatively new FFM API > requires system calls that can provide `errno` and the likes to explicitly > allocate a MemorySegment to capture potential error states. This can lead to > negati

Re: RFR: 8342775: [Graal] java/util/concurrent/locks/Lock/OOMEInAQS.java fails OOME thrown from the UncaughtExceptionHandler [v2]

2025-01-16 Thread Tom Rodriguez
> Deoptimization with escape analysis can fail when trying to rematerialize > objects as described in JDK-8227309. In this test this can happen in Xcomp > mode in the framework of the test resulting in a test failure. Making the > number of threads non-final avoids scalar replacement and thus

Re: RFR: 8347840: Fix testlibrary compilation warnings [v3]

2025-01-16 Thread Leonid Mesnik
On Thu, 16 Jan 2025 18:14:39 GMT, Leonid Mesnik wrote: >> There few compiler warning disabled in the testlibary build. >> They should be fixed or localized and removed from build to prevent new >> possible issues. >> >> The main goal is to avoid new such issues in the testlibrary. >> Tested wi

Re: RFR: 8347840: Fix testlibrary compilation warnings [v3]

2025-01-16 Thread Leonid Mesnik
On Thu, 16 Jan 2025 07:09:46 GMT, Alan Bateman wrote: >> Leonid Mesnik has updated the pull request incrementally with one additional >> commit since the last revision: >> >> revert change > > test/lib/jdk/test/lib/thread/VThreadPinner.java line 97: > >> 95: * virtual thread then it inv

Re: RFR: 8347840: Fix testlibrary compilation warnings [v3]

2025-01-16 Thread Leonid Mesnik
On Thu, 16 Jan 2025 05:31:44 GMT, David Holmes wrote: >> Leonid Mesnik has updated the pull request incrementally with one additional >> commit since the last revision: >> >> revert change > > test/lib/jdk/test/lib/format/ArrayDiff.java line 110: > >> 108: * @return an ArrayDiff instanc

Re: RFR: 8347840: Fix testlibrary compilation warnings [v3]

2025-01-16 Thread Leonid Mesnik
> There few compiler warning disabled in the testlibary build. > They should be fixed or localized and removed from build to prevent new > possible issues. > > The main goal is to avoid new such issues in the testlibrary. > Tested with tier1-5 to ensure that all tests were passed. Leonid Mesnik

Re: RFR: 8347840: Fix testlibrary compilation warnings [v2]

2025-01-16 Thread Leonid Mesnik
> There few compiler warning disabled in the testlibary build. > They should be fixed or localized and removed from build to prevent new > possible issues. > > The main goal is to avoid new such issues in the testlibrary. > Tested with tier1-5 to ensure that all tests were passed. Leonid Mesnik

Re: RFR: 8343962: [REDO] Move getChars to DecimalDigits [v6]

2025-01-16 Thread Raffaello Giulietti
On Wed, 11 Dec 2024 22:30:32 GMT, Shaojin Wen wrote: >> This PR is a resubmission after PR #21593 was rolled back, and the unsafe >> offset overflow issue has been fixed. >> >> 1) Move getChars methods of StringLatin1 and StringUTF16 to DecimalDigits to >> reduce duplication. >> >> 2) HexDigi

Re: RFR: 8347408: Create an internal method handle adapter for system calls with errno [v16]

2025-01-16 Thread Matthias Ernst
On Thu, 16 Jan 2025 14:16:15 GMT, Matthias Ernst wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove unused class > > src/java.base/share/classes/jdk/internal/util/SingleElementPool.java line 132: > >> 130:

Re: RFR: 8343962: [REDO] Move getChars to DecimalDigits [v4]

2025-01-16 Thread Raffaello Giulietti
On Mon, 9 Dec 2024 15:22:13 GMT, Shaojin Wen wrote: >> Shaojin Wen 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 17 additional >> commits sinc

Re: Does anyone have context on jdk.httpserver?

2025-01-16 Thread robert engels
Hi, I would like to revisit this. I have signed the OCA for another PR I worked on - I believe it covers all of my contributions. The websockets license looks to be very permissive. But it seems like this is something Oracle could reach out to the authors to resolve. I could also simply create

Re: Does anyone have context on jdk.httpserver?

2025-01-16 Thread Robert Engels
Ok, based on this I don’t think VT (virtual threads) related structure and performance improvements make sense. If you can’t do the other elements you’re forced to use a different implementation anyway and the performance issues can be addressed there. Thanks for the feedback. Robert > On J

Minor optimizations / questions about stream implementation

2025-01-16 Thread Daniel Avery
Hi, I recently finished a deep-dive through the code in java.util.stream, and came across a few corners that stuck out to me as being odd, in a "small missed opportunity" kind of way. I figured I'd raise them here just in case any are legitimate, or I could get some better insight. I am looking at

Re: RFR: 8347408: Create an internal method handle adapter for system calls with errno [v16]

2025-01-16 Thread Matthias Ernst
On Thu, 16 Jan 2025 11:58:20 GMT, Per Minborg wrote: >> Going forward, converting older JDK code to use the relatively new FFM API >> requires system calls that can provide `errno` and the likes to explicitly >> allocate a MemorySegment to capture potential error states. This can lead to >> ne

Re: RFR: 8347408: Create an internal method handle adapter for system calls with errno [v16]

2025-01-16 Thread Maurizio Cimadamore
On Thu, 16 Jan 2025 11:58:20 GMT, Per Minborg wrote: >> Going forward, converting older JDK code to use the relatively new FFM API >> requires system calls that can provide `errno` and the likes to explicitly >> allocate a MemorySegment to capture potential error states. This can lead to >> ne

Re: RFR: 8347842: ThreadPoolExecutor specification discusses RuntimePermission

2025-01-16 Thread Alan Bateman
On Thu, 16 Jan 2025 13:46:16 GMT, Viktor Klang wrote: > Removes ThreadPoolExecutor javadoc which mentions RuntimePermission. Marked as reviewed by alanb (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/23156#pullrequestreview-2556383329

Re: RFR: 8347825: Make IDEA ide support use proper build system mechanisms [v2]

2025-01-16 Thread Magnus Ihse Bursie
On Wed, 15 Jan 2025 16:13:04 GMT, Magnus Ihse Bursie wrote: >> The idea.sh script which creates a configuration for IDEA does at some point >> call a makefile, to extract information from the build system. However, this >> is done in an ad-hoc manner that does not fit properly in the build syst

Integrated: 8347825: Make IDEA ide support use proper build system mechanisms

2025-01-16 Thread Magnus Ihse Bursie
On Wed, 15 Jan 2025 15:33:14 GMT, Magnus Ihse Bursie wrote: > The idea.sh script which creates a configuration for IDEA does at some point > call a makefile, to extract information from the build system. However, this > is done in an ad-hoc manner that does not fit properly in the build system.

Re: RFR: 8347825: Make IDEA ide support use proper build system mechanisms [v2]

2025-01-16 Thread Erik Joelsson
On Wed, 15 Jan 2025 16:13:04 GMT, Magnus Ihse Bursie wrote: >> The idea.sh script which creates a configuration for IDEA does at some point >> call a makefile, to extract information from the build system. However, this >> is done in an ad-hoc manner that does not fit properly in the build syst

RFR: 8347842: ThreadPoolExecutor specification discusses RuntimePermission

2025-01-16 Thread Viktor Klang
Removes ThreadPoolExecutor javadoc which mentions RuntimePermission. - Commit messages: - Removing reference to RuntimePermission in the ThreadPoolExecutor javadoc Changes: https://git.openjdk.org/jdk/pull/23156/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23156&range=00

Re: RFR: 8291027: Some of TimeZone methods marked 'synchronized' unnecessarily [v2]

2025-01-16 Thread Andrey Turbanov
> There are 3 methods in `java.util.TimeZone` which are `public static` and > marked as `synchronized`: > 1. getTimeZone(String) > 2. getAvailableIDs(int) > 3. getAvailableIDs() > > This means it is a bottle neck for the whole VM. > I've checked the implementation and concluded that `synchronized

Re: RFR: 8347408: Create an internal method handle adapter for system calls with errno [v16]

2025-01-16 Thread Per Minborg
> Going forward, converting older JDK code to use the relatively new FFM API > requires system calls that can provide `errno` and the likes to explicitly > allocate a MemorySegment to capture potential error states. This can lead to > negative performance implications if not designed carefully a

Re: RFR: 8347408: Create an internal method handle adapter for system calls with errno [v15]

2025-01-16 Thread Per Minborg
> Going forward, converting older JDK code to use the relatively new FFM API > requires system calls that can provide `errno` and the likes to explicitly > allocate a MemorySegment to capture potential error states. This can lead to > negative performance implications if not designed carefully a

Re: RFR: 8347825: Make IDEA ide support use proper build system mechanisms [v2]

2025-01-16 Thread Maurizio Cimadamore
On Wed, 15 Jan 2025 16:13:04 GMT, Magnus Ihse Bursie wrote: >> The idea.sh script which creates a configuration for IDEA does at some point >> call a makefile, to extract information from the build system. However, this >> is done in an ad-hoc manner that does not fit properly in the build syst

Re: RFR: 8347408: Create an internal method handle adapter for system calls with errno [v14]

2025-01-16 Thread Per Minborg
On Wed, 15 Jan 2025 16:13:38 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Use invokeExact semantics in the tests >> - Clean up > > src/java.base/share/classes/jdk/internal/foreign/Cap