commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r161229 - in jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang: ./ enum/ enums/ exception/ math/ mutable/ time/
Date Wed, 13 Apr 2005 22:36:56 GMT
Author: ggregory
Date: Wed Apr 13 15:36:48 2005
New Revision: 161229

URL: http://svn.apache.org/viewcvs?view=rev&rev=161229
Log:
Removed extra C style parens in return statements (as discussed on commons-dev).

Modified:
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/BitField.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/BooleanUtils.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharRange.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSet.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharUtils.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ObjectUtils.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/WordUtils.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/enum/Enum.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/enums/Enum.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/NestableDelegate.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/DoubleRange.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/FloatRange.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/IntRange.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/JVMRandom.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/LongRange.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberRange.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/Range.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableByte.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableInt.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableLong.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableObject.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableShort.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DateUtils.java
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/StopWatch.java

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java?view=diff&r1=161228&r2=161229
==============================================================================
--- 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
Apr 13 15:36:48 2005
@@ -1302,7 +1302,7 @@
      * @return <code>true</code> if the array contains the object
      */
     public static boolean contains(Object[] array, Object objectToFind) {
-        return (indexOf(array, objectToFind) != -1);
+        return indexOf(array, objectToFind) != -1;
     }
 
     // long IndexOf
@@ -1405,7 +1405,7 @@
      * @return <code>true</code> if the array contains the object
      */
     public static boolean contains(long[] array, long valueToFind) {
-        return (indexOf(array, valueToFind) != -1);
+        return indexOf(array, valueToFind) != -1;
     }
 
     // int IndexOf
@@ -1508,7 +1508,7 @@
      * @return <code>true</code> if the array contains the object
      */
     public static boolean contains(int[] array, int valueToFind) {
-        return (indexOf(array, valueToFind) != -1);
+        return indexOf(array, valueToFind) != -1;
     }
 
     // short IndexOf
@@ -1611,7 +1611,7 @@
      * @return <code>true</code> if the array contains the object
      */
     public static boolean contains(short[] array, short valueToFind) {
-        return (indexOf(array, valueToFind) != -1);
+        return indexOf(array, valueToFind) != -1;
     }
 
     // char IndexOf
@@ -1719,7 +1719,7 @@
      * @since 2.1
      */
     public static boolean contains(char[] array, char valueToFind) {
-        return (indexOf(array, valueToFind) != -1);
+        return indexOf(array, valueToFind) != -1;
     }
 
     // byte IndexOf
@@ -1822,7 +1822,7 @@
      * @return <code>true</code> if the array contains the object
      */
     public static boolean contains(byte[] array, byte valueToFind) {
-        return (indexOf(array, valueToFind) != -1);
+        return indexOf(array, valueToFind) != -1;
     }
 
     // double IndexOf
@@ -2029,7 +2029,7 @@
      * @return <code>true</code> if the array contains the object
      */
     public static boolean contains(double[] array, double valueToFind) {
-        return (indexOf(array, valueToFind) != -1);
+        return indexOf(array, valueToFind) != -1;
     }
 
     /**
@@ -2046,7 +2046,7 @@
      * @return true if value falling within tolerance is in array
      */
     public static boolean contains(double[] array, double valueToFind, double tolerance)
{
-        return (indexOf(array, valueToFind, 0, tolerance) != -1);
+        return indexOf(array, valueToFind, 0, tolerance) != -1;
     }
 
     // float IndexOf
@@ -2149,7 +2149,7 @@
      * @return <code>true</code> if the array contains the object
      */
     public static boolean contains(float[] array, float valueToFind) {
-        return (indexOf(array, valueToFind) != -1);
+        return indexOf(array, valueToFind) != -1;
     }
 
     // boolean IndexOf
@@ -2252,7 +2252,7 @@
      * @return <code>true</code> if the array contains the object
      */
     public static boolean contains(boolean[] array, boolean valueToFind) {
-        return (indexOf(array, valueToFind) != -1);
+        return indexOf(array, valueToFind) != -1;
     }
 
     // Primitive/Object array converters

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/BitField.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/BitField.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/BitField.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/BitField.java Wed Apr
13 15:36:48 2005
@@ -98,7 +98,7 @@
      * @return the selected bits
      */
     public int getRawValue(int holder) {
-        return (holder & _mask);
+        return holder & _mask;
     }
 
     /**

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/BooleanUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/BooleanUtils.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/BooleanUtils.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/BooleanUtils.java Wed
Apr 13 15:36:48 2005
@@ -84,7 +84,7 @@
         if (bool == null) {
             return false;
         }
-        return (bool.booleanValue() ? true : false);
+        return bool.booleanValue() ? true : false;
     }
 
     /**
@@ -104,7 +104,7 @@
         if (bool == null) {
             return false;
         }
-        return (bool.booleanValue() ? false : true);
+        return bool.booleanValue() ? false : true;
     }
 
     /**
@@ -121,7 +121,7 @@
      * @return Boolean.TRUE or Boolean.FALSE as appropriate
      */
     public static Boolean toBooleanObject(boolean bool) {
-        return (bool ? Boolean.TRUE : Boolean.FALSE);
+        return bool ? Boolean.TRUE : Boolean.FALSE;
     }
     
     /**
@@ -142,7 +142,7 @@
         if (bool == null) {
             return false;
         }
-        return (bool.booleanValue() ? true : false);
+        return bool.booleanValue() ? true : false;
     }
     
     /**
@@ -162,7 +162,7 @@
         if (bool == null) {
             return valueIfNull;
         }
-        return (bool.booleanValue() ? true : false);
+        return bool.booleanValue() ? true : false;
     }
     
     // Integer to Boolean methods
@@ -182,7 +182,7 @@
      *  if zero
      */
     public static boolean toBoolean(int value) {
-        return (value == 0 ? false : true);
+        return value == 0 ? false : true;
     }
     
     /**
@@ -200,7 +200,7 @@
      *  <code>null</code> if <code>null</code>
      */
     public static Boolean toBooleanObject(int value) {
-        return (value == 0 ? Boolean.FALSE : Boolean.TRUE);
+        return value == 0 ? Boolean.FALSE : Boolean.TRUE;
     }
     
     /**
@@ -223,7 +223,7 @@
         if (value == null) {
             return null;
         }
-        return (value.intValue() == 0 ? Boolean.FALSE : Boolean.TRUE);
+        return value.intValue() == 0 ? Boolean.FALSE : Boolean.TRUE;
     }
     
     /**
@@ -369,7 +369,7 @@
      * @return one if <code>true</code>, zero if <code>false</code>
      */
     public static int toInteger(boolean bool) {
-        return (bool ? 1 : 0);
+        return bool ? 1 : 0;
     }
     
     /**
@@ -385,7 +385,7 @@
      * @return one if <code>true</code>, zero if <code>false</code>
      */
     public static Integer toIntegerObject(boolean bool) {
-        return (bool ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO);
+        return bool ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
     }
     
     /**
@@ -406,7 +406,7 @@
         if (bool == null) {
             return null;
         }
-        return (bool.booleanValue() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO);
+        return bool.booleanValue() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
     }
     
     /**
@@ -423,7 +423,7 @@
      * @return the appropriate value
      */
     public static int toInteger(boolean bool, int trueValue, int falseValue) {
-        return (bool ? trueValue : falseValue);
+        return bool ? trueValue : falseValue;
     }
     
     /**
@@ -445,7 +445,7 @@
         if (bool == null) {
             return nullValue;
         }
-        return (bool.booleanValue() ? trueValue : falseValue);
+        return bool.booleanValue() ? trueValue : falseValue;
     }
     
     /**
@@ -464,7 +464,7 @@
      * @return the appropriate value
      */
     public static Integer toIntegerObject(boolean bool, Integer trueValue, Integer falseValue)
{
-        return (bool ? trueValue : falseValue);
+        return bool ? trueValue : falseValue;
     }
     
     /**
@@ -489,7 +489,7 @@
         if (bool == null) {
             return nullValue;
         }
-        return (bool.booleanValue() ? trueValue : falseValue);
+        return bool.booleanValue() ? trueValue : falseValue;
     }
     
     // String to Boolean methods
@@ -778,7 +778,7 @@
         if (bool == null) {
             return nullString;
         }
-        return (bool.booleanValue() ? trueString : falseString);
+        return bool.booleanValue() ? trueString : falseString;
     }
     
     // boolean to String methods
@@ -850,7 +850,7 @@
      * @return one of the two input Strings
      */
     public static String toString(boolean bool, String trueString, String falseString) {
-        return (bool ? trueString : falseString);
+        return bool ? trueString : falseString;
     }
     
     // xor methods
@@ -922,7 +922,7 @@
         } catch (NullPointerException ex) {
             throw new IllegalArgumentException("The array must not contain any null elements");
         }
-        return (xor(primitive) ? Boolean.TRUE : Boolean.FALSE);
+        return xor(primitive) ? Boolean.TRUE : Boolean.FALSE;
     }
 
 }

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharRange.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharRange.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharRange.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharRange.java Wed
Apr 13 15:36:48 2005
@@ -145,7 +145,7 @@
      * @return <code>true</code> if this range contains the input character
      */
     public boolean contains(char ch) {
-        return ((ch >= start && ch <= end) != negated);
+        return (ch >= start && ch <= end) != negated;
     }
 
     /**
@@ -162,15 +162,15 @@
         }
         if (negated) {
             if (range.negated) {
-                return (start >= range.start && end <= range.end);
+                return start >= range.start && end <= range.end;
             } else {
-                return (range.end < start || range.start > end);
+                return range.end < start || range.start > end;
             }
         } else {
             if (range.negated) {
-                return (start == 0 && end == Character.MAX_VALUE);
+                return start == 0 && end == Character.MAX_VALUE;
             } else {
-                return (start <= range.start && end >= range.end);
+                return start <= range.start && end >= range.end;
             }
         }
     }
@@ -192,7 +192,7 @@
             return false;
         }
         CharRange other = (CharRange) obj;
-        return (start == other.start && end == other.end && negated == other.negated);
+        return start == other.start && end == other.end && negated == other.negated;
     }
 
     /**

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSet.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSet.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSet.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSet.java Wed Apr
13 15:36:48 2005
@@ -254,7 +254,7 @@
             return false;
         }
         CharSet other = (CharSet) obj;
-        return (set.equals(other.set));
+        return set.equals(other.set);
     }
 
     /**

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharUtils.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharUtils.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharUtils.java Wed
Apr 13 15:36:48 2005
@@ -219,7 +219,7 @@
         if (isAsciiNumeric(ch) == false) {
             throw new IllegalArgumentException("The character " + ch + " is not in the range
'0' - '9'");
         }
-        return (ch - 48);
+        return ch - 48;
     }
     
     /**
@@ -241,7 +241,7 @@
         if (isAsciiNumeric(ch) == false) {
             return defaultValue;
         }
-        return (ch - 48);
+        return ch - 48;
     }
     
     /**
@@ -403,7 +403,7 @@
      * @return true if less than 128
      */
     public static boolean isAscii(char ch) {
-        return (ch < 128);
+        return ch < 128;
     }
     
     /**
@@ -422,7 +422,7 @@
      * @return true if between 32 and 126 inclusive
      */
     public static boolean isAsciiPrintable(char ch) {
-        return (ch >= 32 && ch < 127);
+        return ch >= 32 && ch < 127;
     }
     
     /**
@@ -441,7 +441,7 @@
      * @return true if less than 32 or equals 127
      */
     public static boolean isAsciiControl(char ch) {
-        return (ch < 32 || ch == 127);
+        return ch < 32 || ch == 127;
     }
     
     /**
@@ -479,7 +479,7 @@
      * @return true if between 65 and 90 inclusive
      */
     public static boolean isAsciiAlphaUpper(char ch) {
-        return (ch >= 'A' && ch <= 'Z');
+        return ch >= 'A' && ch <= 'Z';
     }
     
     /**
@@ -498,7 +498,7 @@
      * @return true if between 97 and 122 inclusive
      */
     public static boolean isAsciiAlphaLower(char ch) {
-        return (ch >= 'a' && ch <= 'z');
+        return ch >= 'a' && ch <= 'z';
     }
     
     /**
@@ -517,7 +517,7 @@
      * @return true if between 48 and 57 inclusive
      */
     public static boolean isAsciiNumeric(char ch) {
-        return (ch >= '0' && ch <= '9');
+        return ch >= '0' && ch <= '9';
     }
     
     /**

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java Wed
Apr 13 15:36:48 2005
@@ -494,7 +494,7 @@
         if (cls == null) {
             return false;
         }
-        return (cls.getName().indexOf(INNER_CLASS_SEPARATOR_CHAR) >= 0);
+        return cls.getName().indexOf(INNER_CLASS_SEPARATOR_CHAR) >= 0;
     }
 
 }

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ObjectUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ObjectUtils.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ObjectUtils.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ObjectUtils.java Wed
Apr 13 15:36:48 2005
@@ -83,7 +83,7 @@
      * @return <code>object</code> if it is not <code>null</code>,
defaultValue otherwise
      */
     public static Object defaultIfNull(Object object, Object defaultValue) {
-        return (object != null ? object : defaultValue);
+        return object != null ? object : defaultValue;
     }
 
     /**
@@ -129,7 +129,7 @@
      * @since 2.1
      */
     public static int hashCode(Object obj) {
-        return ((obj == null) ? 0 : obj.hashCode());
+        return (obj == null) ? 0 : obj.hashCode();
     }
 
     // Identity ToString
@@ -208,7 +208,7 @@
      * @since 2.0
      */
     public static String toString(Object obj) {
-        return (obj == null ? "" : obj.toString());
+        return obj == null ? "" : obj.toString();
     }
 
     /**
@@ -231,7 +231,7 @@
      * @since 2.0
      */
     public static String toString(Object obj, String nullStr) {
-        return (obj == null ? nullStr : obj.toString());
+        return obj == null ? nullStr : obj.toString();
     }
 
     // Null

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java Wed
Apr 13 15:36:48 2005
@@ -430,7 +430,7 @@
             return null;
         }
         str = strip(str, null);
-        return (str.length() == 0 ? null : str);
+        return str.length() == 0 ? null : str;
     }
 
     /**
@@ -456,7 +456,7 @@
      * @since 2.0
      */
     public static String stripToEmpty(String str) {
-        return (str == null ? EMPTY : strip(str, null));
+        return str == null ? EMPTY : strip(str, null);
     }
 
     /**
@@ -666,7 +666,7 @@
      *  both <code>null</code>
      */
     public static boolean equals(String str1, String str2) {
-        return (str1 == null ? str2 == null : str1.equals(str2));
+        return str1 == null ? str2 == null : str1.equals(str2);
     }
 
     /**
@@ -691,7 +691,7 @@
      *  both <code>null</code>
      */
     public static boolean equalsIgnoreCase(String str1, String str2) {
-        return (str1 == null ? str2 == null : str1.equalsIgnoreCase(str2));
+        return str1 == null ? str2 == null : str1.equalsIgnoreCase(str2);
     }
 
     // IndexOf
@@ -1022,7 +1022,7 @@
         if (isEmpty(str)) {
             return false;
         }
-        return (str.indexOf(searchChar) >= 0);
+        return str.indexOf(searchChar) >= 0;
     }
 
     /**
@@ -1050,7 +1050,7 @@
         if (str == null || searchStr == null) {
             return false;
         }
-        return (str.indexOf(searchStr) >= 0);
+        return str.indexOf(searchStr) >= 0;
     }
 
     // IndexOfAny chars

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java Wed
Apr 13 15:36:48 2005
@@ -1239,7 +1239,7 @@
      *  than the required version
      */
     public static boolean isJavaVersionAtLeast(float requiredVersion) {
-        return (JAVA_VERSION_FLOAT >= requiredVersion);
+        return JAVA_VERSION_FLOAT >= requiredVersion;
     }
     
     /**
@@ -1257,7 +1257,7 @@
      * @since 2.0
      */
     public static boolean isJavaVersionAtLeast(int requiredVersion) {
-        return (JAVA_VERSION_INT >= requiredVersion);
+        return JAVA_VERSION_INT >= requiredVersion;
     }
 
     /**

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/WordUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/WordUtils.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/WordUtils.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/WordUtils.java Wed
Apr 13 15:36:48 2005
@@ -114,7 +114,7 @@
 //            }
 //        }
 //
-//        return (stringBuffer.toString());
+//        return stringBuffer.toString();
 //    }
 
     // Wrapping

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/enum/Enum.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/enum/Enum.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/enum/Enum.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/enum/Enum.java Wed
Apr 13 15:36:48 2005
@@ -134,7 +134,7 @@
  *       super("Plus");
  *     }
  *     public int eval(int a, int b) {
- *       return (a + b);
+ *       return a + b;
  *     }
  *   }
  *   public static final OperationEnum MINUS = new MinusOperation();
@@ -143,7 +143,7 @@
  *       super("Minus");
  *     }
  *     public int eval(int a, int b) {
- *       return (a - b);
+ *       return a - b;
  *     }
  *   }
  *

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/enums/Enum.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/enums/Enum.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/enums/Enum.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/enums/Enum.java Wed
Apr 13 15:36:48 2005
@@ -134,7 +134,7 @@
  *       super("Plus");
  *     }
  *     public int eval(int a, int b) {
- *       return (a + b);
+ *       return a + b;
  *     }
  *   }
  *   public static final OperationEnum MINUS = new MinusOperation();
@@ -143,7 +143,7 @@
  *       super("Minus");
  *     }
  *     public int eval(int a, int b) {
- *       return (a - b);
+ *       return a - b;
  *     }
  *   }
  *

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java
Wed Apr 13 15:36:48 2005
@@ -342,7 +342,7 @@
      * @since 2.0
      */
     public static boolean isThrowableNested() {
-        return (THROWABLE_CAUSE_METHOD != null);
+        return THROWABLE_CAUSE_METHOD != null;
     }
     
     /**

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/NestableDelegate.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/NestableDelegate.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/NestableDelegate.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/NestableDelegate.java
Wed Apr 13 15:36:48 2005
@@ -157,7 +157,7 @@
             }
 
         }
-        return (msg.length() > 0 ? msg.toString() : null);
+        return msg.length() > 0 ? msg.toString() : null;
     }
 
     /**

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/DoubleRange.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/DoubleRange.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/DoubleRange.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/DoubleRange.java
Wed Apr 13 15:36:48 2005
@@ -305,7 +305,7 @@
      *  range by <code>double</code> comparison
      */
     public boolean containsDouble(double value) {
-        return (value >= min && value <= max);
+        return value >= min && value <= max;
     }
 
     // Range tests

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/FloatRange.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/FloatRange.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/FloatRange.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/FloatRange.java
Wed Apr 13 15:36:48 2005
@@ -301,7 +301,7 @@
      *  range by <code>float</code> comparison
      */
     public boolean containsFloat(float value) {
-        return (value >= min && value <= max);
+        return value >= min && value <= max;
     }
 
     // Range tests

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/IntRange.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/IntRange.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/IntRange.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/IntRange.java
Wed Apr 13 15:36:48 2005
@@ -276,7 +276,7 @@
      *  range by <code>int</code> comparison
      */
     public boolean containsInteger(int value) {
-        return (value >= min && value <= max);
+        return value >= min && value <= max;
     }
 
     // Range tests
@@ -337,7 +337,7 @@
             return false;
         }
         IntRange range = (IntRange) obj;
-        return (min == range.min && max == range.max);
+        return min == range.min && max == range.max;
     }
 
     /**

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/JVMRandom.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/JVMRandom.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/JVMRandom.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/JVMRandom.java
Wed Apr 13 15:36:48 2005
@@ -136,7 +136,7 @@
      * @return the random boolean
      */
     public boolean nextBoolean() {
-        return (Math.random() > 0.5);
+        return Math.random() > 0.5;
     }
     /**
      * <p>Returns the next pseudorandom, uniformly distributed float value

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/LongRange.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/LongRange.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/LongRange.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/LongRange.java
Wed Apr 13 15:36:48 2005
@@ -289,7 +289,7 @@
      *  range by <code>long</code> comparison
      */
     public boolean containsLong(long value) {
-        return (value >= min && value <= max);
+        return value >= min && value <= max;
     }
 
     // Range tests
@@ -350,7 +350,7 @@
             return false;
         }
         LongRange range = (LongRange) obj;
-        return (min == range.min && max == range.max);
+        return min == range.min && max == range.max;
     }
 
     /**

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberRange.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberRange.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberRange.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberRange.java
Wed Apr 13 15:36:48 2005
@@ -169,7 +169,7 @@
         }
         int compareMin = ((Comparable) min).compareTo(number);
         int compareMax = ((Comparable) max).compareTo(number);
-        return (compareMin <= 0 && compareMax >= 0);
+        return compareMin <= 0 && compareMax >= 0;
     }
 
     // Range tests

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/Range.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/Range.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/Range.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/Range.java Wed
Apr 13 15:36:48 2005
@@ -198,7 +198,7 @@
      *  range by <code>long</code> comparison
      */
     public boolean containsLong(long value) {
-        return (value >= getMinimumLong() && value <= getMaximumLong());
+        return value >= getMinimumLong() && value <= getMaximumLong();
     }
 
     /**
@@ -232,7 +232,7 @@
      *  range by <code>int</code> comparison
      */
     public boolean containsInteger(int value) {
-        return (value >= getMinimumInteger() && value <= getMaximumInteger());
+        return value >= getMinimumInteger() && value <= getMaximumInteger();
     }
 
     /**
@@ -268,7 +268,7 @@
     public boolean containsDouble(double value) {
         int compareMin = NumberUtils.compare(getMinimumDouble(), value);
         int compareMax = NumberUtils.compare(getMaximumDouble(), value);
-        return (compareMin <= 0 && compareMax >= 0);
+        return compareMin <= 0 && compareMax >= 0;
     }
 
     /**
@@ -304,7 +304,7 @@
     public boolean containsFloat(float value) {
         int compareMin = NumberUtils.compare(getMinimumFloat(), value);
         int compareMax = NumberUtils.compare(getMaximumFloat(), value);
-        return (compareMin <= 0 && compareMax >= 0);
+        return compareMin <= 0 && compareMax >= 0;
     }
 
     // Range tests

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableByte.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableByte.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableByte.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableByte.java
Wed Apr 13 15:36:48 2005
@@ -180,7 +180,7 @@
     public int compareTo(Object obj) {
         MutableByte other = (MutableByte) obj;
         byte anotherVal = other.value;
-        return (value < anotherVal ? -1 : (value == anotherVal ? 0 : 1));
+        return value < anotherVal ? -1 : (value == anotherVal ? 0 : 1);
     }
 
     /**

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableInt.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableInt.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableInt.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableInt.java
Wed Apr 13 15:36:48 2005
@@ -146,7 +146,7 @@
      */
     public boolean equals(Object obj) {
         if (obj instanceof MutableInt) {
-            return (value == ((MutableInt) obj).intValue());
+            return value == ((MutableInt) obj).intValue();
         }
         return false;
     }
@@ -171,7 +171,7 @@
     public int compareTo(Object obj) {
         MutableInt other = (MutableInt) obj;
         int anotherVal = other.value;
-        return (value < anotherVal ? -1 : (value == anotherVal ? 0 : 1));
+        return value < anotherVal ? -1 : (value == anotherVal ? 0 : 1);
     }
 
     /**

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableLong.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableLong.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableLong.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableLong.java
Wed Apr 13 15:36:48 2005
@@ -171,7 +171,7 @@
     public int compareTo(Object obj) {
         MutableLong other = (MutableLong) obj;
         long anotherVal = other.value;
-        return (value < anotherVal ? -1 : (value == anotherVal ? 0 : 1));
+        return value < anotherVal ? -1 : (value == anotherVal ? 0 : 1);
     }
 
     /**

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableObject.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableObject.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableObject.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableObject.java
Wed Apr 13 15:36:48 2005
@@ -83,7 +83,7 @@
     public boolean equals(Object obj) {
         if (obj instanceof MutableObject) {
             Object other = ((MutableObject) obj).value;
-            return (value == other || (value != null && value.equals(other)));
+            return value == other || (value != null && value.equals(other));
         }
         return false;
     }
@@ -94,7 +94,7 @@
      * @return the value's hash code or <code>0</code> if the value is <code>null</code>.
      */
     public int hashCode() {
-        return (value == null ? 0 : value.hashCode());
+        return value == null ? 0 : value.hashCode();
     }
 
     /**
@@ -103,7 +103,7 @@
      * @return the mutable value as a string
      */
     public String toString() {
-        return (value == null ? "null" : value.toString());
+        return value == null ? "null" : value.toString();
     }
 
 }

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableShort.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableShort.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableShort.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableShort.java
Wed Apr 13 15:36:48 2005
@@ -155,7 +155,7 @@
      */
     public boolean equals(Object obj) {
         if (obj instanceof MutableShort) {
-            return (value == ((MutableShort) obj).shortValue());
+            return value == ((MutableShort) obj).shortValue();
         }
         return false;
     }
@@ -180,7 +180,7 @@
     public int compareTo(Object obj) {
         MutableShort other = (MutableShort) obj;
         short anotherVal = other.value;
-        return (value < anotherVal ? -1 : (value == anotherVal ? 0 : 1));
+        return value < anotherVal ? -1 : (value == anotherVal ? 0 : 1);
     }
 
     /**

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DateUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DateUtils.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DateUtils.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DateUtils.java
Wed Apr 13 15:36:48 2005
@@ -185,7 +185,7 @@
         if (date1 == null || date2 == null) {
             throw new IllegalArgumentException("The date must not be null");
         }
-        return (date1.getTime() == date2.getTime());
+        return date1.getTime() == date2.getTime();
     }
 
     /**
@@ -203,7 +203,7 @@
         if (cal1 == null || cal2 == null) {
             throw new IllegalArgumentException("The date must not be null");
         }
-        return (cal1.getTime().getTime() == cal2.getTime().getTime());
+        return cal1.getTime().getTime() == cal2.getTime().getTime();
     }
 
     //-----------------------------------------------------------------------

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/StopWatch.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/StopWatch.java?view=diff&r1=161228&r2=161229
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/StopWatch.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/StopWatch.java
Wed Apr 13 15:36:48 2005
@@ -207,13 +207,13 @@
      */
     public long getTime() {
         if(this.runningState == STATE_STOPPED || this.runningState == STATE_SUSPENDED) {
-            return (this.stopTime - this.startTime);
+            return this.stopTime - this.startTime;
         } else
         if(this.runningState == STATE_UNSTARTED) {
             return 0;
         } else
         if(this.runningState == STATE_RUNNING) {
-            return (System.currentTimeMillis() - this.startTime);
+            return System.currentTimeMillis() - this.startTime;
         }
         throw new RuntimeException("Illegal running state has occured. ");
     }
@@ -232,7 +232,7 @@
         if(this.splitState != STATE_SPLIT) {
             throw new IllegalStateException("Stopwatch must be split to get the split time.
");
         }
-        return (this.stopTime - this.startTime);
+        return this.stopTime - this.startTime;
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message