RFR: 8287102: ImageReaderSpi.canDecodeInput() for standard plugins should return false if a stream is too short [v2]

Phil Race prr at openjdk.java.net
Fri Jun 3 21:17:19 UTC 2022


On Thu, 26 May 2022 11:43:07 GMT, Martin Desruisseaux <duke at openjdk.java.net> wrote:

> As a minor note, in `com.sun.imageio.plugins.common.ReaderUtil` class the `readMultiByteInteger(ImageInputStream)` method is used only by `WBMPImageReader`. Would it be worth to move (in a separated pull request) that method in `WBMPImageReader` for saving a few bytes in the common case where WBMP format is not used?

I'd be inclined to leave it as a common utility .. someone  else might need it in the future.

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

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



More information about the client-libs-dev mailing list