[OpenJDK 2D-Dev] [9] RFR JDK-8149562: TIFFField#createFromMetadataNode javadoc should provide information about sibling/child nodes that should be part of parameter node

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Tue Aug 23 18:45:07 UTC 2016


On 23.08.16 21:41, Sergey Bylokhov wrote:
> Is it possible, just for the record, to provide a comment why NPE was
> changed to IAE.
I meant the first check node==null.

actually this code looks a little bit strange:
>  493         } catch (NullPointerException npe) {
>  494             throw new IllegalArgumentException(npe);
>  495         }
>
> On 23.08.16 21:38, Brian Burkhalter wrote:
>> OK I have updated the test accordingly:
>>
>> http://cr.openjdk.java.net/~bpb/8149562/webrev.02/
>>
>> 458 try {
>> 459 TIFFField.createFromMetadataNode(ts, null);
>> 460 } catch (IllegalArgumentException e) {
>> 461 ok = true;
>> 462 }
>>
>> Thanks,
>>
>> Brian
>>
>> On Aug 23, 2016, at 11:34 AM, Phil Race <philip.race at oracle.com
>> <mailto:philip.race at oracle.com>> wrote:
>>
>>> Whilst there is no harm in the cause of the IAE being NPE, unless it
>>> is precisely called out in the spec - which it is not - all it says is
>>> "Note that a cause might be set on such an exception."
>>> which is non-specific,  I don't think the test should check for it.
>>
>
>


-- 
Best regards, Sergey.



More information about the 2d-dev mailing list