# HG changeset patch # User bpb # Date 1461959327 25200 # Fri Apr 29 12:48:47 2016 -0700 # Node ID 368dd8bf7292087a6fee252552c2042170fca1a6 # Parent 04b0734e67149162736f62c2704b0216209c65c1 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: XXX diff --git a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java --- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java +++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java @@ -1286,7 +1286,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}.