src/share/classes/java/awt/image/DataBufferShort.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -151,11 +151,11 @@
* @param dataArray The short arrays for the <CODE>DataBuffer</CODE>.
* @param size The size of the banks in the <CODE>DataBuffer</CODE>.
*/
public DataBufferShort(short dataArray[][], int size) {
super(UNTRACKABLE, TYPE_SHORT, size, dataArray.length);
- bankdata = (short[][]) dataArray.clone();
+ bankdata = dataArray.clone();
data = bankdata[0];
}
/**
* Constructs a short-based <CODE>DataBuffer</CODE> with the specified arrays, size,
@@ -176,11 +176,11 @@
* @param size The size of the banks in the <CODE>DataBuffer</CODE>.
* @param offsets The offsets into each array.
*/
public DataBufferShort(short dataArray[][], int size, int offsets[]) {
super(UNTRACKABLE, TYPE_SHORT, size, dataArray.length, offsets);
- bankdata = (short[][]) dataArray.clone();
+ bankdata = dataArray.clone();
data = bankdata[0];
}
/**
* Returns the default (first) byte data array.
@@ -223,11 +223,11 @@
*
* @return All of the data arrays.
*/
public short[][] getBankData() {
theTrackable.setUntrackable();
- return (short[][]) bankdata.clone();
+ return bankdata.clone();
}
/**
* Returns the requested data array element from the first (default) bank.
*