src/share/classes/javax/imageio/ImageTypeSpecifier.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2000, 2003, 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

@@ -294,11 +294,11 @@
                 dataType != DataBuffer.TYPE_DOUBLE) {
                 throw new IllegalArgumentException
                     ("Bad value for dataType!");
             }
             this.colorSpace = colorSpace;
-            this.bandOffsets = (int[])bandOffsets.clone();
+            this.bandOffsets = bandOffsets.clone();
             this.dataType = dataType;
             this.hasAlpha = hasAlpha;
             this.isAlphaPremultiplied = isAlphaPremultiplied;
 
             this.colorModel =

@@ -447,12 +447,12 @@
                 throw new IllegalArgumentException
                     ("bandOffsets.length is wrong!");
             }
 
             this.colorSpace = colorSpace;
-            this.bankIndices = (int[])bankIndices.clone();
-            this.bandOffsets = (int[])bandOffsets.clone();
+            this.bankIndices = bankIndices.clone();
+            this.bandOffsets = bandOffsets.clone();
             this.dataType = dataType;
             this.hasAlpha = hasAlpha;
             this.isAlphaPremultiplied = isAlphaPremultiplied;
 
             this.colorModel =

@@ -767,15 +767,15 @@
                 greenLUT.length != len ||
                 blueLUT.length != len ||
                 (alphaLUT != null && alphaLUT.length != len)) {
                 throw new IllegalArgumentException("LUT has improper length!");
             }
-            this.redLUT = (byte[])redLUT.clone();
-            this.greenLUT = (byte[])greenLUT.clone();
-            this.blueLUT = (byte[])blueLUT.clone();
+            this.redLUT = redLUT.clone();
+            this.greenLUT = greenLUT.clone();
+            this.blueLUT = blueLUT.clone();
             if (alphaLUT != null) {
-                this.alphaLUT = (byte[])alphaLUT.clone();
+                this.alphaLUT = alphaLUT.clone();
             }
             this.bits = bits;
             this.dataType = dataType;
 
             if (alphaLUT == null) {