THausherr edited a comment on pull request #107:
URL: https://github.com/apache/pdfbox/pull/107#issuecomment-804595994
Ouch. Thanks for finding this. Proposed improved code:
```
protected static ImageReader findImageReader(String formatName, String
errorCause) throws MissingImageReaderException
{
Iterator<ImageReader> readers =
ImageIO.getImageReadersByFormatName(formatName);
ImageReader reader;
while (readers.hasNext())
{
reader = readers.next();
if (reader != null && reader.canReadRaster())
{
return reader;
}
}
throw new MissingImageReaderException("Cannot read " + formatName +
" image: " + errorCause);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]