+1
-phil.
On 08/16/2016 09:02 AM, Brian Burkhalter wrote:
Please review at your convenience.
Issue:https://bugs.openjdk.java.net/browse/JDK-8149562
Patch:[1]
Add one sentence to the TIFFField.createFromMetadataNode method
specification stating that the supplied Node parameter must adhere to
the TIFFField element structure defined by the TIFF native image
metadata DTD.
Thanks,
Brian
[1] diff
---
a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java
+++
b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java
/**
* Creates a {@code TIFFField} from a TIFF native image
* metadata node. If the value of the {@code “number"} attribute
* of the node is not found in {@code tagSet} then a new
* {@code TIFFTag} with name {@code TIFFTag.UNKNOWN_TAG_NAME}
- * will be created and assigned to the field.
+ * will be created and assigned to the field. If the {@code Node}
+ * parameter content does not adhere to the {@code TIFFField} element
+ * structure defined by the
+ * <a
href="../../metadata/doc-files/tiff_metadata.html#ImageMetadata">
+ * TIFF native image metadata format specification</a>
+ * an {@code Exception} will be thrown.
*
* @param tagSet The {@code TIFFTagSet} to which the
* {@code TIFFTag} of the field belongs.
* @param node A native TIFF image metadata {@code TIFFField} node.
* @throws NullPointerException if {@code node} is
* {@code null}.
* @throws IllegalArgumentException if the name of the node is not
* {@code "TIFFField"}.
* @throws NullPointerException if the node does not contain any
data.
* @throws IllegalArgumentException if the combination of node
attributes
* and data is not legal per the {@link
#TIFFField(TIFFTag,int,int,Object)}
* constructor specification.
* @return A new {@code TIFFField}.
*/
public static TIFFField createFromMetadataNode(TIFFTagSet tagSet,
Node node) {