RFR: 8350075: Performance difference between SegmentAllocator methods

2025-02-14 Thread Per Minborg
This PR proposes to add `@ForceInline` to the `default` methods in `SegmentAllocator` that do not already have it. - Commit messages: - Add @ForceInline to default methods Changes: https://git.openjdk.org/jdk/pull/23628/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23628

Re: Adding BigDecimal.valueOf(float val) constructor

2025-02-14 Thread Raffaello Giulietti
> We can hardly add an override of valueOf(float). correction We can hardly add an overload of valueOf(float). On 2025-02-14 15:12, Raffaello Giulietti wrote: I think that we should definitely improve the documentation of valueOf(double) to clarify that passing a float might not be the best u

Re: RFR: 8350098: jpackage test lib erroneously will run methods without @Test annotation as tests

2025-02-14 Thread Alexey Semenyuk
On Fri, 14 Feb 2025 14:30:25 GMT, Alexey Semenyuk wrote: > Don't consider functions without `jdk.jpackage.test.Annotations.Test` > annotation as tests. > > Additionally, enhance the functionality of > `jdk.jpackage.test.Annotations.ParameterSupplier` annotation: make an empty > string the def

RFR: 8350102: Decouple jpackage test-lib Executor.Result and Executor classes

2025-02-14 Thread Alexey Semenyuk
8350102: Decouple jpackage test-lib Executor.Result and Executor classes - Commit messages: - Bugfix Executor.createResult() and add Executor.getExecutable() - Decouple Executor.Result and Executor classes Changes: https://git.openjdk.org/jdk/pull/23636/files Webrev: https://webr

Re: RFR: 8350102: Decouple jpackage test-lib Executor.Result and Executor classes

2025-02-14 Thread Alexey Semenyuk
On Fri, 14 Feb 2025 14:52:38 GMT, Alexey Semenyuk wrote: > 8350102: Decouple jpackage test-lib Executor.Result and Executor classes @sashamatveev PTAL - PR Comment: https://git.openjdk.org/jdk/pull/23636#issuecomment-2659538132

Re: Adding BigDecimal.valueOf(float val) constructor

2025-02-14 Thread Raffaello Giulietti
I think that we should definitely improve the documentation of valueOf(double) to clarify that passing a float might not be the best usage of the method, and suggest using the idiom valueOf(Float.toString(f)) as already noted in this thread. We can hardly add an override of valueOf(floa

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v2]

2025-02-14 Thread Daniel Fuchs
On Fri, 14 Feb 2025 15:18:56 GMT, David Beaumont wrote: >> 8349206: j.u.l.Handler classes create deadlock risk via synchronized >> publish() method. >> >> 1. Remove synchronization of calls to publish() in Handlers in >> java.util.logging package. >> 2. Add explanatory comments to various affe

Re: RFR: 8347946: Add API note that caller should validate/trust signers to the getCertificates and getCodeSigners methods of JarEntry and JarURLConnection

2025-02-14 Thread Sean Mullan
On Fri, 14 Feb 2025 07:33:58 GMT, Jaikiran Pai wrote: > Hello Sean, given the assertable change to the API documentation of > `java.net.JarURLConnection.getCertificates()`, which now specifies the order > of the returned certificates, would this require a CSR? Yes, I think we should. I'll do t

RFR: 8350098: jpackage test lib erroneously will run methods without @Test annotation as tests

2025-02-14 Thread Alexey Semenyuk
Don't consider functions without `jdk.jpackage.test.Annotations.Test` annotation as tests. Additionally, enhance the functionality of `jdk.jpackage.test.Annotations.ParameterSupplier` annotation: make an empty string the default value. If the method name is empty (the default annotation value)

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v2]

2025-02-14 Thread David Beaumont
On Fri, 14 Feb 2025 15:50:20 GMT, Daniel Fuchs wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Reworking FileHandler so rotation occurs synchronously after the last log >> entry is written. > > src/java.logging/

Re: RFR: 8349699: XSL transform fails with certain UTF-8 characters on 1024 byte boundaries [v2]

2025-02-14 Thread Naoto Sato
On Fri, 14 Feb 2025 19:09:53 GMT, Joe Wang wrote: >> Fix an edge case in the patch for JDK-8207760. > > Joe Wang has updated the pull request incrementally with one additional > commit since the last revision: > > un-needed property removed test/jaxp/javax/xml/jaxp/unittest/transform/JDK8207

Re: RFR: 8350102: Decouple jpackage test-lib Executor.Result and Executor classes

2025-02-14 Thread Alexander Matveev
On Fri, 14 Feb 2025 14:52:38 GMT, Alexey Semenyuk wrote: > 8350102: Decouple jpackage test-lib Executor.Result and Executor classes Looks good. - Marked as reviewed by almatvee (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/23636#pullrequestreview-2618958519

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v2]

2025-02-14 Thread Jason Mehrens
On Fri, 14 Feb 2025 10:46:08 GMT, David Beaumont wrote: >> I've looked through a lot of github logging properties files and see no >> evidence that the pattern of use you're suggesting is ever actually done, >> and any such attempt to force one-log-per-file is entirely unsupported by >> the ex

Re: RFR: 8350098: jpackage test lib erroneously will run methods without @Test annotation as tests

2025-02-14 Thread Alexander Matveev
On Fri, 14 Feb 2025 14:30:25 GMT, Alexey Semenyuk wrote: > Don't consider functions without `jdk.jpackage.test.Annotations.Test` > annotation as tests. > > Additionally, enhance the functionality of > `jdk.jpackage.test.Annotations.ParameterSupplier` annotation: make an empty > string the def

Re: RFR: 8341402: BigDecimal's square root optimization [v31]

2025-02-14 Thread Raffaello Giulietti
On Wed, 4 Dec 2024 14:56:02 GMT, fabioromano1 wrote: >> After changing `BigInteger.sqrt()` algorithm, this can be also used to speed >> up `BigDecimal.sqrt()` implementation. Here is how I made it. >> >> The main steps of the algorithm are as follows: >> first argument reduce the value to an in

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-02-14 Thread David Beaumont
On Fri, 14 Feb 2025 10:39:54 GMT, David Beaumont wrote: >>>Yes, it's certainly something you can deliberately provoke in a way that >>>wasn't possible before. >> >> Setting limit to 1 byte with a large count is a way to make sure each log >> file contains 0 or 1 log record. I think this patch

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-02-14 Thread David Beaumont
On Fri, 14 Feb 2025 06:04:09 GMT, Jason Mehrens wrote: >> Yes, it's certainly something you can deliberately provoke in a way that >> wasn't possible before. >> However I'm not sure that the statement "Old code should only allow at most >> 2 records ...", while true of the code itself was ever

Re: RFR: 8350075: Performance difference between SegmentAllocator methods

2025-02-14 Thread Maurizio Cimadamore
On Fri, 14 Feb 2025 09:19:35 GMT, Per Minborg wrote: > This PR proposes to add `@ForceInline` to the `default` methods in > `SegmentAllocator` that do not already have it. Change is good. There should be a microbenchmark for this. - PR Review: https://git.openjdk.org/jdk/pull/2362

Integrated: 8350011: Convert jpackage test lib tests in JUnit format

2025-02-14 Thread Alexey Semenyuk
On Thu, 13 Feb 2025 14:37:50 GMT, Alexey Semenyuk wrote: > Convert jpackage test library tests in JUnit format. This simplifies running > them in IDE. > > Added > [JUnitAdapter](https://github.com/openjdk/jdk/pull/23615/files#diff-8719943fb769c04daf413427dc812650763f588cbd0ef6b50cccd11260353c0

Withdrawn: 8316804: Gracefully handle the case where --release is not specified last

2025-02-14 Thread duke
On Wed, 13 Nov 2024 15:24:43 GMT, Christian Stein wrote: > Please review this change for the `jar` tool to gracefully handle the case > where `--release` is not specified as the last arguments. > > Prior to this commit, operation modes `-d --describe-module` and `--validate` > expected to read

Re: RFR: 8349699: XSL transform fails with certain UTF-8 characters on 1024 byte boundaries

2025-02-14 Thread Joe Wang
On Fri, 14 Feb 2025 00:56:03 GMT, Joe Wang wrote: > Fix an edge case in the patch for JDK-8207760. Hello Skara (hopefully this will trigger the notification email). - PR Comment: https://git.openjdk.org/jdk/pull/23623#issuecomment-2659974504

Re: RFR: 8349699: XSL transform fails with certain UTF-8 characters on 1024 byte boundaries

2025-02-14 Thread Lance Andersen
On Fri, 14 Feb 2025 00:56:03 GMT, Joe Wang wrote: > Fix an edge case in the patch for JDK-8207760. Marked as reviewed by lancea (Reviewer). test/jaxp/javax/xml/jaxp/unittest/transform/JDK8207760.java line 125: > 123: Transformer t = createTransformerFromInputstream( > 124:

Re: RFR: 8349699: XSL transform fails with certain UTF-8 characters on 1024 byte boundaries [v2]

2025-02-14 Thread Joe Wang
On Fri, 14 Feb 2025 18:25:30 GMT, Lance Andersen wrote: >> Joe Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> un-needed property removed > > test/jaxp/javax/xml/jaxp/unittest/transform/JDK8207760.java line 125: > >> 123: T

Re: RFR: 8349699: XSL transform fails with certain UTF-8 characters on 1024 byte boundaries [v2]

2025-02-14 Thread Joe Wang
> Fix an edge case in the patch for JDK-8207760. Joe Wang has updated the pull request incrementally with one additional commit since the last revision: un-needed property removed - Changes: - all: https://git.openjdk.org/jdk/pull/23623/files - new: https://git.openjdk.org/jd

Re: RFR: 8349759: Fix CertificateBuilder and SimpleOCSPServer test utilities to support PQC algorithms [v3]

2025-02-14 Thread Sean Mullan
On Thu, 13 Feb 2025 22:43:39 GMT, Jamil Nimeh wrote: >> test/lib/jdk/test/lib/security/CertificateBuilder.java line 462: >> >>> 460: throws CertificateException, IOException, >>> NoSuchAlgorithmException { >>> 461: >>> 462: AlgorithmId signAlg; >> >> This variable looks li

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-02-14 Thread David Beaumont
On Fri, 14 Feb 2025 06:14:34 GMT, Jason Mehrens wrote: >> 8349206: j.u.l.Handler classes create deadlock risk via synchronized >> publish() method. >> >> 1. Remove synchronization of calls to publish() in Handlers in >> java.util.logging package. >> 2. Add explanatory comments to various affec

Re: RFR: 8347946: Add API note that caller should validate/trust signers to the getCertificates and getCodeSigners methods of JarEntry and JarURLConnection

2025-02-14 Thread Sean Mullan
On Fri, 14 Feb 2025 13:57:12 GMT, Sean Mullan wrote: > > Hello Sean, given the assertable change to the API documentation of > > `java.net.JarURLConnection.getCertificates()`, which now specifies the > > order of the returned certificates, would this require a CSR? > > Yes, I think we should.

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v2]

2025-02-14 Thread Daniel Fuchs
On Fri, 14 Feb 2025 16:32:08 GMT, David Beaumont wrote: >> src/java.logging/share/classes/java/util/logging/FileHandler.java line 193: >> >>> 191: out.write(b); >>> 192: written++; >>> 193: flushOrRotateIfFull(); >> >> I don't think that's correct. You don't

Re: RFR: 8307513: C2: intrinsify Math.max(long,long) and Math.min(long,long) [v11]

2025-02-14 Thread Roland Westrelin
On Thu, 13 Feb 2025 16:43:22 GMT, Roland Westrelin wrote: >> @galderz How sure are that intrinsifying directly is really the right >> approach? >> >> Maybe the approach via `PhaseIdealLoop::conditional_move` where we know the >> branching probability is a better one. Though of course knowing t

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-02-14 Thread David Beaumont
On Fri, 14 Feb 2025 15:01:37 GMT, David Beaumont wrote: >> src/java.logging/share/classes/java/util/logging/StreamHandler.java line 210: >> >>> 208: if (!doneHeader) { >>> 209: writer.write(getFormatter().getHead(this)); >>> 210: doneHeader

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v2]

2025-02-14 Thread David Beaumont
> 8349206: j.u.l.Handler classes create deadlock risk via synchronized > publish() method. > > 1. Remove synchronization of calls to publish() in Handlers in > java.util.logging package. > 2. Add explanatory comments to various affected methods. > 3. Add a test to ensure deadlocks no longer occu

Re: RFR: 8349909: jdk.internal.jimage.decompressor.ZipDecompressor does not close the Inflater in exceptional cases

2025-02-14 Thread Lance Andersen
On Fri, 14 Feb 2025 07:41:26 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which proposes to properly close the > `Inflater` instance used in > `jdk.internal.jimage.decompressor.ZipDecompressor.decompress()` method? This > addresses https://bugs.openjdk.org/browse/JDK-834

Re: RFR: 8347946: Add API note that caller should validate/trust signers to the getCertificates and getCodeSigners methods of JarEntry and JarURLConnection

2025-02-14 Thread Lance Andersen
On Thu, 13 Feb 2025 16:27:03 GMT, Sean Mullan wrote: > This change adds an API note to these methods recommending that the caller > should perform further validation steps on the code signers that signed the > JAR file, such as validating the code signer's certificate chain, and > determining

RFR: 8350041: Make libstringPlatformChars support static JDK

2025-02-14 Thread Jiangli Zhou
Please review the fix to make `java/lang/String/nativeEncoding/StringPlatformChars.java` jtreg test: - Lookup `JNU_GetStringPlatformChars`, `JNU_ClassString` and `JNU_NewStringPlatform` dynamically - Remove `#include "jni_util.h"` and don't link `libstringPlatformChars.so` with `libjava.so` -

Re: RFR: 8138614: (spec str) StringBuffer and StringBuilder methods improperly require "new" String to be returned [v2]

2025-02-14 Thread Roger Riggs
On Thu, 13 Feb 2025 20:51:26 GMT, Stuart Marks wrote: >> A couple adjustments to the specs for four methods of StringBuilder and >> StringBuffer so that they no longer require new Strings to be created, just >> a String with the right contents. No implementation changes. Note that the >> actua

Re: RFR: 8349699: XSL transform fails with certain UTF-8 characters on 1024 byte boundaries [v2]

2025-02-14 Thread Lance Andersen
On Fri, 14 Feb 2025 19:09:53 GMT, Joe Wang wrote: >> Fix an edge case in the patch for JDK-8207760. > > Joe Wang has updated the pull request incrementally with one additional > commit since the last revision: > > un-needed property removed Marked as reviewed by lancea (Reviewer). -