On Mon, 13 Apr 2026 18:54:07 GMT, Naoto Sato <[email protected]> wrote:
>> Eirik Bjørsnøs has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Make fields 'UTF8_INSTANCE' and 'cs' fields final > > src/java.base/share/classes/java/util/zip/ZipCoder.java line 179: > >> 177: .onMalformedInput(CodingErrorAction.REPORT) >> 178: >> .onUnmappableCharacter(CodingErrorAction.REPORT); >> 179: } > > We could use LazyConstant here (encoder as well), which can make the field > final We could, but I'd prefer this PR to focus on the hierarchy switch, avoiding general improvements unless they are trivial, obvious and add little review noise. I have a follow-up PR planned which simplifies / aligns some ZipCoder method implementations, this improvement could fit better there. Okay with you? > src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipCoder.java line 65: > >> 63: } >> 64: >> 65: private static final ZipCoder utf8 = new ZipCoder(); > > "utf8" -> "UTF8", which is consistent with java.base's Trivial and good, fixed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30640#discussion_r3078588212 PR Review Comment: https://git.openjdk.org/jdk/pull/30640#discussion_r3078589591
