RFR: 8259867: Move encoding checks into ZipCoder

Lance Andersen lancea at openjdk.java.net
Tue Jan 19 12:22:52 UTC 2021

On Sat, 16 Jan 2021 17:49:38 GMT, eirbjo <github.com+300291+eirbjo at openjdk.org> wrote:

> ZipFile.Source.initCEN verifies that entry names are encoding into bytes valid in the entry's encoding. It does so by calling encoding-specific checking methods, so it also needs to determine which check method to call for each entry.
> By moving the encoding-variant checks into ZipCoder, initCEN can instead simply call ZipCoder.checkEncoding. This makes the code easier to follow and also removes a duplication of flag checking logic found in zipCoderForPos.

The change looks good to me as well


Marked as reviewed by lancea (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/2110

More information about the core-libs-dev mailing list