[OpenJDK 2D-Dev] [11] RFR JDK-8191073: JpegImageReader throws IndexOutOfBoundsException when trying to read image data from tables-only image
Brian Burkhalter
brian.burkhalter at oracle.com
Fri Jan 5 23:13:12 UTC 2018
Hi Jay,
On Jan 3, 2018, at 11:06 PM, Jayathirth D V <jayathirth.d.v at oracle.com> wrote:
> Bug : https://bugs.openjdk.java.net/browse/JDK-8191073
> Webrev : http://cr.openjdk.java.net/~jdv/8191073/webrev.00/
General comment: I think it’s better to use “//“ than “/*…*/“ for method-internal comments:
JpegImageReader L373-375, 392-397, 516-519
JpegTablesOnlyReadTest L61-64
As to the fix, is the new tablesOnlyStream boolean really necessary? For example at line 520 in the new version could not one do this
if (imagePositions.isEmpty()) { // line 520 of new version
throw new IIOException("No image data present to read");
}
instead? I don’t see where the value of this variable is used anywhere else.
Thanks,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20180105/ba54f674/attachment.html>
More information about the 2d-dev
mailing list