On Mon, 28 Jul 2025 22:34:08 GMT, Roger Riggs <rri...@openjdk.org> wrote:
>> Volkan Yazici has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Simplify added null checks >> - Avoid code duplication by sprinkling some generics magic > > src/java.base/share/classes/java/lang/String.java line 571: > >> 569: } >> 570: >> 571: private static String utf8ThrowingIae(byte[] bytes, int offset, int >> length) { > > Iae should be all-caps. `IAE` This change has disappeared – the remark is not applicable anymore. > src/java.base/share/classes/java/lang/String.java line 579: > >> 577: } >> 578: >> 579: private static IllegalArgumentException >> cce2iae(CharacterCodingException cce) { > > More readable would be "cceToIAE" > But this whole construct is suspect because of the contortions needed. This change has disappeared – the remark is not applicable anymore. > src/java.base/share/classes/java/lang/String.java line 1289: > >> 1287: } >> 1288: >> 1289: private static void throwMalformed(byte[] val) throws >> MalformedInputException { > > It is unnecessary to add add @throws of RuntimeExceptions, conventionally > they are omitted as clutter and any RuntimeException can be thrown at any > time. `MalformedInputException` is a checked exception, I think there has been some sort of confusion here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2269623466 PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2269623313 PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2269621563