[OpenJDK 2D-Dev]  RFR JDK-8152561: Is it allowed to have zero value for count in TIFFField.createArrayForType() for the rationals
prasanta.sadhukhan at oracle.com
Wed Jan 18 09:11:47 UTC 2017
Looks good to me.
On 1/18/2017 2:33 PM, Jayathirth D V wrote:
> Hi Prasanta,
> Thanks for your review.
> Now I am forcing all testcases to run even if any initial testcase fails.
> I have divided all 4 test cases into different functions and I am
> throwing proper RuntimeException based on what test case is failing.
> Please find updated webrev for review :
> *From:*Prasanta Sadhukhan
> *Sent:* Tuesday, January 17, 2017 12:48 PM
> *To:* Jayathirth D V; Philip Race; Brian Burkhalter; 2d-dev
> *Subject:* Re: [OpenJDK 2D-Dev]  RFR JDK-8152561: Is it allowed to
> have zero value for count in TIFFField.createArrayForType() for the
> Looks good to me.
> Only thing is that in the test, if one test fails it will not proceed
> to the next test. I think we should test all combinations and fail at
> last with the informations of all failed combinations.
> On 1/11/2017 11:19 PM, Jayathirth D V wrote:
> Hello All,
> Please review the following fix in JDK9:
> Bug : https://bugs.openjdk.java.net/browse/JDK-8152561
> Webrev : http://cr.openjdk.java.net/~jdv/8152561/webrev.00/
> Issue : There is difference in how we interpret “count” variable
> passed to TIFFField.createArrayForType(int dataType, int count)
> and constructor TIFFField(TIFFTag tag, int type, int count, Object
> Root cause : There are certain limitation on what the “count”
> value should be based on dataType of TIFFTag. We check these
> conditions in TIFFField(TIFFTag tag, int type, int count, Object
> data) but we don’t verify all the conditions in
> TIFFField.createArrayForType(int dataType, int count).
> Solution : Verify all the required conditions that has to be
> applied on “count” variable based on datatype of TIFFTag in
> TIFFField.createArrayForType(int dataType, int count). Also I have
> made specification changes for TIFFField(TIFFTag tag, int type,
> int count) which will elaborate on what exceptions will be thrown
> if we don’t follow same “count” and “dataType” relationship.
> Note : Because of tighter conditions in
> TIFFField.createArrayForType(int dataType, int count) under the
> proposed fix 2 JCK tests are failing.
> : /CreateArrayForType_ValidScenario/_
> This is failing because they are passing count values of 0 for
> TIFFTag.TIFF_RATIONAL & TIFFTag.TIFF_SRATIONAL which will throw
> IAE. Also it will throw IAE if we pass count value 0 or 2 for
> : /Constructor02_TagIsNull_ThrowNPE/_
> I think this scenario expects constructor to throw NPE when “tag”
> is null. But before it checks for “tag” value in TIFFField(TIFFTag
> tag, int type, int count, Object data) we call
> TIFFField.createArrayForType(int dataType, int count) to create
> needed data. So like mentioned in previous JCK test which is
> failing, we will be throwing IAE in all cases where as test
> expects us to throw NPE.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the 2d-dev