On Thu, 21 Aug 2025 13:37:20 GMT, Roger Riggs <rri...@openjdk.org> 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' into jlaNoRepl >> - Remove redundant type parameters >> - Simplify added null checks >> - Avoid code duplication by sprinkling some generics magic >> - Group `String` methods by `doReplace` argument >> - Merge remote-tracking branch 'upstream/master' into jlaNoRepl >> - Replace `requireNonNull` with implicit null checks >> - Merge remote-tracking branch 'upstream/master' into jlaNoRepl >> - ... and 3 more: https://git.openjdk.org/jdk/compare/a7c0f4b8...7af0f351 > > src/java.base/share/classes/java/lang/String.java line 890: > >> 888: >> 889: private static <E extends Exception> byte[] encodeWithEncoder( >> 890: Charset cs, byte coder, byte[] val, Class<E> >> characterCodingException) > > The argument name `characterCodingException` reads more like an exception > instance than an exception Class. > In this use, it is referring to a class, an instance of which will be thrown. > It could be just `exceptionClass`. Renamed in 09b8f508cfa. > src/java.base/share/classes/java/lang/String.java line 964: > >> 962: /** >> 963: * {@return the sequence of bytes obtained by encoding the given >> string in >> 964: * the specified {@linkplain java.nio.charset.Charset charset}} > > Omit the link, for this private use, just say `Charset`. See my earlier comment – fixed in 01d4f878b4d. > src/java.base/share/classes/java/lang/String.java line 1169: > >> 1167: >> 1168: private static <E extends Exception> int decodeUTF8_UTF16( >> 1169: byte[] src, int sp, int sl, byte[] dst, int dp, Class <E> >> malformedInputException) > > Ditto comment about argument `malformedInputException` as an instance vs a > class of exception, an instance of which will be thrown. Renamed in 09b8f508cfa. > src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 349: > >> 347: /** >> 348: * {@return the sequence of bytes obtained by encoding the given >> string in >> 349: * the specified {@linkplain java.nio.charset.Charset charset}} > > (ok, not public javadoc) > But Links in the Title line of a method are discouraged since they end up in > multiple places. Pushed 01d4f878b4d correcting it in certain `JavaLangAccess` and `String` parts where this PR touches – I've left other occurrences as is. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2293730565 PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2293730280 PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2293730980 PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2293727839