RFR: 8252739: Deflater.setDictionary(byte[], int off, int len) ignores the starting offset for the dictionary [v4]

Alan Bateman alanb at openjdk.java.net
Tue Sep 22 07:31:30 UTC 2020


On Mon, 21 Sep 2020 19:06:44 GMT, Lance Andersen <lancea at openjdk.org> wrote:

>> Hi all,
>> 
>> Please review the fix  for JDK-8252739 which addresses an issue introduced by
>> https://bugs.openjdk.java.net/browse/JDK-8225189, where Deflater.c ignored the offset specified by
>> Deflater.setDictionary.  Mach5 jdk-tier1, jdk-tier2, jdk-tier3 runs cleanly as well as the java/util/zip and
>> java/util/jar JCK tests.
>
> Lance Andersen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   More  updates to testByteBufferDirect in DeflaterDictionaryTests.java

Given that the offset handling is buggy then I think the test should at least cover the cases where the offset is 0 or
out of bounds. No problem separating out further test coverage for the other setDictionary methods into a separate
issue.

-------------

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


More information about the core-libs-dev mailing list