src/share/classes/com/sun/imageio/plugins/gif/GIFWritableImageMetadata.java

Print this page
rev 9343 : 8033716: Fix raw and unchecked lint warnings in com.sun.imageio
Reviewed-by: darcy, prr, bae

*** 256,284 **** fatal(applicationExtension, "Bad user object in ApplicationExtension!"); } if (applicationIDs == null) { ! applicationIDs = new ArrayList(); ! authenticationCodes = new ArrayList(); ! applicationData = new ArrayList(); } applicationIDs.add(fromISO8859(applicationIDString)); authenticationCodes.add(fromISO8859(authenticationCodeString)); ! applicationData.add(applicationExtensionData); } else if (name.equals("CommentExtensions")) { Node commentExtension = node.getFirstChild(); if (commentExtension != null) { while(commentExtension != null) { if (!commentExtension.getNodeName().equals("CommentExtension")) { fatal(node, "Only a CommentExtension may be a child of a CommentExtensions!"); } if (comments == null) { ! comments = new ArrayList(); } String comment = getStringAttribute(commentExtension, "value", null, true, null); --- 256,284 ---- fatal(applicationExtension, "Bad user object in ApplicationExtension!"); } if (applicationIDs == null) { ! applicationIDs = new ArrayList<>(); ! authenticationCodes = new ArrayList<>(); ! applicationData = new ArrayList<>(); } applicationIDs.add(fromISO8859(applicationIDString)); authenticationCodes.add(fromISO8859(authenticationCodeString)); ! applicationData.add((byte[]) applicationExtensionData); } else if (name.equals("CommentExtensions")) { Node commentExtension = node.getFirstChild(); if (commentExtension != null) { while(commentExtension != null) { if (!commentExtension.getNodeName().equals("CommentExtension")) { fatal(node, "Only a CommentExtension may be a child of a CommentExtensions!"); } if (comments == null) { ! comments = new ArrayList<>(); } String comment = getStringAttribute(commentExtension, "value", null, true, null);
*** 365,375 **** "ISO-8859-1", false))) { String value = getAttribute(childNode, "value"); byte[] comment = fromISO8859(value); if (comments == null) { ! comments = new ArrayList(); } comments.add(comment); } childNode = childNode.getNextSibling(); } --- 365,375 ---- "ISO-8859-1", false))) { String value = getAttribute(childNode, "value"); byte[] comment = fromISO8859(value); if (comments == null) { ! comments = new ArrayList<>(); } comments.add(comment); } childNode = childNode.getNextSibling(); }