-
Bug
-
Resolution: Fixed
-
P4
-
9
-
b150
quite similar to JDK-8169650.
Please run the following code:
int type = TIFFTag.TIFF_LONG;
TIFFField f = new TIFFField(new TIFFTag("TAG", 123456, 1 << type),
type, 1, new long[]{-100L});
System.out.println(f.getAsLong(0));
System.out.println(f.getValueAsString(0));
Output (JDK9 b142) - NOK:
-100
-100
but TIFF_LONG is "32-bit (4-byte) unsigned integer" (http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf) (?)
at the same time TIFFField(TIFFTag tag, int value) constructor will throw an IllegalArgumentException exception (as expected).
Please run the following code:
int type = TIFFTag.TIFF_LONG;
TIFFField f = new TIFFField(new TIFFTag("TAG", 123456, 1 << type),
type, 1, new long[]{-100L});
System.out.println(f.getAsLong(0));
System.out.println(f.getValueAsString(0));
Output (JDK9 b142) - NOK:
-100
-100
but TIFF_LONG is "32-bit (4-byte) unsigned integer" (http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf) (?)
at the same time TIFFField(TIFFTag tag, int value) constructor will throw an IllegalArgumentException exception (as expected).