TIFFField#getAsNativeNode spec about native node name "TIFFIFD" X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] Content-Type: multipart/alternative; boundary="__1462895146222116367abhmp0007.oracle.com"
--__1462895146222116367abhmp0007.oracle.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Hi, =20 Please find my observations below on this.=20 =20 Even when hasDirectory is true for the TIFFField , the node returned by TIF= FField#getAsNativeNode does not return "TIFFIFD" value when the method getN= odeName is invoked on it.=20 Please refer to old attached test case here : https://bugs.openjdk.java.net= /browse/JDK-8149815 The TIFFField constructed with a TIFFDirectory argument returns "true" when= hasDirectory method is invoked on that instance.=20 The root cause might be originating from the internal api "com.sun.imageio= .plugins.tiff.TIFFFieldNode#getNodeName." This method is using the check=20 return f.getData() instanceof TIFFDirectory ? "TIFFIFD" : "TIFFField which= is not quite true because f.getData cannot be an instance of TIFFDirector= y as per the current API.=20 I believe the fix for this should be "return f.hasDirectory && f.getTag().i= sIFDPointer ? "TIFFIFD" :"TIFFField"" =20 Thank you, Bharath N =20 =20 --__1462895146222116367abhmp0007.oracle.com Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr= osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:= //www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV=3D"Content-Type" CONTENT= =3D"text/html; charset=3Dus-ascii"><meta name=3DGenerator content=3D"Micros= oft Word 12 (filtered medium)"><style><!-- /* Font Definitions */ @font-face =09{font-family:"Cambria Math"; =09panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face =09{font-family:Calibri; =09panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal =09{margin:0in; =09margin-bottom:.0001pt; =09font-size:11.0pt; =09font-family:"Calibri","sans-serif";} a:link, span.MsoHyperlink =09{mso-style-priority:99; =09color:blue; =09text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed =09{mso-style-priority:99; =09color:purple; =09text-decoration:underline;} span.EmailStyle17 =09{mso-style-type:personal-compose; =09font-family:"Calibri","sans-serif"; =09color:windowtext;} .MsoChpDefault =09{mso-style-type:export-only;} @page WordSection1 =09{size:8.5in 11.0in; =09margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 =09{page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue vli= nk=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal>Hi,<o:p></o:p></= p><p class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>Please fin= d my observations below on this. <o:p></o:p></p><p class=3DMsoNormal><o:p>&= nbsp;</o:p></p><p class=3DMsoNormal>Even when <i>hasDirectory</i> is true f= or the TIFFField , the node returned by <i>TIFFField#getAsNativeNode</i> do= es not return "TIFFIFD" value when the method getNodeName is invo= ked on it. <br>Please refer to old attached test case here : <a href=3D"htt= ps://bugs.openjdk.java.net/browse/JDK-8149815">https://bugs.openjdk.java.ne= t/browse/JDK-8149815</a><o:p></o:p></p><p class=3DMsoNormal><br>The TIFFFie= ld constructed with a TIFFDirectory argument returns "true" when = hasDirectory method is invoked on that instance. <br><br>The root cause mig= ht be originating from the internal api <i>“com.sun.imageio.plu= gins.tiff.TIFFFieldNode#getNodeName.“</i><br>This method is using the= check <br><b>return f.getData() instanceof TIFFDirectory ? "TIFFIFD&q= uot; : "TIFFField</b><i> </i> which is not quite true because f.g= etData cannot be an instance of TIFFDirectory as per the current API.= <br><br>I believe the fix for this should be <b>"return f.hasDirector= y && f.getTag().isIFDPointer ? "TIFFIFD" :"TIFFField= ""</b><o:p></o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p= class=3DMsoNormal>Thank you,<o:p></o:p></p><p class=3DMsoNormal>Bharath N<= o:p></o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNorma= l><o:p> </o:p></p></div></body></html> --__1462895146222116367abhmp0007.oracle.com--
