scolebourne 2004/10/07 17:11:00
Modified: lang/src/java/org/apache/commons/lang SystemUtils.java
ClassUtils.java ArrayUtils.java
Log:
Add since tags for 2.1
Revision Changes Path
1.36 +5 -1
jakarta-commons/lang/src/java/org/apache/commons/lang/SystemUtils.java
Index: SystemUtils.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/SystemUtils.java,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- SystemUtils.java 30 Aug 2004 21:21:18 -0000 1.35
+++ SystemUtils.java 8 Oct 2004 00:10:59 -0000 1.36
@@ -1249,6 +1249,7 @@
* <code>checkPropertyAccess</code> method doesn't allow
* access to the specified system property.
* @see System#getProperty(String)
+ * @since 2.1
*/
public static File getJavaHome() {
return new File(System.getProperty(JAVA_HOME_KEY));
@@ -1262,6 +1263,7 @@
* <code>checkPropertyAccess</code> method doesn't allow
* access to the specified system property.
* @see System#getProperty(String)
+ * @since 2.1
*/
public static File getJavaIoTmpDir() {
return new File(System.getProperty(JAVA_IO_TMPDIR_KEY));
@@ -1275,6 +1277,7 @@
* <code>checkPropertyAccess</code> method doesn't allow
* access to the specified system property.
* @see System#getProperty(String)
+ * @since 2.1
*/
public static File getUserDir() {
return new File(System.getProperty(USER_DIR_KEY));
@@ -1288,6 +1291,7 @@
* <code>checkPropertyAccess</code> method doesn't allow
* access to the specified system property.
* @see System#getProperty(String)
+ * @since 2.1
*/
public static File getUserHome() {
return new File(System.getProperty(USER_HOME_KEY));
1.31 +4 -2
jakarta-commons/lang/src/java/org/apache/commons/lang/ClassUtils.java
Index: ClassUtils.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/ClassUtils.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- ClassUtils.java 30 Jun 2004 18:33:58 -0000 1.30
+++ ClassUtils.java 8 Oct 2004 00:10:59 -0000 1.31
@@ -499,6 +499,7 @@
* @param cls the class to convert, may be null
* @return the wrapper class for <code>cls</code> or <code>cls</code> if
* <code>cls</code> is not a primitive. <code>null</code> if null input.
+ * @since 2.1
*/
public static Class primitiveToWrapper(Class cls) {
Class convertedClass = cls;
@@ -516,6 +517,7 @@
* @return an array which contains for each given class, the wrapper class or
* the original class if class is not a primitive. <code>null</code> if null
input.
* Empty array if an empty array passed in.
+ * @since 2.1
*/
public static Class[] primitivesToWrappers(Class[] classes) {
if (classes == null) {
@@ -523,7 +525,7 @@
}
if (classes.length == 0) {
- return ArrayUtils.EMPTY_CLASS_ARRAY;
+ return classes;
}
Class[] convertedClasses = new Class[classes.length];
1.47 +17 -1
jakarta-commons/lang/src/java/org/apache/commons/lang/ArrayUtils.java
Index: ArrayUtils.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/ArrayUtils.java,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- ArrayUtils.java 15 Aug 2004 02:12:51 -0000 1.46
+++ ArrayUtils.java 8 Oct 2004 00:11:00 -0000 1.47
@@ -427,6 +427,7 @@
* array length.
* @return a new array containing the elements between
* the start and end indices.
+ * @since 2.1
*/
public static Object[] subarray(Object[] array, int startIndexInclusive, int
endIndexExclusive) {
if (array == null) {
@@ -465,6 +466,7 @@
* array length.
* @return a new array containing the elements between
* the start and end indices.
+ * @since 2.1
*/
public static long[] subarray(long[] array, int startIndexInclusive, int
endIndexExclusive) {
if (array == null) {
@@ -503,6 +505,7 @@
* array length.
* @return a new array containing the elements between
* the start and end indices.
+ * @since 2.1
*/
public static int[] subarray(int[] array, int startIndexInclusive, int
endIndexExclusive) {
if (array == null) {
@@ -541,6 +544,7 @@
* array length.
* @return a new array containing the elements between
* the start and end indices.
+ * @since 2.1
*/
public static short[] subarray(short[] array, int startIndexInclusive, int
endIndexExclusive) {
if (array == null) {
@@ -579,6 +583,7 @@
* array length.
* @return a new array containing the elements between
* the start and end indices.
+ * @since 2.1
*/
public static char[] subarray(char[] array, int startIndexInclusive, int
endIndexExclusive) {
if (array == null) {
@@ -617,6 +622,7 @@
* array length.
* @return a new array containing the elements between
* the start and end indices.
+ * @since 2.1
*/
public static byte[] subarray(byte[] array, int startIndexInclusive, int
endIndexExclusive) {
if (array == null) {
@@ -655,6 +661,7 @@
* array length.
* @return a new array containing the elements between
* the start and end indices.
+ * @since 2.1
*/
public static double[] subarray(double[] array, int startIndexInclusive, int
endIndexExclusive) {
if (array == null) {
@@ -693,6 +700,7 @@
* array length.
* @return a new array containing the elements between
* the start and end indices.
+ * @since 2.1
*/
public static float[] subarray(float[] array, int startIndexInclusive, int
endIndexExclusive) {
if (array == null) {
@@ -731,6 +739,7 @@
* array length.
* @return a new array containing the elements between
* the start and end indices.
+ * @since 2.1
*/
public static boolean[] subarray(boolean[] array, int startIndexInclusive, int
endIndexExclusive) {
if (array == null) {
@@ -937,6 +946,7 @@
* @param array the array to retrieve the length from, may be null
* @return The length of the array, or <code>0</code> if the array is
<code>null</code>
* @throws IllegalArgumentException if the object arguement is not an array.
+ * @since 2.1
*/
public static int getLength(Object array) {
if (array == null) {
@@ -963,6 +973,7 @@
* @param array the array to return the last index for, may be null
* @return the last index, -1 if empty or null
* @throws IllegalArgumentException if the object arguement is not an array.
+ * @since 2.1
*/
public static int lastIndex(Object array) {
return ArrayUtils.getLength(array) - 1;
@@ -1637,6 +1648,7 @@
* @param valueToFind the value to find
* @return the index of the value within the array,
* <code>-1</code> if not found or <code>null</code> array input
+ * @since 2.1
*/
public static int indexOf(char[] array, char valueToFind) {
return indexOf(array, valueToFind, 0);
@@ -1655,6 +1667,7 @@
* @param startIndex the index to start searching at
* @return the index of the value within the array,
* <code>-1</code> if not found or <code>null</code> array input
+ * @since 2.1
*/
public static int indexOf(char[] array, char valueToFind, int startIndex) {
if (array == null) {
@@ -1680,6 +1693,7 @@
* @param valueToFind the object to find
* @return the last index of the value within the array,
* <code>-1</code> if not found or <code>null</code> array input
+ * @since 2.1
*/
public static int lastIndexOf(char[] array, char valueToFind) {
return lastIndexOf(array, valueToFind, Integer.MAX_VALUE);
@@ -1698,6 +1712,7 @@
* @param startIndex the start index to travers backwards from
* @return the last index of the value within the array,
* <code>-1</code> if not found or <code>null</code> array input
+ * @since 2.1
*/
public static int lastIndexOf(char[] array, char valueToFind, int startIndex) {
if (array == null) {
@@ -1724,6 +1739,7 @@
* @param array the array to search through
* @param valueToFind the value to find
* @return <code>true</code> if the array contains the object
+ * @since 2.1
*/
public static boolean contains(char[] array, char valueToFind) {
return (indexOf(array, valueToFind) != -1);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]