Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v9]

2023-02-14 Thread Eirik Bjorsnos
On Tue, 14 Feb 2023 11:21:36 GMT, Lance Andersen wrote: >> The message is already validated using `expectedExceptionsMessageRegExp` in >> the `@Test` annotation. >> >> Would you prefer if I use expectThrows instead, or perhaps inline the >> `BAD_ENTRY_NAME_OR_COMMENT` constant as a literal? >

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v9]

2023-02-14 Thread Lance Andersen
On Tue, 14 Feb 2023 08:47:15 GMT, Eirik Bjorsnos wrote: >> test/jdk/java/util/zip/ZipFile/InvalidBytesInEntryNameOrComment.java line 90: >> >>> 88: expectedExceptionsMessageRegExp = BAD_ENTRY_NAME_OR_COMMENT) >>> 89: public void shouldRejectInvalidName() throws IOException { >>>

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v9]

2023-02-14 Thread Eirik Bjorsnos
On Mon, 13 Feb 2023 20:20:22 GMT, Lance Andersen wrote: >> Eirik Bjorsnos has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Revert accidental removal of UTF8ZipCoder.compare > > test/jdk/java/util/zip/ZipFile/InvalidBytesInEntryNameOrComme

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v9]

2023-02-14 Thread Eirik Bjorsnos
On Mon, 13 Feb 2023 20:00:51 GMT, Lance Andersen wrote: >> Eirik Bjorsnos has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Revert accidental removal of UTF8ZipCoder.compare > > src/java.base/share/classes/java/util/zip/ZipCoder.java line

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v9]

2023-02-13 Thread Lance Andersen
On Thu, 9 Feb 2023 12:07:04 GMT, Eirik Bjorsnos wrote: >> After finding a hash match, getEntryPos needs to compare the lookup name up >> to the encoded entry name in the CEN. This comparison is done by decoding >> the entry name into a String. The names can then be compared using the >> String

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v9]

2023-02-09 Thread Eirik Bjorsnos
> After finding a hash match, getEntryPos needs to compare the lookup name up > to the encoded entry name in the CEN. This comparison is done by decoding the > entry name into a String. The names can then be compared using the String > API. This decoding step adds a significat cost to this metho