[OpenJDK 2D-Dev] RFR 8149016: Misleading IllegalArgumentException message when a type that is neither LONG nor IFD pointer is supplied to TIFFField constructor

Phil Race philip.race at oracle.com
Fri Jul 22 17:57:57 UTC 2016


two cases of missing spaces between if and ( ..

  else if(type < TIFFTag.MIN_DATATYPE || type > TIFFTag.MAX_DATATYPE) {
  722             throw new IllegalArgumentException("Unknown data type "+type);
  723         } else if(!tag.isDataTypeOK(type)) {


Fix before pushing. Otherwise fine.

-phil.

On 07/22/2016 10:50 AM, Brian Burkhalter wrote:
> Please review at your convenience.
>
> Issue:https://bugs.openjdk.java.net/browse/JDK-8149016
> Patch:http://cr.openjdk.java.net/~bpb/8149016/webrev.00/ 
> <http://cr.openjdk.java.net/%7Ebpb/8149016/webrev.00/>
>
> The problem is that the constructor
>
> TIFFField(TIFFTag tag, int type, long offset, TIFFDirectory dir) {}
>
> begins with an invocation of the constructor
>
> TIFFField(TIFFTag tag, int type, int count, Object data) {}
>
> which performs some checks not documented for the former constructor 
> nor for that matter necessary. The fix is to change the former 
> constructor to perform directly the actions for which it was 
> previously relying on the latter constructor.
>
> As an aside, some " ” HTML entities were removed from “{@code}” 
> tags wherein they are not interpreted during javadoc generation.
>
> Thanks,
>
> Brian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20160722/999de793/attachment.html>


More information about the 2d-dev mailing list