You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sc...@apache.org on 2006/07/06 01:42:43 UTC
svn commit: r419386 -
/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java
Author: scolebourne
Date: Wed Jul 5 16:42:43 2006
New Revision: 419386
URL: http://svn.apache.org/viewvc?rev=419386&view=rev
Log:
Fix char/Character methods in ArrayUtils
LANG-267
Modified:
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java
Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java?rev=419386&r1=419385&r2=419386&view=diff
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java Wed Jul 5 16:42:43 2006
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2005 The Apache Software Foundation.
+ * Copyright 2002-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -2317,22 +2317,20 @@
/**
* <p>Converts an array of primitive chars to objects.</p>
*
- * <p><strong>This is method is not in ArrayUtils.</strong></p>
- *
* <p>This method returns <code>null</code> for a <code>null</code> input array.</p>
*
* @param array a <code>char</code> array
* @return a <code>Character</code> array, <code>null</code> if null array input
*/
- public static Object[] toObject(char[] array) {
- if ( array == null ) {
+ public static Character[] toObject(char[] array) {
+ if (array == null) {
return null;
- }else if( array.length == 0 ){
+ } else if (array.length == 0) {
return EMPTY_CHARACTER_OBJECT_ARRAY;
}
final Character[] result = new Character[array.length];
- for( int i = 0; i < array.length; i++ ){
- result[i] = new Character( array[i] );
+ for (int i = 0; i < array.length; i++) {
+ result[i] = new Character(array[i]);
}
return result;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org