src/share/classes/javax/imageio/spi/ImageReaderWriterSpi.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -237,18 +237,18 @@
         }
         if (pluginClassName == null) {
             throw new IllegalArgumentException("pluginClassName == null!");
         }
 
-        this.names = (String[])names.clone();
+        this.names = names.clone();
         // If length == 0, leave it null
         if (suffixes != null && suffixes.length > 0) {
-            this.suffixes = (String[])suffixes.clone();
+            this.suffixes = suffixes.clone();
         }
         // If length == 0, leave it null
         if (MIMETypes != null && MIMETypes.length > 0) {
-            this.MIMETypes = (String[])MIMETypes.clone();
+            this.MIMETypes = MIMETypes.clone();
         }
         this.pluginClassName = pluginClassName;
 
         this.supportsStandardStreamMetadataFormat =
             supportsStandardStreamMetadataFormat;

@@ -257,34 +257,34 @@
             nativeStreamMetadataFormatClassName;
         // If length == 0, leave it null
         if (extraStreamMetadataFormatNames != null &&
             extraStreamMetadataFormatNames.length > 0) {
             this.extraStreamMetadataFormatNames =
-                (String[])extraStreamMetadataFormatNames.clone();
+                extraStreamMetadataFormatNames.clone();
         }
         // If length == 0, leave it null
         if (extraStreamMetadataFormatClassNames != null &&
             extraStreamMetadataFormatClassNames.length > 0) {
             this.extraStreamMetadataFormatClassNames =
-                (String[])extraStreamMetadataFormatClassNames.clone();
+                extraStreamMetadataFormatClassNames.clone();
         }
         this.supportsStandardImageMetadataFormat =
             supportsStandardImageMetadataFormat;
         this.nativeImageMetadataFormatName = nativeImageMetadataFormatName;
         this.nativeImageMetadataFormatClassName =
             nativeImageMetadataFormatClassName;
         // If length == 0, leave it null
         if (extraImageMetadataFormatNames != null &&
             extraImageMetadataFormatNames.length > 0) {
             this.extraImageMetadataFormatNames =
-                (String[])extraImageMetadataFormatNames.clone();
+                extraImageMetadataFormatNames.clone();
         }
         // If length == 0, leave it null
         if (extraImageMetadataFormatClassNames != null &&
             extraImageMetadataFormatClassNames.length > 0) {
             this.extraImageMetadataFormatClassNames =
-                (String[])extraImageMetadataFormatClassNames.clone();
+                extraImageMetadataFormatClassNames.clone();
         }
     }
 
     /**
      * Constructs a blank <code>ImageReaderWriterSpi</code>.  It is up

@@ -306,11 +306,11 @@
      * @return a non-<code>null</code> array of <code>String</code>s
      * or length at least 1 containing informal format names
      * associated with this reader or writer.
      */
     public String[] getFormatNames() {
-        return (String[])names.clone();
+        return names.clone();
     }
 
     /**
      * Returns an array of <code>String</code>s containing a list of
      * file suffixes associated with the formats that are generally

@@ -330,11 +330,11 @@
      * @return an array of <code>String</code>s or length at least 1
      * containing common file suffixes associated with this reader or
      * writer, or <code>null</code>.
      */
     public String[] getFileSuffixes() {
-        return suffixes == null ? null : (String[])suffixes.clone();
+        return suffixes == null ? null : suffixes.clone();
     }
 
     /**
      * Returns an array of <code>String</code>s containing a list of
      * MIME types associated with the formats that are generally

@@ -365,11 +365,11 @@
      * @return an array of <code>String</code>s or length at least 1
      * containing MIME types associated with this reader or writer, or
      * <code>null</code>.
      */
     public String[] getMIMETypes() {
-        return MIMETypes == null ? null : (String[])MIMETypes.clone();
+        return MIMETypes == null ? null : MIMETypes.clone();
     }
 
     /**
      * Returns the fully-qualified class name of the
      * <code>ImageReader</code> or <code>ImageWriter</code> plug-in

@@ -441,11 +441,11 @@
      * @see #getExtraImageMetadataFormatNames
      * @see #getNativeStreamMetadataFormatName
      */
     public String[] getExtraStreamMetadataFormatNames() {
         return extraStreamMetadataFormatNames == null ?
-            null : (String[])extraStreamMetadataFormatNames.clone();
+            null : extraStreamMetadataFormatNames.clone();
     }
 
     /**
      * Returns <code>true</code> if the standard metadata format is
      * among the document formats recognized by the

@@ -505,11 +505,11 @@
      * @see #getExtraStreamMetadataFormatNames
      * @see #getNativeImageMetadataFormatName
      */
     public String[] getExtraImageMetadataFormatNames() {
         return extraImageMetadataFormatNames == null ?
-            null : (String[])extraImageMetadataFormatNames.clone();
+            null : extraImageMetadataFormatNames.clone();
     }
 
     /**
      * Returns an <code>IIOMetadataFormat</code> object describing the
      * given stream metadata format, or <code>null</code> if no