Re: RFR: 8364588: Export the NPE backtracking functionality to general null-checking APIs [v4]

2025-09-23 Thread Chen Liang
On Tue, 5 Aug 2025 16:04:08 GMT, Chen Liang wrote: >> Provide a general facility for our null check APIs like >> Objects::requireNonNull or future Checks::nullCheck (void), converting the >> existing infrastructure to start tracking from a given stack site (depth >> o

Re: RFR: 8364588: Export the NPE backtracking functionality to general null-checking APIs [v4]

2025-09-17 Thread Chen Liang
On Fri, 12 Sep 2025 11:28:41 GMT, Jaikiran Pai wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update NPE per roger review > > Hello Chen, I had a look at the changes, but I'm miss

Re: RFR: 8366224: Introduce DecimalDigits.appendPair for efficient two-digit formatting and refactor DateTimeHelper [v4]

2025-09-14 Thread Chen Liang
On Mon, 8 Sep 2025 02:27:10 GMT, Shaojin Wen wrote: >> This PR introduces a new efficient API for appending two-digit integers to >> StringBuilders and refactors DateTimeHelper to leverage this new >> functionality. >> >> Changes include: >> >> 1. New `appendPair` method for efficient two-dig

Re: RFR: 8366224: Introduce DecimalDigits.appendPair for efficient two-digit formatting and refactor DateTimeHelper [v4]

2025-09-14 Thread Chen Liang
On Mon, 8 Sep 2025 02:27:10 GMT, Shaojin Wen wrote: >> This PR introduces a new efficient API for appending two-digit integers to >> StringBuilders and refactors DateTimeHelper to leverage this new >> functionality. >> >> Changes include: >> >> 1. New `appendPair` method for efficient two-dig

Re: RFR: 8366765: [REDO] Rename JavaLangAccess::*NoRepl methods [v3]

2025-09-04 Thread Chen Liang
On Thu, 4 Sep 2025 11:22:31 GMT, Volkan Yazici wrote: >> [JDK-8356439] (#26413) conflicted with [JDK-8362893] (#26493), caused >> `tier1` failures, and hence, backed out in [JDK-8366693] (#27050). This PR >> reintroduces JDK-8356439 with sufficient fixes. >> >> [JDK-8356439]: https://bugs.open

Re: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v10]

2025-08-30 Thread Chen Liang
On Fri, 29 Aug 2025 13:48:52 GMT, Volkan Yazici wrote: >> `NoRepl`-suffixed `String` methods denote methods that do not replace >> invalid characters, but throw `CharacterCodingException` on encounter. This >> behavior cannot easily be derived from the method footprints, has been a >> source o

Re: RFR: 8366261: Provide utility methods for sun.security.util.Password [v2]

2025-08-28 Thread Chen Liang
On Wed, 27 Aug 2025 23:48:28 GMT, Naoto Sato wrote: >> Providing a couple of utility methods using the "built-in" `Console` >> implementation to support tools that require password input, such as >> `keytool`, ensuring they work even when std0ut is redirected. > > Naoto Sato has updated the pul

Re: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v7]

2025-08-27 Thread Chen Liang
On Mon, 25 Aug 2025 07:46:59 GMT, Volkan Yazici wrote: >> `NoRepl`-suffixed `String` methods denote methods that do not replace >> invalid characters, but throw `CharacterCodingException` on encounter. This >> behavior cannot easily be derived from the method footprints, has been a >> source o

Re: RFR: 8366261: Provide utility methods for sun.security.util.Password

2025-08-27 Thread Chen Liang
On Wed, 27 Aug 2025 22:53:28 GMT, Naoto Sato wrote: > Providing a couple of utility methods using the "built-in" `Console` > implementation to support tools that require password input, such as > `keytool`, ensuring they work even when stdin is redirected. src/java.base/share/classes/java/io/C

Re: RFR: 8365581: Optimize Java implementation of P256 arithmetic

2025-08-21 Thread Chen Liang
On Fri, 15 Aug 2025 01:01:01 GMT, Ben Perez wrote: > There are several places where MontgomeryIntegerPolynomialP256.mult() can be > optimized. In particular, since modulus[2] = 0 several multiplications can be > removed. Other multiplications can be replaced by shifts, which also saves > time.

Re: RFR: 8365581: Optimize Java implementation of P256 arithmetic

2025-08-21 Thread Chen Liang
On Wed, 20 Aug 2025 14:47:58 GMT, Ferenc Rakoczi wrote: > What do you mean by "works"? And why doesn't it work for the zeroes? As descirbed by [the documentation of `@Stable`](https://cr.openjdk.org/~jrose/jvm/Stable.html), a 0 value may be interpreted as "uncomputed" for lazy values, and the

Re: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v5]

2025-08-21 Thread Chen Liang
On Thu, 21 Aug 2025 13:29:06 GMT, Roger Riggs wrote: >> Volkan Yazici has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 13 commits: >> >> - Javadoc fix >> - Cosmetic improvements >> - Merge remote-tracking branch 'upstream/master

Re: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v5]

2025-08-21 Thread Chen Liang
On Thu, 21 Aug 2025 09:39:44 GMT, Volkan Yazici wrote: >> `NoRepl`-suffixed `String` methods denote methods that do not replace >> invalid characters, but throw `CharacterCodingException` on encounter. This >> behavior cannot easily be derived from the method footprints, has been a >> source o

Re: RFR: 8365719: Refactor uses of JLA.uncheckedNewStringNoRepl

2025-08-19 Thread Chen Liang
On Tue, 19 Aug 2025 14:11:29 GMT, Roger Riggs wrote: >> src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 330: >> >>> 328: * @return the newly created string >>> 329: */ >>> 330: String uncheckedNewStringWithLatin1Bytes(byte[] bytes); >> >> @RogerRiggs, we i

Re: RFR: 8365719: Refactor uses of JLA.uncheckedNewStringNoRepl

2025-08-18 Thread Chen Liang
On Mon, 18 Aug 2025 21:34:39 GMT, Roger Riggs wrote: > Refactor uses of JLAuncheckedNewStringNoRepl(byte[], ISO_8859_1) adding > JLA.uncheckedNewStringWithLatin1Bytes(byte[]). > There is no decoding needed, and no exceptions expected or thrown when > creating the string from the supplied latin1

Re: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v3]

2025-08-12 Thread Chen Liang
On Tue, 12 Aug 2025 12:11:07 GMT, Volkan Yazici wrote: >> `NoRepl`-suffixed `String` methods denote methods that do not replace >> invalid characters, but throw `CharacterCodingException` on encounter. This >> behavior cannot easily be derived from the method footprints, has been a >> source o

Re: RFR: 8365288: PEMDecoder should throw ClassCastException

2025-08-12 Thread Chen Liang
On Tue, 12 Aug 2025 11:49:50 GMT, Weijun Wang wrote: >> test/jdk/java/security/PEM/PEMDecoderTest.java line 492: >> >>> 490: testClass(entry, clazz); >>> 491: } catch (Exception e) { >>> 492: if (e.getClass().isAssignableFrom(ec)) { >> >> You got it the other way

Re: RFR: 8365288: PEMDecoder should throw ClassCastException

2025-08-11 Thread Chen Liang
On Mon, 11 Aug 2025 20:58:13 GMT, Anthony Scarpino wrote: > This bug fix is to change PEMDecoder.decode(..., Class<>) using > PKCS8EncodedKeySpec and X509EncodedKeySpec will throw an > IllegalArgumentException when the decoded data does not match. It should be > ClassCastException. > > Thank

Re: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v2]

2025-08-10 Thread Chen Liang
On Fri, 8 Aug 2025 13:38:31 GMT, Volkan Yazici wrote: >> `NoRepl`-suffixed `String` methods denote methods that do not replace >> invalid characters, but throw `CharacterCodingException` on encounter. This >> behavior cannot easily be derived from the method footprints, has been a >> source of

Re: RFR: 8364588: Export the NPE backtracking functionality to general null-checking APIs [v4]

2025-08-08 Thread Chen Liang
On Tue, 5 Aug 2025 10:14:07 GMT, Johan Sjölen wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update NPE per roger review > > src/java.base/share/classes/java/lang/NullPointerExce

Re: RFR: 8364588: Export the NPE backtracking functionality to general null-checking APIs [v4]

2025-08-08 Thread Chen Liang
On Tue, 5 Aug 2025 14:11:06 GMT, Roger Riggs wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update NPE per roger review > > src/java.base/share/classes/java/lang/NullPointerExce

Re: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v2]

2025-08-08 Thread Chen Liang
On Fri, 8 Aug 2025 13:38:31 GMT, Volkan Yazici wrote: >> `NoRepl`-suffixed `String` methods denote methods that do not replace >> invalid characters, but throw `CharacterCodingException` on encounter. This >> behavior cannot easily be derived from the method footprints, has been a >> source of

Re: RFR: 8364588: Export the NPE backtracking functionality to general null-checking APIs [v4]

2025-08-05 Thread Chen Liang
> Provide a general facility for our null check APIs like > Objects::requireNonNull or future Checks::nullCheck (void), converting the > existing infrastructure to start tracking from a given stack site (depth > offset) and a given stack slot (offset value). Chen Liang has upda

Re: RFR: 8364588: Export the NPE backtracking functionality to general null-checking APIs [v3]

2025-08-05 Thread Chen Liang
On Tue, 5 Aug 2025 14:53:03 GMT, Roger Riggs wrote: >> This is intended to be an API directly called by future null-check APIs, >> like `Objects.requireNonNull` or `Checks.nullCheck`. I initially had code >> for rNN but decided to withhold that for a future patch since it involves >> CSR and o

Re: RFR: 8364588: Export the NPE backtracking functionality to general null-checking APIs [v3]

2025-08-05 Thread Chen Liang
On Tue, 5 Aug 2025 14:24:37 GMT, Chen Liang wrote: >> I'd like to see the description for `slot` pushed into an enum, and make any >> negative number except `-1` explicitly forbidden. >> >> ```c++ >> enum class NPESlot : int { >> // docs here >&g

Re: RFR: 8364588: Export the NPE backtracking functionality to general null-checking APIs [v3]

2025-08-05 Thread Chen Liang
> Provide a general facility for our null check APIs like > Objects::requireNonNull or future Checks::nullCheck (void), converting the > existing infrastructure to start tracking from a given stack site (depth > offset) and a given stack slot (offset value). Chen Liang has upda

Re: RFR: 8364588: Export the NPE backtracking functionality to general null-checking APIs [v2]

2025-08-05 Thread Chen Liang
On Tue, 5 Aug 2025 10:07:38 GMT, Johan Sjölen wrote: >> src/hotspot/share/interpreter/bytecodeUtils.hpp line 40: >> >>> 38: // Slot can be nonnegative to indicate an explicit search for the >>> source of null >>> 39: // If slot is negative (default), also search for the action that >>> cau

Re: RFR: 8364588: Export the NPE backtracking functionality to general null-checking APIs [v2]

2025-08-05 Thread Chen Liang
On Tue, 5 Aug 2025 08:16:21 GMT, David Holmes wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Web review >> >> Co-authored-by: David Holmes >> <62092539+dholmes-

Re: RFR: 8364588: Export the NPE backtracking functionality to general null-checking APIs [v2]

2025-08-05 Thread Chen Liang
On Mon, 4 Aug 2025 14:58:07 GMT, Roger Riggs wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Web review >> >> Co-authored-by: David Holmes >> <62092539+dholmes-

Re: RFR: 8364588: Export the NPE backtracking functionality to general null-checking APIs [v2]

2025-08-05 Thread Chen Liang
> Provide a general facility for our null check APIs like > Objects::requireNonNull or future Checks::nullCheck (void), converting the > existing infrastructure to start tracking from a given stack site (depth > offset) and a given stack slot (offset value). Chen Liang has upda

Re: RFR: 8364588: Export the NPE backtracking functionality to general null-checking APIs

2025-08-03 Thread Chen Liang
On Fri, 1 Aug 2025 21:05:53 GMT, David Holmes wrote: >> Provide a general facility for our null check APIs like >> Objects::requireNonNull or future Checks::nullCheck (void), converting the >> existing infrastructure to start tracking from a given stack site (depth >> offset) and a given stack

Re: RFR: 8364588: Export the NPE backtracking functionality to general null-checking APIs

2025-08-03 Thread Chen Liang
On Fri, 1 Aug 2025 15:49:57 GMT, Chen Liang wrote: > Provide a general facility for our null check APIs like > Objects::requireNonNull or future Checks::nullCheck (void), converting the > existing infrastructure to start tracking from a given stack site (depth > offset) and a give

RFR: 8364588: Export the NPE backtracking functionality to general null-checking APIs

2025-08-03 Thread Chen Liang
Provide a general facility for our null check APIs like Objects::requireNonNull or future Checks::nullCheck (void), converting the existing infrastructure to start tracking from a given stack site (depth offset) and a given stack slot (offset value). - Commit messages: - Years -

Re: RFR: 8364187: Make getClassAccessFlagsRaw non-native [v5]

2025-07-31 Thread Chen Liang
On Wed, 30 Jul 2025 19:25:34 GMT, Coleen Phillimore wrote: >> This change removes the intrinsic for getClassAccessFlagsRaw for reflection >> and initializes an rawAccessFlags field in java.lang.Class instead, that >> Java code can non-natively access. >> Tested with tier1-4. > > Coleen Phillimo

Re: RFR: 8364187: Make getClassAccessFlagsRaw non-native [v2]

2025-07-29 Thread Chen Liang
On Tue, 29 Jul 2025 14:55:04 GMT, Roger Riggs wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Rename getRawClassAccessFlags to getClassFileAccessFlags and fix the test >> to reflect what the JVM does. > > src

Re: RFR: 8364187: Make getClassAccessFlagsRaw non-native [v2]

2025-07-29 Thread Chen Liang
On Tue, 29 Jul 2025 11:58:50 GMT, Coleen Phillimore wrote: >> src/java.base/share/classes/java/lang/Class.java line 1012: >> >>> 1010: private transient Object[] signers; // Read by VM, mutable >>> 1011: private final transient char modifiers; // Set by the VM >>> 1012: private fina

Re: RFR: 8364187: Make getClassAccessFlagsRaw non-native

2025-07-28 Thread Chen Liang
On Mon, 28 Jul 2025 20:14:15 GMT, Coleen Phillimore wrote: > This change removes the intrinsic for getClassAccessFlagsRaw for reflection > and initializes an rawAccessFlags field in java.lang.Class instead, that Java > code can non-natively access. > Tested with tier1-4. src/java.base/share/cl

Re: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods

2025-07-28 Thread Chen Liang
On Mon, 21 Jul 2025 12:10:51 GMT, Volkan Yazici wrote: > `NoRepl`-suffixed `String` methods denote methods that do not replace invalid > characters, but throw `CharacterCodingException` on encounter. This behavior > cannot easily be derived from the method footprints, has been a source of > co

Re: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods

2025-07-28 Thread Chen Liang
On Mon, 21 Jul 2025 14:00:37 GMT, Volkan Yazici wrote: > Would you mind elaborating on the rationale behind this preference, please? If you look at the history of `newStringNoRepl`, you will find it's originally added for JDK-8201276 in ca487166f4d18c162e8d8e4b2660d5d0381c5438. Since then, `ne

Re: Integrated: 8362957: Fix jdk/javadoc/doccheck/checks/jdkCheckHtml.java (docs) failure

2025-07-21 Thread Chen Liang
On Tue, 22 Jul 2025 02:41:35 GMT, Koushik Muthukrishnan Thirupattur wrote: > Test jdk/javadoc/doccheck/checks/jdkCheckHtml.java (docs) fails due to this > PR https://github.com/openjdk/jdk/pull/25399. > > Removing the block tags as it's no longer necessary. Thanks for this quick fix! ---

Re: RFR: 8357915: SecureRandom nextLong memory usage

2025-06-30 Thread Chen Liang
On Mon, 30 Jun 2025 13:18:58 GMT, Sean Mullan wrote: >> SecureRandom uses straightforward implementations inherited from Random but >> in the process does double the memory allocations necessary. >> The delegation to SecureRandom.engineNextBytes does not provide `int` or >> `long` values, the c

Re: RFR: 8357915: SecureRandom nextLong memory usage

2025-06-29 Thread Chen Liang
On Thu, 26 Jun 2025 18:00:21 GMT, Koushik Muthukrishnan Thirupattur wrote: > SecureRandom uses straightforward implementations inherited from Random but > in the process does double the memory allocations necessary. > The delegation to SecureRandom.engineNextBytes does not provide `int` or > `

Re: RFR: 8356632: Fix remaining {@link/@linkplain} tags with refer to private/protected types in java.base [v2]

2025-05-22 Thread Chen Liang
On Thu, 22 May 2025 15:18:43 GMT, Nizar Benalla wrote: >> Please review this patch to fix some `javadoc` bugs in `java.base`. >> Certain `@link` tags used to refer to private fields instead of public APIs. >> >> A couple of `@see` tags in the [serialization >> page](https://download.java.net/ja

Re: RFR: 8356632: Fix remaining {@link/@linkplain} tags with refer to private/protected types in java.base

2025-05-19 Thread Chen Liang
On Sat, 17 May 2025 19:42:39 GMT, Nizar Benalla wrote: > Please review this patch to fix some `javadoc` bugs in `java.base`. > Certain `@link` tags used to refer to private fields instead of public APIs. > > A couple of `@see` tags in the [serialization > page](https://download.java.net/java/ea

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

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

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

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

2025-05-08 Thread Chen Liang
On Wed, 7 May 2025 18:33:11 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 incrementally with one additional > commit since the last revision

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

2025-05-02 Thread Chen Liang
On Thu, 1 May 2025 14:50:31 GMT, Weijun Wang wrote: >> Finalize the KDF API. > > Weijun Wang has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains six commits: > > - merge > - add a positive debug log and update exception message > -

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods

2025-05-01 Thread Chen Liang
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. src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 315: > 313: * WARNING: The caller of

Re: RFR: 8297271: AccessFlag.maskToAccessFlags should be specific to class file version [v3]

2025-04-26 Thread Chen Liang
> Take the class file version to reject flags not yet defined, redefined, or > obsoleted. The non-cffv version can return the preview flags when the current > runtime is in preview. Chen Liang has updated the pull request incrementally with two additional commits since the last

Re: RFR: 8297271: AccessFlag.maskToAccessFlags should be specific to class file version [v2]

2025-04-26 Thread Chen Liang
> Take the class file version to reject flags not yet defined, redefined, or > obsoleted. The non-cffv version can return the preview flags when the current > runtime is in preview. Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The pull re

Re: RFR: 8349910: Implement HTTP/3 for the HTTP Client API

2025-04-22 Thread Chen Liang
On Tue, 22 Apr 2025 18:18:51 GMT, Daniel Fuchs wrote: >> src/java.net.http/share/classes/java/net/http/HttpRequest.java line 357: >> >>> 355: * @since TBD >>> 356: */ >>> 357: public default Builder setOption(HttpRequestOption >>> option, T value) { return this; } >>

Re: RFR: 8297271: AccessFlag.maskToAccessFlags should be specific to class file version

2025-04-19 Thread Chen Liang
On Fri, 18 Apr 2025 20:33:27 GMT, Chen Liang wrote: > Take the class file version to reject flags not yet defined, redefined, or > obsoleted. The non-cffv version can return the preview flags when the current > runtime is in preview. That is tracked in a separate bug linked as a dep

RFR: 8297271: AccessFlag.maskToAccessFlags should be specific to class file version

2025-04-18 Thread Chen Liang
Take the class file version to reject flags not yet defined, redefined, or obsoleted. The non-cffv version can return the preview flags when the current runtime is in preview. - Depends on: https://git.openjdk.org/jdk/pull/23095 Commit messages: - 8297271: AccessFlag.maskToAccessF

Re: RFR: 8349910: Implement HTTP/3 for the HTTP Client API

2025-04-18 Thread Chen Liang
On Fri, 18 Apr 2025 13:05:24 GMT, Daniel Fuchs wrote: > Hi, > > Please find here a PR for the implementation of JEP [JDK-8291976: HTTP/3 for > the HTTP Client API](https://bugs.openjdk.org/browse/JDK-8291976). > > The CSR can be viewed at [JDK-8350588: Implement HTTP/3 for the HTTP Client > A

Re: RFR: 8354053: Remove unused JavaIOFilePermissionAccess [v2]

2025-04-14 Thread Chen Liang
On Mon, 14 Apr 2025 16:14:03 GMT, Roger Riggs wrote: >> The JavaIOFilePermissionAccess interface is removed from SharedSecrets and >> its implementation (FilePermCompat.java) used by the test is moved to >> java.io FilePermission where cross package access is not needed. >> The test FilePermis

Re: RFR: 8354053: Remove unused JavaIOFilePermissionAccess

2025-04-13 Thread Chen Liang
On Fri, 11 Apr 2025 21:26:08 GMT, Roger Riggs wrote: > The JavaIOFilePermissionAccess interface is removed from SharedSecrets and > its implementation (FilePermCompat.java) used by the test is moved to java.io > FilePermission where cross package access is not needed. > The test FilePermission

Re: RFR: 8354061: Update copyright in NameFormat.java fix after JDK-8349890

2025-04-08 Thread Chen Liang
On Tue, 8 Apr 2025 17:26:47 GMT, Koushik Muthukrishnan Thirupattur wrote: > Update copyright in NameFormat.java fix after JDK-8353945. Missed to update > when the fix was integrated with JDK-8353945. Marked as reviewed by liach (Reviewer). On second look this is not necessary - this file was

Re: RFR: 8354061: Update copyright in NameFormat.java fix after JDK-8349890

2025-04-08 Thread Chen Liang
On Tue, 8 Apr 2025 19:44:30 GMT, Koushik Muthukrishnan Thirupattur wrote: > 8354061: Update copyright in NameFormat.java fix after JDK-8349890 This trivial bump looks right. - PR Comment: https://git.openjdk.org/jdk/pull/24523#issuecomment-2787718753

Re: RFR: 8353888: Implement Key Derivation Function API

2025-04-08 Thread Chen Liang
On Tue, 8 Apr 2025 21:00:41 GMT, Weijun Wang wrote: >> src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java line 82: >> >>> 80: MODULE_IMPORTS, >>> 81: @JEP(number=478, title="Key Derivation Function API", >>> status="Preview") >>> 82: KEY_DERIVATION, >> >

Re: RFR: 8353888: Implement Key Derivation Function API

2025-04-08 Thread Chen Liang
On Tue, 8 Apr 2025 18:14:53 GMT, Weijun Wang wrote: > Finalize the KDF API. Changes requested by liach (Reviewer). src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java line 82: > 80: MODULE_IMPORTS, > 81: @JEP(number=478, title="Key Derivation Function API", > st

Re: RFR: 8254622: Hide superclasses from conditionally exported packages

2025-04-04 Thread Chen Liang
On Fri, 4 Apr 2025 13:36:19 GMT, Hannes Wallnöfer wrote: > Please review an enhancement to treat classes and interfaces that are not > included and not unconditionally exported as hidden. This means they do not > show up in the generated documentation even if they are implemented or > extended

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview)

2025-03-15 Thread Chen Liang
On Tue, 11 Mar 2025 13:22:20 GMT, Luca Kellermann wrote: >> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > src/java.base/share/classes/java/lang/StableValue.java line 344: > >> 342: * {@linkplain java.lang.ref##reachability reachable} stable values >> will hold their set >> 343

Re: RFR: 8351970: Retire JavaLangAccess::exit

2025-03-14 Thread Chen Liang
On Fri, 14 Mar 2025 18:31:38 GMT, Roger Riggs wrote: > Cleanup the single use of JavaLangAccess.exit() it is no longer necessary; > System.exit() can be called directly. Marked as reviewed by liach (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/24066#pullrequestreview-2

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview)

2025-03-13 Thread Chen Liang
On Tue, 11 Mar 2025 18:08:47 GMT, Johannes Graham wrote: >> This allows reuse of `AbstractImmutableList` with list iterators, sub lists >> and more. > > Using the regular AbstractList as a base would also get you implementations > of those. `AbstractList` has non-final fields, which makes it n

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview)

2025-03-13 Thread Chen Liang
On Mon, 10 Mar 2025 18:11:23 GMT, Per Minborg wrote: > Implement JEP 502. > > The PR passes tier1-tier3 tests. FYI we don't usually drop the benchmark scores in the PR description; we usually leave them in comments to indicate which revision the bench results apply to. src/hotspot/share/ci/c

Re: RFR: 8347606: Optimize Java implementation of ML-DSA

2025-02-21 Thread Chen Liang
On Fri, 14 Feb 2025 16:43:32 GMT, Ben Perez wrote: > It turns out that initializing a multidimensional array with `int[][] a = new > int[rows][cols]` is slower than allocating each column in a loop. Since we do > a lot of large multidimensional array allocations in ML-DSA, the optimized > init

RFR: 8350118: Simplify the layout access VarHandle

2025-02-20 Thread Chen Liang
Simplify the layout access var handles to be direct in some common cases. Also made `VarHandle::isAccessModeSupported` report if an access mode is supported for a VH. Reduces the instructions to execute this code in a simple main by 47%: long[] arr = new long[8]; var ms = MemorySegment.ofArray(

Re: RFR: 8347606: Optimize Java implementation of ML-DSA

2025-02-16 Thread Chen Liang
On Fri, 14 Feb 2025 17:11:16 GMT, Bernd wrote: >> It turns out that initializing a multidimensional array with `int[][] a = >> new int[rows][cols]` is slower than allocating each column in a loop. Since >> we do a lot of large multidimensional array allocations in ML-DSA, the >> optimized init

Re: RFR: 8349943: [JMH] Use jvmArgs consistently

2025-02-13 Thread Chen Liang
On Thu, 13 Feb 2025 08:35:47 GMT, Nicole Xu wrote: > As is suggested in > [JDK-8342958](https://bugs.openjdk.org/browse/JDK-8342958), `jvmArgs` should > be used consistently in microbenchmarks to 'align with the intuition that > when you use jvmArgsAppend/-Prepend intent is to add to a set of

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,

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. >> >> Besi

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

[jdk24] Integrated: 8334733: Remove obsolete @enablePreview from tests after JDK-8334714

2024-12-09 Thread Chen Liang
On Fri, 6 Dec 2024 15:11:20 GMT, Chen Liang wrote: > Hi all, > > This pull request contains a backport of commit > [49664195](https://github.com/openjdk/jdk/commit/496641955041c5e48359e6256a4a61812653d900) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. >

Re: [jdk24] RFR: 8334733: Remove obsolete @enablePreview from tests after JDK-8334714

2024-12-09 Thread Chen Liang
On Fri, 6 Dec 2024 15:11:20 GMT, Chen Liang wrote: > Hi all, > > This pull request contains a backport of commit > [49664195](https://github.com/openjdk/jdk/commit/496641955041c5e48359e6256a4a61812653d900) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. >

[jdk24] RFR: 8334733: Remove obsolete @enablePreview from tests after JDK-8334714

2024-12-06 Thread Chen Liang
change is logically part of the Class-File API finalized in JDK 24. The commit being backported was authored by Chen Liang on 6 Dec 2024 and was reviewed by Mandy Chung and Adam Sotona. Thanks! - Commit messages: - Backport 496641955041c5e48359e6256a4a61812653d900 Changes: https

Re: RFR: 8334733: Remove obsolete @enablePreview from tests after JDK-8334714 [v2]

2024-12-06 Thread Chen Liang
On Thu, 5 Dec 2024 20:44:59 GMT, Chen Liang wrote: >> Remove the redundant `@enablePreview` and `--enable-preview` flags for >> enabling ClassFile API in the tests. The remainder of these flags in all >> tests seem to serve preview APIs (such as ScopedValue) or

Re: RFR: 8334733: Remove obsolete @enablePreview from tests after JDK-8334714 [v2]

2024-12-06 Thread Chen Liang
On Thu, 5 Dec 2024 20:44:59 GMT, Chen Liang wrote: >> Remove the redundant `@enablePreview` and `--enable-preview` flags for >> enabling ClassFile API in the tests. The remainder of these flags in all >> tests seem to serve preview APIs (such as ScopedValue) or

Integrated: 8334733: Remove obsolete @enablePreview from tests after JDK-8334714

2024-12-06 Thread Chen Liang
On Wed, 27 Nov 2024 23:10:15 GMT, Chen Liang wrote: > Remove the redundant `@enablePreview` and `--enable-preview` flags for > enabling ClassFile API in the tests. The remainder of these flags in all > tests seem to serve preview APIs (such as ScopedValue) or language features >

Re: RFR: 8334733: Remove obsolete @enablePreview from tests after JDK-8334714 [v2]

2024-12-05 Thread Chen Liang
On Thu, 5 Dec 2024 22:26:31 GMT, Chen Liang wrote: >> test/langtools/tools/javac/annotations/parameter/ParameterAnnotations.java >> line 643: >> >>> 641: >>> 642: Task.Result result = new JavacTask(tb) >>> 643: .processor

Re: RFR: 8334733: Remove obsolete @enablePreview from tests after JDK-8334714 [v2]

2024-12-05 Thread Chen Liang
On Thu, 5 Dec 2024 21:54:19 GMT, Mandy Chung wrote: >> Chen Liang has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains two commits: >> >> - Merge branch 'master' of https://github.com/openj

Re: RFR: 8334733: Remove obsolete @enablePreview from tests after JDK-8334714 [v2]

2024-12-05 Thread Chen Liang
; Testing: tier 1-5. Please inform me if any of these tests belong to higher > tiers. Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: - Merge branch 'master' of https://github.com/openjdk/jd

Re: RFR: 8345325: SM cleanup of GetPropertyAction in java.base [v2]

2024-12-02 Thread Chen Liang
On Mon, 2 Dec 2024 22:02:54 GMT, Sean Mullan wrote: > This includes a lot of changes already integrated in 8344397. Is that normal? I believe this is due to GitHub's diff rendering when it detects a merge conflict. It should go away once the conflict is fixed. - PR Comment: https

Re: RFR: 8334733: Remove obsolete @enablePreview from tests after JDK-83324714

2024-11-28 Thread Chen Liang
On Wed, 27 Nov 2024 23:10:15 GMT, Chen Liang wrote: > Remove the redundant `@enablePreview` and `--enable-preview` flags for > enabling ClassFile API in the tests. The remainder of these flags in all > tests seem to serve preview APIs (such as ScopedValue) or language features >

RFR: 8334733: Remove obsolete @enablePreview from tests after JDK-83324714

2024-11-27 Thread Chen Liang
Remove the redundant `@enablePreview` and `--enable-preview` flags for enabling ClassFile API in the tests. The remainder of these flags in all tests seem to serve preview APIs (such as ScopedValue) or language features (primitive pattern, module imports, etc.), or testing the enable preview fl

Re: RFR: 8344882: (bf) Temporary direct buffers should not count against the upper limit on direct buffer memory

2024-11-23 Thread Chen Liang
On Sat, 23 Nov 2024 01:09:30 GMT, Brian Burkhalter wrote: >> src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template line 77: >> >>> 75: static final boolean UNALIGNED = Bits.unaligned(); >>> 76: >>> 77: private @Stable boolean temporary; // defaults to false >> >> Any reaso

Re: RFR: 8343925: [BACKOUT] JDK-8342650 Move getChars to DecimalDigits

2024-11-11 Thread Chen Liang
On Mon, 11 Nov 2024 12:34:44 GMT, Shaojin Wen wrote: > 8343925 Feedback PR #21593 test/jdk/java/util/BitSet/HugeToString.java crash, > > I can't reproduce the problem on a MacBook M1 Max, but I agree that more > testing is needed, so let's roll it back first. CI results look good. --

Re: RFR: 8342040: Further improve entry lookup performance for multi-release JARs [v3]

2024-10-18 Thread Chen Liang
On Fri, 18 Oct 2024 13:59:32 GMT, Eirik Bjørsnøs wrote: >> Please review this PR which speeds up `JarFile::getEntry` lookup >> significantly for multi-release JAR files. >> >> The changes in this PR are motivated by the following insights: >> >> * `META-INF/versions/` is sparsely populated. >>

Re: RFR: 8338411: Implement JEP 486: Permanently Disable the Security Manager

2024-10-15 Thread Chen Liang
On Mon, 14 Oct 2024 13:52:24 GMT, Sean Mullan wrote: > This is the implementation of JEP 486: Permanently Disable the Security > Manager. See [JEP 486](https://openjdk.org/jeps/486) for more details. The > [CSR](https://bugs.openjdk.org/browse/JDK-8338412) describes in detail the > main change

Re: RFR: 8342040: Further improve entry lookup performance for multi-release JARs [v2]

2024-10-14 Thread Chen Liang
On Mon, 14 Oct 2024 20:57:45 GMT, Claes Redestad wrote: >> If we trust that versioned entries are rare, this should not matter much >> either way. But I pushed a commit which uses HashSet and Arrays::sort on >> freezing instead. WDYT? >> >> Given that most versioned entries will only have a si

Re: RFR: 8342040: Further improve entry lookup performance for multi-release JARs

2024-10-14 Thread Chen Liang
On Mon, 14 Oct 2024 11:01:21 GMT, Eirik Bjørsnøs wrote: > Please review this PR which speeds up `JarFile::getEntry` lookup > significantly for multi-release JAR files. > > The changes in this PR are motivated by the following insights: > > * `META-INF/versions/` is sparsely populated. > * Most

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-13 Thread Chen Liang
On Fri, 13 Sep 2024 02:47:18 GMT, Joe Darcy wrote: > Candidates for this refactoring were found programmatically; the program to > find candidates is in a comment on the bug. Looks good. It might be feasible to run a more complex tool that analyzes the tokenized javadoc AST from javac as later

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-13 Thread Chen Liang
On Fri, 13 Sep 2024 02:47:18 GMT, Joe Darcy wrote: > Candidates for this refactoring were found programmatically; the program to > find candidates is in a comment on the bug. This patch only captures one-line returns without extra sentences. Is it possible for us to handle slightly more comple

Re: RFR: 8336934: Clean up JavaLangReflectAccess

2024-07-25 Thread Chen Liang
On Thu, 25 Jul 2024 21:38:04 GMT, Roger Riggs wrote: >> Removed redundant APIs in `JavaLangReflectAccess` and added general warning >> against using `SharedSecrets`. > > src/java.base/share/classes/jdk/internal/access/JavaLangReflectAccess.java > line 53: > >> 51: // >> 52: >> 53: //

RFR: 8336934: Clean up JavaLangReflectAccess

2024-07-22 Thread Chen Liang
Removed redundant APIs in `JavaLangReflectAccess` and added general warning against using `SharedSecrets`. - Commit messages: - 8336934: Clean up JavaLangReflectAccess Changes: https://git.openjdk.org/jdk/pull/20290/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20290&ran

Re: RFR: 8336039: Doccheck: HTML warnings, broken links and missing files in java.base documentation [v5]

2024-07-21 Thread Chen Liang
On Sun, 21 Jul 2024 21:15:03 GMT, Nizar Benalla wrote: >> Can I get a review for this change that fixes some broken links in javadoc >> comments? The new docs are hosted >> [here](https://cr.openjdk.org/~nbenalla/GeneratedDocs/8336039-warnings-links/). >> >> It's mostly fixing some relative li

Re: RFR: 8336039: Doccheck: HTML warnings, broken links and missing files in java.base documentation [v4]

2024-07-19 Thread Chen Liang
;> --- >>> >> href="../../../java/lang/ref/package-summary.html#reachability">unreachable. >> 1899c1899 >> < > href="../../../java/lang/ref/package.html#reachability">unreachable. >> --- >>> >> href="../../../java/lang/ref/package-summary.html#reachability">unreachable. >> diff -r docs-master/api/java.base/java/lang/foreign/SymbolLookup.html >> docs/api/java.base/java/lang/foreign/SymbolLookup.html >> 395c395 >> ... > > Nizar Benalla has updated the pull request incrementally with one additional > commit since the last revision: > > Update src/java.base/share/classes/java/lang/foreign/MemorySegment.java > > forgot this one > > Co-authored-by: Chen Liang Lgtm - Marked as reviewed by liach (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/20251#pullrequestreview-2188544805

Re: RFR: 8336039: Doccheck: HTML warnings, broken links and missing files in java.base documentation [v3]

2024-07-19 Thread Chen Liang
On Fri, 19 Jul 2024 14:05:07 GMT, Nizar Benalla wrote: >> Can I get a review for this change that fixes some broken links in javadoc >> comments? The new docs are hosted >> [here](https://cr.openjdk.org/~nbenalla/GeneratedDocs/8336039-warnings-links/). >> >> It's mostly fixing some relative li

Re: RFR: 8336039: Doccheck: HTML warnings, broken links and missing files in java.base documentation [v2]

2024-07-19 Thread Chen Liang
On Fri, 19 Jul 2024 13:08:06 GMT, Nizar Benalla wrote: >> Can I get a review for this change that fixes some broken links in javadoc >> comments? The new docs are hosted >> [here](https://cr.openjdk.org/~nbenalla/GeneratedDocs/8336039-warnings-links/). >> >> It's mostly fixing some relative li

Re: RFR: 8334772: Change Class::protectionDomain and signers to explicit fields

2024-07-17 Thread Chen Liang
On Wed, 17 Jul 2024 17:47:11 GMT, Chen Liang wrote: > Please review this change that moves `Class.protectionDomain` and `signers` > to explicit fields. > > Related native methods in `Class` and `AccessController::getProtectionDomain` > are converted to pure Java. These field

  1   2   >