Re: Unexpected EOFException in ImageReaderSpi.canDecodeInput

2022-05-22 Thread Martin Desruisseaux
Le 20/05/2022 à 20:00, Philip Race a écrit : OK .. we can probably take the proposed change, but there's no guarantee it won't still happen with 3rd party external plugins. I've filed the bug for you : https://bugs.openjdk.java.net/browse/JDK-8287102 Thanks! I have rebased the pull request

Re: Unexpected EOFException in ImageReaderSpi.canDecodeInput

2022-05-20 Thread Philip Race
OK .. we can probably take the proposed change, but there's no guarantee it won't still happen with 3rd party external plugins. I've filed the bug for you : https://bugs.openjdk.java.net/browse/JDK-8287102 -phil. On 5/18/22 2:47 AM, Martin Desruisseaux wrote: Hello Philip Le 17/05/2022 à 2

Re: Unexpected EOFException in ImageReaderSpi.canDecodeInput

2022-05-18 Thread Martin Desruisseaux
Hello Philip Le 17/05/2022 à 20:36, Philip Race a écrit : Why is it unexpected ? The purpose of ImageReaderSpi.canDecodeInput(Object) is to tell if the source object seems to be supported by the reader. If the file is too small, it is not supported by the reader. So a return value of false i

RE: Unexpected EOFException in ImageReaderSpi.canDecodeInput

2022-05-18 Thread Volodin, Vladislav
[email protected] Subject: Re: Unexpected EOFException in ImageReaderSpi.canDecodeInput Why is it unexpected ? The method declares that it throws IOException .. which if thrown clearly means the stream can't be de-coded. Perhaps your point is that this then prevents control

Re: Unexpected EOFException in ImageReaderSpi.canDecodeInput

2022-05-17 Thread Philip Race
Why is it unexpected ? The method declares that it throws IOException .. which if thrown clearly means the stream can't be de-coded. Perhaps your point is that this then prevents control reaching the reset, so that the next plugin doesn't get its turn to also reject the truncated file. I supp

Unexpected EOFException in ImageReaderSpi.canDecodeInput

2022-05-17 Thread Martin Desruisseaux
Hello I prepared a pull request at [1] for fixing an unexpected EOFException thrown by ImageReaderSpi.canDecodeInput(Object) in JDK implementations for BMP, WBMP, GIF, PNG and TIFF formats (JPEG is not impacted). This exception occurs when the stream has less than 8 bytes. For example, it occ