On Tue, 11 Mar 2025 15:24:42 GMT, Eirik Bjørsnøs <eir...@openjdk.org> wrote:
>> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> tiny typo fix in newly introduced documentation > > src/java.base/share/classes/java/util/zip/ZipFile.java line 86: > >> 84: private final String fileName; // name of the file >> 85: // the ZipCoder instance is derived from the Charset passed to the >> ZipFile constructor >> 86: // and will be used for decoding the non-UTF-8 entry names and the >> ZIP file comment. > > Maybe a personal preference, and perhaps I'm too intimitely familiar with > this code, but I feel this field comment is overly verbose. > > Not sure how useful it is to document what the instance is derived from, it's > not something we do for other fields and maintainers can always inspect the > constructor to find out how it's being assigned. > > The "non-UTF-8" part is correct, but I feel this information belongs closer > to where that decision is made, not here. > > The ZipCoder is used when decoding entry comments as well, so the current > comment is not fully correct. > > Perhaps something like "Used for decoding binary encoded names and comments > into strings" would do? I agree, it just needs to say the ZipCoder for entry names and comments when not using UTF-8. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23986#discussion_r2008822074