jai-imageio / jai-imageio-jpeg2000

JPEG2000 support for Java Advanced Imaging Image I/O Tools API
Other
74 stars 56 forks source link

Resetting the reader throws a NullPointerException #47

Open cdokolas opened 5 months ago

cdokolas commented 5 months ago

If a client calls the reader's reset() method, the following exception is thrown

NullPointerException: Cannot invoke "javax.imageio.stream.ImageInputStream.getStreamPosition()" because "this.iis" is null

It is apparent that JKImageReader.setInput() ignores the possibility that the input parameter may be null, as it will be when called by ImageReader.reset() (the base class).