On Thu, 25 Nov 2021 03:56:32 GMT, Sergey Bylokhov <[email protected]> wrote:
>> If we use a custom stream and specify limit on stream.read() length,
>> WBMPImageReader.read() doesnt verify whether we are decoded complete data or
>> not. We can check the length of data decoded and rerun the stream.read() or
>> use readFully(). In case of other decoders like BMP we are using
>> readFully(), so i have updated WBMPImageReader.read() to use readFully().
>
> test/jdk/javax/imageio/plugins/wbmp/WBMPStreamTruncateTest.java line 61:
>
>> 59: File imageFile = File.
>> 60: createTempFile("test", ".wbmp", new File(filePath));
>> 61: imageFile.deleteOnExit();
>
> In one another review I saw the deleteOnExit() usage, I remember that in case
> of full testrun via makefile, such files were not deleted, can you please
> confirm that it is work fine? probably that it was fixed already. Note that
> the full test run uses custom tmp folder inside the result dir.
@mrserb I ran the test using "make test" and i dont see any .wbmp file after
test run in results directory.
Also i verified that it doesn't leave any image in test directory of CI
machines.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6518