RFR: 8252739: Deflater.setDictionary(byte[], int off, int len) ignores the starting offset for the dictionary [v3]
Uwe Schindler
github.com+1005388+uschindler at openjdk.java.net
Sun Sep 20 22:22:48 UTC 2020
On Sun, 20 Sep 2020 20:38:59 GMT, Lance Andersen <lancea at openjdk.org> wrote:
>> The tests with byte buffers (direct and heap) are not using offsets (arrayOffset=0). The direct buffer test uses just a
>> series of 0-bytes, so incorrect offsets won't change result. There should be real data copied into the direct buffer.
>
> Minor updates have been made to the tests
Ok much better for the heap buffers. Many thanks.
The direct buffers have now contents, but I think it should copy the whole heap array into the byte buffer. After that
set position and limit and then call slice(). After that you have a slice of the original direct buffer with offset.
-------------
PR: https://git.openjdk.java.net/jdk/pull/269
More information about the core-libs-dev
mailing list