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

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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

@@ -235,11 +235,11 @@
             new Class<?>[] { ImageInputStream.class } :
             inputTypes.clone();
 
         // If length == 0, leave it null
         if (writerSpiNames != null && writerSpiNames.length > 0) {
-            this.writerSpiNames = (String[])writerSpiNames.clone();
+            this.writerSpiNames = writerSpiNames.clone();
         }
     }
 
     /**
      * Returns an array of <code>Class</code> objects indicating what

@@ -253,11 +253,11 @@
      *
      * @return a non-<code>null</code> array of
      * <code>Class</code>objects of length at least 1.
      */
     public Class[] getInputTypes() {
-        return (Class[])inputTypes.clone();
+        return inputTypes.clone();
     }
 
     /**
      * Returns <code>true</code> if the supplied source object appears
      * to be of the format supported by this reader.  Returning

@@ -406,8 +406,8 @@
      *
      * @see javax.imageio.ImageIO#getImageWriter(ImageReader)
      */
     public String[] getImageWriterSpiNames() {
         return writerSpiNames == null ?
-            null : (String[])writerSpiNames.clone();
+            null : writerSpiNames.clone();
     }
 }