The doResize
method doesn't exist anymore in Apache SIS, since we now rely on
java.util.Arrays.copyOf(...)
for part of this work.
Command line:
svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r4603:6050 https://svn.osgeo.org/geotools/trunk/modules/library/metadata/src/main/java/org/geotools/resources/XArray.java
Revision 4603 | Revision 6050 |
---|---|
* This class may be removed if JavaSoft provide some language construct
* functionally equivalent to C/C++'s <code>realloc</code>.
*
* @version $Id: XArray.java,v 1.6 2003/10/14 22:06:29 desruisseaux Exp $
* @author Martin Desruisseaux
*/
public final class XArray { |
* This class may be removed if JavaSoft provide some language construct
* functionally equivalent to C/C++'s <code>realloc</code>.
*
* @version $Id: XArray.java,v 1.7 2003/11/15 16:01:32 aaime Exp $
* @author Martin Desruisseaux
*/
public final class XArray { |
* <code>array</code>.
*/
private static Object doResize(final Object array, final int length) {
final int current=Array.getLength(array);
if (current!=length) {
final Object newArray=Array.newInstance(array.getClass().getComponentType(), length);
System.arraycopy(array, 0, newArray, 0, Math.min(current, length)); |
* <code>array</code>.
*/
private static Object doResize(final Object array, final int length) {
final int current = array == null ? 0 : Array.getLength(array);
if (current!=length) {
final Object newArray=Array.newInstance(array.getClass().getComponentType(), length);
System.arraycopy(array, 0, newArray, 0, Math.min(current, length)); |