# HG changeset patch # User bpb # Date 1462381260 25200 # Node ID 5b8e864ce0b9a490f6ac91ed831c098d12633d8e # Parent bd91ce346b5bf37fee9a96697b0ab7c1edbdf174 8149816: TIFFField#getValueAsString result is unexpected for RATIONAL and SRATIONAL types (when modulo is 0) Summary: Add more precision to the specification verbiage of getValueAsString(). Reviewed-by: prr diff -r bd91ce346b5b -r 5b8e864ce0b9 jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java --- a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java Wed May 04 01:03:46 2016 +0300 +++ b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java Wed May 04 10:01:00 2016 -0700 @@ -1303,7 +1303,11 @@ * version of the data item. Data of type * {@code TIFFTag.TIFF_RATIONAL} or {@code TIFF_SRATIONAL} are * represented as a pair of integers separated by a - * {@code '/'} character. + * {@code '/'} character. If the numerator of a + * {@code TIFFTag.TIFF_RATIONAL} or {@code TIFF_SRATIONAL} is an integral + * multiple of the denominator, then the value is represented as + * {@code "q/1"} where {@code q} is the quotient of the numerator and + * denominator. * * @param index The index of the data. * @return The data at the given index as a {@code String}.