src/share/classes/java/awt/image/DataBuffer.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2013, 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
@@ -277,11 +277,11 @@
this.theTrackable = StateTrackableDelegate.createInstance(initialState);
this.dataType = dataType;
this.banks = numBanks;
this.size = size;
this.offset = offsets[0];
- this.offsets = (int[])offsets.clone();
+ this.offsets = offsets.clone();
}
/** Returns the data type of this DataBuffer.
* @return the data type of this <code>DataBuffer</code>.
*/
@@ -305,11 +305,11 @@
/** Returns the offsets (in array elements) of all the banks.
* @return the offsets of all banks.
*/
public int[] getOffsets() {
- return (int[])offsets.clone();
+ return offsets.clone();
}
/** Returns the number of banks in this DataBuffer.
* @return the number of banks.
*/