[OpenJDK 2D-Dev] [9] RFR JDK-8160327: Support for thumbnails present in APP1 marker for JPEG
Brian Burkhalter
brian.burkhalter at oracle.com
Thu Sep 1 20:15:25 UTC 2016
Did not hit “reply to all” … .
Begin forwarded message:
> From: Brian Burkhalter <brian.burkhalter at oracle.com>
> Subject: Re: [OpenJDK 2D-Dev] [9] RFR JDK-8160327: Support for thumbnails present in APP1 marker for JPEG
> Date: August 31, 2016 at 5:02:42 PM PDT
> To: Philip Race <philip.race at oracle.com>
>
> On Aug 31, 2016, at 4:03 PM, Philip Race <philip.race at oracle.com> wrote:
>
>> imageCreationTime = LocalDateTime.parse(dateTime, formatter);
>>
>> Seems like it may throw DateTimeParseException - a subtype of RuntimeException
>> https://docs.oracle.com/javase/8/docs/api/java/time/LocalDateTime.html#parse-java.lang.CharSequence-java.time.format.DateTimeFormatter-
>>
>> I think in the case of such malformed data we want to silently swallow it
>> rather than propagate to the caller.
>
> I concur. The date and time would be null in that case.
>
>> 164 // XXX Might want to set JPEGImageReader$ThumbnailReadListener
>> 165 // to track thumbnail reading progress.
>>
>> XXX ?
>
> Section 10.5.4 of [1].
>
>> int getThumbnailWidth(int index) {
>> 187 if (getNumThumbnails() != 1 || index != 0) {
>> 188 throw new IndexOutOfBoundsException();
>> 189 }
>> 190 return thumbnailWidth;
>> 191 }
>>
>> Would it not be more informative to include "index" in the exception ?
>
> I agree.
>
>> Other than that looks fine.
>
>
> I have a couple of other changes I want to make and I will fold those in and repost webrevs between revisions and of the latest version against the repo tip.
>
> Thanks,
>
> Brian
>
> [1] http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-137265.html#554
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20160901/20967c0e/attachment.html>
More information about the 2d-dev
mailing list