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

2023-02-15 Thread Eirik Bjorsnos
On Wed, 15 Feb 2023 11:32:32 GMT, Lance Andersen wrote: >> The habit of opening resources in a TwR is hard to break, but I guess it's >> ok for a test like this. I have inlined the method and removed the TwR. > >> The habit of opening resources in a TwR is hard to break, but I guess it's >> ok

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

2023-02-15 Thread Lance Andersen
On Wed, 15 Feb 2023 09:55:04 GMT, Eirik Bjorsnos wrote: > The habit of opening resources in a TwR is hard to break, but I guess it's ok > for a test like this. I have inlined the method and removed the TwR. Agree, thanks for addressing the suggestion as it makes the test cleaner given expects/

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

2023-02-15 Thread Eirik Bjorsnos
On Tue, 14 Feb 2023 23:12:38 GMT, Lance Andersen wrote: >> Eirik Bjorsnos has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Prefer expectThrows with asserts over test annotation regex > > test/jdk/java/util/zip/ZipFile/InvalidBytesInEntryN

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

2023-02-14 Thread Lance Andersen
On Tue, 14 Feb 2023 11:49:23 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 >> Strin

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

2023-02-14 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