commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1199894 - in /commons/proper/lang/trunk/src: main/java/org/apache/commons/lang3/ main/java/org/apache/commons/lang3/concurrent/ main/java/org/apache/commons/lang3/exception/ main/java/org/apache/commons/lang3/math/ main/java/org/apache/com...
Date Wed, 09 Nov 2011 17:54:00 GMT
Author: ggregory
Date: Wed Nov  9 17:53:59 2011
New Revision: 1199894

URL: http://svn.apache.org/viewvc?rev=1199894&view=rev
Log:
Remove superfluous parens like:
return (foo + 1);
int len = (foo + 1);
if ((foo + 1 > 2))
((String) foo)


Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/BooleanUtils.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharSequenceUtils.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharSet.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ClassUtils.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/EnumUtils.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ObjectUtils.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/RandomStringUtils.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/Range.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/ConcurrentUtils.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/ConstantInitializer.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/math/Fraction.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/mutable/MutableDouble.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/mutable/MutableFloat.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/WordUtils.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/translate/NumericEntityUnescaper.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/translate/UnicodeUnescaper.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/StopWatch.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/ArrayUtilsAddTest.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/BitFieldTest.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/CharUtilsPerfRun.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/RandomStringUtilsTest.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/CompareToBuilderTest.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/EqualsBuilderTest.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/HashCodeBuilderTest.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/TimedSemaphoreTest.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/text/StrTokenizerTest.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/BooleanUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/BooleanUtils.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/BooleanUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/BooleanUtils.java Wed Nov  9 17:53:59 2011
@@ -551,12 +551,12 @@ public class BooleanUtils {
         switch (str.length()) {
             case 1: {
                 char ch0 = str.charAt(0);
-                if ((ch0 == 'y' || ch0 == 'Y') ||
-                    (ch0 == 't' || ch0 == 'T')) {
+                if (ch0 == 'y' || ch0 == 'Y' ||
+                    ch0 == 't' || ch0 == 'T') {
                     return Boolean.TRUE;
                 }
-                if ((ch0 == 'n' || ch0 == 'N') ||
-                    (ch0 == 'f' || ch0 == 'F')) {
+                if (ch0 == 'n' || ch0 == 'N' ||
+                    ch0 == 'f' || ch0 == 'F') {
                     return Boolean.FALSE;
                 }
                 break;

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharSequenceUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharSequenceUtils.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharSequenceUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharSequenceUtils.java Wed Nov  9 17:53:59 2011
@@ -187,7 +187,7 @@ public class CharSequenceUtils {
     static boolean regionMatches(CharSequence cs, boolean ignoreCase, int thisStart,
             CharSequence substring, int start, int length)    {
         if (cs instanceof String && substring instanceof String) {
-            return ((String) cs).regionMatches(ignoreCase, thisStart, ((String) substring), start, length);
+            return ((String) cs).regionMatches(ignoreCase, thisStart, (String) substring, start, length);
         } else {
             // TODO: Implement rather than convert to String
             return cs.toString().regionMatches(ignoreCase, thisStart, substring.toString(), start, length);

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharSet.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharSet.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharSet.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharSet.java Wed Nov  9 17:53:59 2011
@@ -178,7 +178,7 @@ public class CharSet implements Serializ
         int len = str.length();
         int pos = 0;
         while (pos < len) {
-            int remainder = (len - pos);
+            int remainder = len - pos;
             if (remainder >= 4 && str.charAt(pos) == '^' && str.charAt(pos + 2) == '-') {
                 // negated range
                 set.add(CharRange.isNotIn(str.charAt(pos + 1), str.charAt(pos + 3)));

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ClassUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ClassUtils.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ClassUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ClassUtils.java Wed Nov  9 17:53:59 2011
@@ -622,7 +622,7 @@ public class ClassUtils {
         }
         // have to check for null, as isAssignableFrom doesn't
         if (cls == null) {
-            return !(toClass.isPrimitive());
+            return !toClass.isPrimitive();
         }
         //autoboxing:
         if (autoboxing) {

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/EnumUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/EnumUtils.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/EnumUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/EnumUtils.java Wed Nov  9 17:53:59 2011
@@ -136,7 +136,7 @@ public class EnumUtils {
         Validate.notNull(values);
         long total = 0;
         for (E constant : values) {
-            total |= (1 << constant.ordinal());
+            total |= 1 << constant.ordinal();
         }
         return total;
     }
@@ -179,7 +179,7 @@ public class EnumUtils {
         final E[] constants = checkBitVectorable(enumClass).getEnumConstants();
         final EnumSet<E> results = EnumSet.noneOf(enumClass);
         for (E constant : constants) {
-            if ((value & (1 << constant.ordinal())) != 0) {
+            if ((value & 1 << constant.ordinal()) != 0) {
                 results.add(constant);
             }
         }

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ObjectUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ObjectUtils.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ObjectUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ObjectUtils.java Wed Nov  9 17:53:59 2011
@@ -152,7 +152,7 @@ public class ObjectUtils {
         if (object1 == object2) {
             return true;
         }
-        if ((object1 == null) || (object2 == null)) {
+        if (object1 == null || object2 == null) {
             return false;
         }
         return object1.equals(object2);
@@ -196,7 +196,7 @@ public class ObjectUtils {
      */
     public static int hashCode(Object obj) {
         // hashCode(Object) retained for performance, as hash code is often critical
-        return (obj == null) ? 0 : obj.hashCode();
+        return obj == null ? 0 : obj.hashCode();
     }
 
     /**
@@ -409,9 +409,9 @@ public class ObjectUtils {
         if (c1 == c2) {
             return 0;
         } else if (c1 == null) {
-            return (nullGreater ? 1 : -1);
+            return nullGreater ? 1 : -1;
         } else if (c2 == null) {
-            return (nullGreater ? -1 : 1);
+            return nullGreater ? -1 : 1;
         }
         return c1.compareTo(c2);
     }

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/RandomStringUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/RandomStringUtils.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/RandomStringUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/RandomStringUtils.java Wed Nov  9 17:53:59 2011
@@ -227,7 +227,7 @@ public class RandomStringUtils {
         } else if (count < 0) {
             throw new IllegalArgumentException("Requested random string length " + count + " is less than 0.");
         }
-        if ((start == 0) && (end == 0)) {
+        if (start == 0 && end == 0) {
             end = 'z' + 1;
             start = ' ';
             if (!letters && !numbers) {
@@ -246,9 +246,9 @@ public class RandomStringUtils {
             } else {
                 ch = chars[random.nextInt(gap) + start];
             }
-            if ((letters && Character.isLetter(ch))
-                    || (numbers && Character.isDigit(ch))
-                    || (!letters && !numbers)) {
+            if (letters && Character.isLetter(ch)
+                    || numbers && Character.isDigit(ch)
+                    || !letters && !numbers) {
                 if(ch >= 56320 && ch <= 57343) {
                     if(count == 0) {
                         count++;

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/Range.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/Range.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/Range.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/Range.java Wed Nov  9 17:53:59 2011
@@ -219,7 +219,7 @@ public final class Range<T> implements S
         if (element == null) {
             return false;
         }
-        return (comparator.compare(element, minimum) > -1) && (comparator.compare(element, maximum) < 1);
+        return comparator.compare(element, minimum) > -1 && comparator.compare(element, maximum) < 1;
     }
 
     /**

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java Wed Nov  9 17:53:59 2011
@@ -225,7 +225,7 @@ public class StringUtils {
             return true;
         }
         for (int i = 0; i < strLen; i++) {
-            if ((Character.isWhitespace(cs.charAt(i)) == false)) {
+            if (Character.isWhitespace(cs.charAt(i)) == false) {
                 return false;
             }
         }
@@ -484,13 +484,13 @@ public class StringUtils {
         }
         int start = 0;
         if (stripChars == null) {
-            while ((start != strLen) && Character.isWhitespace(str.charAt(start))) {
+            while (start != strLen && Character.isWhitespace(str.charAt(start))) {
                 start++;
             }
         } else if (stripChars.length() == 0) {
             return str;
         } else {
-            while ((start != strLen) && (stripChars.indexOf(str.charAt(start)) != INDEX_NOT_FOUND)) {
+            while (start != strLen && stripChars.indexOf(str.charAt(start)) != INDEX_NOT_FOUND) {
                 start++;
             }
         }
@@ -529,13 +529,13 @@ public class StringUtils {
         }
 
         if (stripChars == null) {
-            while ((end != 0) && Character.isWhitespace(str.charAt(end - 1))) {
+            while (end != 0 && Character.isWhitespace(str.charAt(end - 1))) {
                 end--;
             }
         } else if (stripChars.length() == 0) {
             return str;
         } else {
-            while ((end != 0) && (stripChars.indexOf(str.charAt(end - 1)) != INDEX_NOT_FOUND)) {
+            while (end != 0 && stripChars.indexOf(str.charAt(end - 1)) != INDEX_NOT_FOUND) {
                 end--;
             }
         }
@@ -1087,7 +1087,7 @@ public class StringUtils {
         if (startPos < 0) {
             startPos = 0;
         }
-        int endLimit = (str.length() - searchStr.length()) + 1;
+        int endLimit = str.length() - searchStr.length() + 1;
         if (startPos > endLimit) {
             return INDEX_NOT_FOUND;
         }
@@ -1333,7 +1333,7 @@ public class StringUtils {
         if (str == null || searchStr == null) {
             return INDEX_NOT_FOUND;
         }
-        if (startPos > (str.length() - searchStr.length())) {
+        if (startPos > str.length() - searchStr.length()) {
             startPos = str.length() - searchStr.length();
         }
         if (startPos < 0) {
@@ -1946,7 +1946,7 @@ public class StringUtils {
             }
         }
 
-        return (ret == Integer.MAX_VALUE) ? INDEX_NOT_FOUND : ret;
+        return ret == Integer.MAX_VALUE ? INDEX_NOT_FOUND : ret;
     }
 
     /**
@@ -2212,7 +2212,7 @@ public class StringUtils {
         if (pos < 0) {
             pos = 0;
         }
-        if (str.length() <= (pos + len)) {
+        if (str.length() <= pos + len) {
             return str.substring(pos);
         }
         return str.substring(pos, pos + len);
@@ -2378,7 +2378,7 @@ public class StringUtils {
             return EMPTY;
         }
         int pos = str.lastIndexOf(separator);
-        if (pos == INDEX_NOT_FOUND || pos == (str.length() - separator.length())) {
+        if (pos == INDEX_NOT_FOUND || pos == str.length() - separator.length()) {
             return EMPTY;
         }
         return str.substring(pos + separator.length());
@@ -2486,7 +2486,7 @@ public class StringUtils {
         int openLen = open.length();
         List<String> list = new ArrayList<String>();
         int pos = 0;
-        while (pos < (strLen - closeLen)) {
+        while (pos < strLen - closeLen) {
             int start = str.indexOf(open, pos);
             if (start < 0) {
                 break;
@@ -2773,7 +2773,7 @@ public class StringUtils {
             return ArrayUtils.EMPTY_STRING_ARRAY;
         }
 
-        if ((separator == null) || (EMPTY.equals(separator))) {
+        if (separator == null || EMPTY.equals(separator)) {
             // Split on whitespace.
             return splitWorker(str, null, max, preserveAllTokens);
         }
@@ -2932,7 +2932,7 @@ public class StringUtils {
             match = true;
             i++;
         }
-        if (match || (preserveAllTokens && lastMatch)) {
+        if (match || preserveAllTokens && lastMatch) {
             list.add(str.substring(start, i));
         }
         return list.toArray(new String[list.size()]);
@@ -3108,7 +3108,7 @@ public class StringUtils {
                 i++;
             }
         }
-        if (match || (preserveAllTokens && lastMatch)) {
+        if (match || preserveAllTokens && lastMatch) {
             list.add(str.substring(start, i));
         }
         return list.toArray(new String[list.size()]);
@@ -3299,7 +3299,7 @@ public class StringUtils {
         if (array == null) {
             return null;
         }
-        int noOfItems = (endIndex - startIndex);
+        int noOfItems = endIndex - startIndex;
         if (noOfItems <= 0) {
             return EMPTY;
         }
@@ -3384,7 +3384,7 @@ public class StringUtils {
 
         // endIndex - startIndex > 0:   Len = NofStrings *(len(firstString) + len(separator))
         //           (Assuming that all Strings are roughly equally long)
-        int noOfItems = (endIndex - startIndex);
+        int noOfItems = endIndex - startIndex;
         if (noOfItems <= 0) {
             return EMPTY;
         }
@@ -3867,8 +3867,8 @@ public class StringUtils {
         }
         int replLength = searchString.length();
         int increase = replacement.length() - replLength;
-        increase = (increase < 0 ? 0 : increase);
-        increase *= (max < 0 ? 16 : (max > 64 ? 64 : max));
+        increase = increase < 0 ? 0 : increase;
+        increase *= max < 0 ? 16 : max > 64 ? 64 : max;
         StringBuilder buf = new StringBuilder(text.length() + increase);
         while (end != INDEX_NOT_FOUND) {
             buf.append(text.substring(start, end)).append(replacement);
@@ -5214,7 +5214,7 @@ public class StringUtils {
         }
         int sz = cs.length();
         for (int i = 0; i < sz; i++) {
-            if ((Character.isLetter(cs.charAt(i)) == false) && (cs.charAt(i) != ' ')) {
+            if (Character.isLetter(cs.charAt(i)) == false && cs.charAt(i) != ' ') {
                 return false;
             }
         }
@@ -5284,7 +5284,7 @@ public class StringUtils {
         }
         int sz = cs.length();
         for (int i = 0; i < sz; i++) {
-            if ((Character.isLetterOrDigit(cs.charAt(i)) == false) && (cs.charAt(i) != ' ')) {
+            if (Character.isLetterOrDigit(cs.charAt(i)) == false && cs.charAt(i) != ' ') {
                 return false;
             }
         }
@@ -5396,7 +5396,7 @@ public class StringUtils {
         }
         int sz = cs.length();
         for (int i = 0; i < sz; i++) {
-            if ((Character.isDigit(cs.charAt(i)) == false) && (cs.charAt(i) != ' ')) {
+            if (Character.isDigit(cs.charAt(i)) == false && cs.charAt(i) != ' ') {
                 return false;
             }
         }
@@ -5429,7 +5429,7 @@ public class StringUtils {
         }
         int sz = cs.length();
         for (int i = 0; i < sz; i++) {
-            if ((Character.isWhitespace(cs.charAt(i)) == false)) {
+            if (Character.isWhitespace(cs.charAt(i)) == false) {
                 return false;
             }
         }
@@ -5726,7 +5726,7 @@ public class StringUtils {
         if (offset > str.length()) {
             offset = str.length();
         }
-        if ((str.length() - offset) < (maxWidth - 3)) {
+        if (str.length() - offset < maxWidth - 3) {
             offset = str.length() - (maxWidth - 3);
         }
         final String abrevMarker = "...";
@@ -5736,7 +5736,7 @@ public class StringUtils {
         if (maxWidth < 7) {
             throw new IllegalArgumentException("Minimum abbreviation width with offset is 7");
         }
-        if ((offset + (maxWidth - 3)) < str.length()) {
+        if (offset + maxWidth - 3 < str.length()) {
             return abrevMarker + abbreviate(str.substring(offset), maxWidth - 3);
         }
         return abrevMarker + str.substring(str.length() - (maxWidth - 3));
@@ -5776,7 +5776,7 @@ public class StringUtils {
             return str;
         }
 
-        if (length >= str.length() || length < (middle.length()+2)) {
+        if (length >= str.length() || length < middle.length()+2) {
             return str;
         }
 
@@ -5934,7 +5934,7 @@ public class StringUtils {
         }
 
         // handle lists containing all nulls or all empty strings
-        if (allStringsNull || (longestStrLen == 0 && !anyStringNull)) {
+        if (allStringsNull || longestStrLen == 0 && !anyStringNull) {
             return INDEX_NOT_FOUND;
         }
 
@@ -6365,7 +6365,7 @@ public class StringUtils {
      */
     private static boolean startsWith(CharSequence str, CharSequence prefix, boolean ignoreCase) {
         if (str == null || prefix == null) {
-            return (str == null && prefix == null);
+            return str == null && prefix == null;
         }
         if (prefix.length() > str.length()) {
             return false;

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/ConcurrentUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/ConcurrentUtils.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/ConcurrentUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/ConcurrentUtils.java Wed Nov  9 17:53:59 2011
@@ -181,7 +181,7 @@ public class ConcurrentUtils {
      */
     public static <T> T initialize(ConcurrentInitializer<T> initializer)
             throws ConcurrentException {
-        return (initializer != null) ? initializer.get() : null;
+        return initializer != null ? initializer.get() : null;
     }
 
     /**
@@ -244,7 +244,7 @@ public class ConcurrentUtils {
         }
 
         V result = map.putIfAbsent(key, value);
-        return (result != null) ? result : value;
+        return result != null ? result : value;
     }
 
     /**

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/ConstantInitializer.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/ConstantInitializer.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/ConstantInitializer.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/ConstantInitializer.java Wed Nov  9 17:53:59 2011
@@ -88,7 +88,7 @@ public class ConstantInitializer<T> impl
      */
     @Override
     public int hashCode() {
-        return (getObject() != null) ? getObject().hashCode() : 0;
+        return getObject() != null ? getObject().hashCode() : 0;
     }
 
     /**

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java Wed Nov  9 17:53:59 2011
@@ -358,7 +358,7 @@ public class TimedSemaphore {
      * unit
      */
     public synchronized double getAverageCallsPerPeriod() {
-        return (periodCount == 0) ? 0 : (double) totalAcquireCount
+        return periodCount == 0 ? 0 : (double) totalAcquireCount
                 / (double) periodCount;
     }
 

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java Wed Nov  9 17:53:59 2011
@@ -178,7 +178,7 @@ public class ExceptionUtils {
      */
     public static Throwable getRootCause(Throwable throwable) {
         List<Throwable> list = getThrowableList(throwable);
-        return (list.size() < 2 ? null : (Throwable)list.get(list.size() - 1));
+        return list.size() < 2 ? null : (Throwable)list.get(list.size() - 1);
     }
 
     /**
@@ -690,7 +690,7 @@ public class ExceptionUtils {
      */
     public static String getRootCauseMessage(Throwable th) {
         Throwable root = ExceptionUtils.getRootCause(th);
-        root = (root == null ? th : root);
+        root = root == null ? th : root;
         return getMessage(root);
     }
 

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/math/Fraction.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/math/Fraction.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/math/Fraction.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/math/Fraction.java Wed Nov  9 17:53:59 2011
@@ -247,7 +247,7 @@ public final class Fraction extends Numb
      * @throws ArithmeticException if the the algorithm does not converge
      */
     public static Fraction getFraction(double value) {
-        int sign = (value < 0 ? -1 : 1);
+        int sign = value < 0 ? -1 : 1;
         value = Math.abs(value);
         if (value  > Integer.MAX_VALUE || Double.isNaN(value)) {
             throw new ArithmeticException
@@ -291,7 +291,7 @@ public final class Fraction extends Numb
             denom1 = denom2;
             i++;
 //            System.out.println(">>" + delta1 +" "+ delta2+" "+(delta1 > delta2)+" "+i+" "+denom2);
-        } while ((delta1 > delta2) && (denom2 <= 10000) && (denom2 > 0) && (i < 25));
+        } while (delta1 > delta2 && denom2 <= 10000 && denom2 > 0 && i < 25);
         if (i == 25) {
             throw new ArithmeticException("Unable to convert double to fraction");
         }
@@ -440,7 +440,7 @@ public final class Fraction extends Numb
      */
     @Override
     public float floatValue() {
-        return ((float) numerator) / ((float) denominator);
+        return (float) numerator / (float) denominator;
     }
 
     /**
@@ -451,7 +451,7 @@ public final class Fraction extends Numb
      */
     @Override
     public double doubleValue() {
-        return ((double) numerator) / ((double) denominator);
+        return (double) numerator / (double) denominator;
     }
 
     // Calculations
@@ -555,7 +555,7 @@ public final class Fraction extends Numb
             return this.invert().pow(-power);
         } else {
             Fraction f = this.multiplyBy(this);
-            if ((power % 2) == 0) { // if even...
+            if (power % 2 == 0) { // if even...
                 return f.pow(power/2);
             } else { // if odd...
                 return f.pow(power/2).multiplyBy(this);
@@ -575,8 +575,8 @@ public final class Fraction extends Numb
      */
     private static int greatestCommonDivisor(int u, int v) {
         // From Commons Math:
-        if ((u == 0) || (v == 0)) {
-            if ((u == Integer.MIN_VALUE) || (v == Integer.MIN_VALUE)) {
+        if (u == 0 || v == 0) {
+            if (u == Integer.MIN_VALUE || v == Integer.MIN_VALUE) {
                 throw new ArithmeticException("overflow: gcd is 2^31");
             }
             return Math.abs(u) + Math.abs(v);
@@ -601,7 +601,7 @@ public final class Fraction extends Numb
         }
         // B2. Initialize: u and v have been divided by 2^k and at least
         //     one is odd.
-        int t = ((u&1)==1) ? v : -(u/2)/*B3*/;
+        int t = (u&1)==1 ? v : -(u/2)/*B3*/;
         // t negative: u was odd, v may be even (t replaces v)
         // t positive: u was even, v is odd (t replaces u)
         do {
@@ -637,7 +637,7 @@ public final class Fraction extends Numb
      *                             an int
      */
     private static int mulAndCheck(int x, int y) {
-        long m = ((long)x)*((long)y);
+        long m = (long)x*(long)y;
         if (m < Integer.MIN_VALUE ||
             m > Integer.MAX_VALUE) {
             throw new ArithmeticException("overflow: mul");
@@ -656,7 +656,7 @@ public final class Fraction extends Numb
      */
     private static int mulPosAndCheck(int x, int y) {
         /* assert x>=0 && y>=0; */
-        long m = ((long)x)*((long)y);
+        long m = (long)x*(long)y;
         if (m > Integer.MAX_VALUE) {
             throw new ArithmeticException("overflow: mulPos");
         }
@@ -770,7 +770,7 @@ public final class Fraction extends Numb
         // but d2 doesn't need extra precision because
         // d2 = gcd(t,d1) = gcd(t mod d1, d1)
         int tmodd1 = t.mod(BigInteger.valueOf(d1)).intValue();
-        int d2 = (tmodd1==0)?d1:greatestCommonDivisor(tmodd1, d1);
+        int d2 = tmodd1==0?d1:greatestCommonDivisor(tmodd1, d1);
 
         // result is (t/d2) / (u'/d1)(v'/d2)
         BigInteger w = t.divide(BigInteger.valueOf(d2));
@@ -849,8 +849,8 @@ public final class Fraction extends Numb
             return false;
         }
         Fraction other = (Fraction) obj;
-        return (getNumerator() == other.getNumerator() &&
-                getDenominator() == other.getDenominator());
+        return getNumerator() == other.getNumerator() &&
+                getDenominator() == other.getDenominator();
     }
 
     /**

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/mutable/MutableDouble.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/mutable/MutableDouble.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/mutable/MutableDouble.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/mutable/MutableDouble.java Wed Nov  9 17:53:59 2011
@@ -271,8 +271,8 @@ public class MutableDouble extends Numbe
      */
     @Override
     public boolean equals(Object obj) {
-        return (obj instanceof MutableDouble)
-            && (Double.doubleToLongBits(((MutableDouble) obj).value) == Double.doubleToLongBits(value));
+        return obj instanceof MutableDouble
+            && Double.doubleToLongBits(((MutableDouble) obj).value) == Double.doubleToLongBits(value);
     }
 
     /**
@@ -283,7 +283,7 @@ public class MutableDouble extends Numbe
     @Override
     public int hashCode() {
         long bits = Double.doubleToLongBits(value);
-        return (int) (bits ^ (bits >>> 32));
+        return (int) (bits ^ bits >>> 32);
     }
 
     //-----------------------------------------------------------------------

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/mutable/MutableFloat.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/mutable/MutableFloat.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/mutable/MutableFloat.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/mutable/MutableFloat.java Wed Nov  9 17:53:59 2011
@@ -273,8 +273,8 @@ public class MutableFloat extends Number
      */
     @Override
     public boolean equals(Object obj) {
-        return (obj instanceof MutableFloat)
-            && (Float.floatToIntBits(((MutableFloat) obj).value) == Float.floatToIntBits(value));
+        return obj instanceof MutableFloat
+            && Float.floatToIntBits(((MutableFloat) obj).value) == Float.floatToIntBits(value);
     }
 
     /**

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java Wed Nov  9 17:53:59 2011
@@ -580,7 +580,7 @@ public class StrSubstitutor {
         StrMatcher suffixMatcher = getVariableSuffixMatcher();
         char escape = getEscapeChar();
 
-        boolean top = (priorVariables == null);
+        boolean top = priorVariables == null;
         boolean altered = false;
         int lengthChange = 0;
         char[] chars = buf.buffer;
@@ -656,7 +656,7 @@ public class StrSubstitutor {
                                     int change = substitute(buf, startPos,
                                             varLen, priorVariables);
                                     change = change
-                                            + (varLen - (endPos - startPos));
+                                            + varLen - (endPos - startPos);
                                     pos += change;
                                     bufEnd += change;
                                     lengthChange += change;
@@ -678,7 +678,7 @@ public class StrSubstitutor {
             }
         }
         if (top) {
-            return (altered ? 1 : 0);
+            return altered ? 1 : 0;
         }
         return lengthChange;
     }

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java Wed Nov  9 17:53:59 2011
@@ -728,7 +728,7 @@ public class StrTokenizer implements Lis
         // string or the end of the input
         workArea.clear();
         int pos = start;
-        boolean quoting = (quoteLen > 0);
+        boolean quoting = quoteLen > 0;
         int trimStart = 0;
         
         while (pos < len) {
@@ -746,7 +746,7 @@ public class StrTokenizer implements Lis
                     if (isQuote(chars, pos + quoteLen, len, quoteStart, quoteLen)) {
                         // matched pair of quotes, thus an escaped quote
                         workArea.append(chars, pos, quoteLen);
-                        pos += (quoteLen * 2);
+                        pos += quoteLen * 2;
                         trimStart = workArea.size();
                         continue;
                     }
@@ -820,7 +820,7 @@ public class StrTokenizer implements Lis
      */
     private boolean isQuote(char[] chars, int pos, int len, int quoteStart, int quoteLen) {
         for (int i = 0; i < quoteLen; i++) {
-            if ((pos + i) >= len || chars[pos + i] != chars[quoteStart + i]) {
+            if (pos + i >= len || chars[pos + i] != chars[quoteStart + i]) {
                 return false;
             }
         }

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/WordUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/WordUtils.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/WordUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/WordUtils.java Wed Nov  9 17:53:59 2011
@@ -99,7 +99,7 @@ public class WordUtils {
         int offset = 0;
         StringBuilder wrappedLine = new StringBuilder(inputLineLength + 32);
         
-        while ((inputLineLength - offset) > wrapLength) {
+        while (inputLineLength - offset > wrapLength) {
             if (str.charAt(offset) == ' ') {
                 offset++;
                 continue;
@@ -267,7 +267,7 @@ public class WordUtils {
      * @since 2.1
      */
     public static String capitalizeFully(String str, char... delimiters) {
-        int delimLen = (delimiters == null ? -1 : delimiters.length);
+        int delimLen = delimiters == null ? -1 : delimiters.length;
         if (StringUtils.isEmpty(str) || delimLen == 0) {
             return str;
         }
@@ -323,7 +323,7 @@ public class WordUtils {
      * @since 2.1
      */
     public static String uncapitalize(String str, char... delimiters) {
-        int delimLen = (delimiters == null ? -1 : delimiters.length);
+        int delimLen = delimiters == null ? -1 : delimiters.length;
         if (StringUtils.isEmpty(str) || delimLen == 0) {
             return str;
         }

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/translate/NumericEntityUnescaper.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/translate/NumericEntityUnescaper.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/translate/NumericEntityUnescaper.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/translate/NumericEntityUnescaper.java Wed Nov  9 17:53:59 2011
@@ -68,7 +68,7 @@ public class NumericEntityUnescaper exte
      * @return whether the option is set
      */
     public boolean isSet(OPTION option) { 
-        return (options == null) ? false : options.contains(option);
+        return options == null ? false : options.contains(option);
     }
 
     /**
@@ -95,14 +95,14 @@ public class NumericEntityUnescaper exte
 
             int end = start;
             // Note that this supports character codes without a ; on the end
-            while(end < seqEnd && ( (input.charAt(end) >= '0' && input.charAt(end) <= '9') ||
-                                    (input.charAt(end) >= 'a' && input.charAt(end) <= 'f') ||
-                                    (input.charAt(end) >= 'A' && input.charAt(end) <= 'F') ) )
+            while(end < seqEnd && ( input.charAt(end) >= '0' && input.charAt(end) <= '9' ||
+                                    input.charAt(end) >= 'a' && input.charAt(end) <= 'f' ||
+                                    input.charAt(end) >= 'A' && input.charAt(end) <= 'F' ) )
             {
                 end++;
             }
 
-            boolean semiNext = (end != seqEnd) && (input.charAt(end) == ';');
+            boolean semiNext = end != seqEnd && input.charAt(end) == ';';
 
             if(!semiNext) {
                 if(isSet(OPTION.semiColonRequired)) {
@@ -132,7 +132,7 @@ public class NumericEntityUnescaper exte
                 out.write(entityValue);
             }
 
-            return 2 + (end - start) + (isHex ? 1 : 0) + (semiNext ? 1 : 0);
+            return 2 + end - start + (isHex ? 1 : 0) + (semiNext ? 1 : 0);
         }
         return 0;
     }

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/translate/UnicodeUnescaper.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/translate/UnicodeUnescaper.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/translate/UnicodeUnescaper.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/translate/UnicodeUnescaper.java Wed Nov  9 17:53:59 2011
@@ -34,18 +34,18 @@ public class UnicodeUnescaper extends Ch
      */
     @Override
     public int translate(CharSequence input, int index, Writer out) throws IOException {
-        if (input.charAt(index) == '\\' && (index + 1 < input.length()) && input.charAt(index + 1) == 'u') {
+        if (input.charAt(index) == '\\' && index + 1 < input.length() && input.charAt(index + 1) == 'u') {
             // consume optional additional 'u' chars
             int i = 2;
-            while ((index + i < input.length()) && input.charAt(index + i) == 'u') {
+            while (index + i < input.length() && input.charAt(index + i) == 'u') {
                 i++;
             }
 
-            if ((index + i < input.length()) && (input.charAt(index + i) == '+')) {
+            if (index + i < input.length() && input.charAt(index + i) == '+') {
                 i++;
             }
 
-            if ((index + i + 4 <= input.length())) {
+            if (index + i + 4 <= input.length()) {
                 // Get 4 hex digits
                 CharSequence unicode = input.subSequence(index + i, index + i + 4);
 

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/StopWatch.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/StopWatch.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/StopWatch.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/StopWatch.java Wed Nov  9 17:53:59 2011
@@ -248,7 +248,7 @@ public class StopWatch {
         if (this.runningState != STATE_SUSPENDED) {
             throw new IllegalStateException("Stopwatch must be suspended to resume. ");
         }
-        this.startTime += (System.nanoTime() - this.stopTime);
+        this.startTime += System.nanoTime() - this.stopTime;
         this.runningState = STATE_RUNNING;
     }
 

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/ArrayUtilsAddTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/ArrayUtilsAddTest.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/ArrayUtilsAddTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/ArrayUtilsAddTest.java Wed Nov  9 17:53:59 2011
@@ -197,33 +197,33 @@ public class ArrayUtilsAddTest {
 
         //show that not casting is okay
         newArray = ArrayUtils.add((Object[])null, "a");
-        assertTrue(Arrays.equals((new String[]{"a"}), newArray));
-        assertTrue(Arrays.equals((new Object[]{"a"}), newArray));
+        assertTrue(Arrays.equals(new String[]{"a"}, newArray));
+        assertTrue(Arrays.equals(new Object[]{"a"}, newArray));
         assertEquals(String.class, newArray.getClass().getComponentType());
 
         //show that not casting to Object[] is okay and will assume String based on "a"
         String[] newStringArray = ArrayUtils.add(null, "a");
-        assertTrue(Arrays.equals((new String[]{"a"}), newStringArray));
-        assertTrue(Arrays.equals((new Object[]{"a"}), newStringArray));
+        assertTrue(Arrays.equals(new String[]{"a"}, newStringArray));
+        assertTrue(Arrays.equals(new Object[]{"a"}, newStringArray));
         assertEquals(String.class, newStringArray.getClass().getComponentType());
 
         String[] stringArray1 = new String[]{"a", "b", "c"};
         newArray = ArrayUtils.add(stringArray1, null);
-        assertTrue(Arrays.equals((new String[]{"a", "b", "c", null}), newArray));
+        assertTrue(Arrays.equals(new String[]{"a", "b", "c", null}, newArray));
         assertEquals(String.class, newArray.getClass().getComponentType());
 
         newArray = ArrayUtils.add(stringArray1, "d");
-        assertTrue(Arrays.equals((new String[]{"a", "b", "c", "d"}), newArray));
+        assertTrue(Arrays.equals(new String[]{"a", "b", "c", "d"}, newArray));
         assertEquals(String.class, newArray.getClass().getComponentType());
 
         Number[] numberArray1 = new Number[]{Integer.valueOf(1), Double.valueOf(2)};
         newArray = ArrayUtils.add(numberArray1, Float.valueOf(3));
-        assertTrue(Arrays.equals((new Number[]{Integer.valueOf(1), Double.valueOf(2), Float.valueOf(3)}), newArray));
+        assertTrue(Arrays.equals(new Number[]{Integer.valueOf(1), Double.valueOf(2), Float.valueOf(3)}, newArray));
         assertEquals(Number.class, newArray.getClass().getComponentType());
 
         numberArray1 = null;
         newArray = ArrayUtils.add(numberArray1, Float.valueOf(3));
-        assertTrue(Arrays.equals((new Float[]{Float.valueOf(3)}), newArray));
+        assertTrue(Arrays.equals(new Float[]{Float.valueOf(3)}, newArray));
         assertEquals(Float.class, newArray.getClass().getComponentType());
     }
     
@@ -256,31 +256,31 @@ public class ArrayUtilsAddTest {
         newArray = ArrayUtils.addAll(stringArray1, (String[]) null);
         assertNotSame(stringArray1, newArray);
         assertTrue(Arrays.equals(stringArray1, newArray));
-        assertTrue(Arrays.equals((new String[]{"a", "b", "c"}), newArray));
+        assertTrue(Arrays.equals(new String[]{"a", "b", "c"}, newArray));
         assertEquals(String.class, newArray.getClass().getComponentType());
         newArray = ArrayUtils.addAll(null, stringArray2);
         assertNotSame(stringArray2, newArray);
         assertTrue(Arrays.equals(stringArray2, newArray));
-        assertTrue(Arrays.equals((new String[]{"1", "2", "3"}), newArray));
+        assertTrue(Arrays.equals(new String[]{"1", "2", "3"}, newArray));
         assertEquals(String.class, newArray.getClass().getComponentType());
         newArray = ArrayUtils.addAll(stringArray1, stringArray2);
-        assertTrue(Arrays.equals((new String[]{"a", "b", "c", "1", "2", "3"}), newArray));
+        assertTrue(Arrays.equals(new String[]{"a", "b", "c", "1", "2", "3"}, newArray));
         assertEquals(String.class, newArray.getClass().getComponentType());
         newArray = ArrayUtils.addAll(ArrayUtils.EMPTY_STRING_ARRAY, (String[]) null);
         assertTrue(Arrays.equals(ArrayUtils.EMPTY_STRING_ARRAY, newArray));
-        assertTrue(Arrays.equals((new String[]{}), newArray));
+        assertTrue(Arrays.equals(new String[]{}, newArray));
         assertEquals(String.class, newArray.getClass().getComponentType());
         newArray = ArrayUtils.addAll(null, ArrayUtils.EMPTY_STRING_ARRAY);
         assertTrue(Arrays.equals(ArrayUtils.EMPTY_STRING_ARRAY, newArray));
-        assertTrue(Arrays.equals((new String[]{}), newArray));
+        assertTrue(Arrays.equals(new String[]{}, newArray));
         assertEquals(String.class, newArray.getClass().getComponentType());
         newArray = ArrayUtils.addAll(ArrayUtils.EMPTY_STRING_ARRAY, ArrayUtils.EMPTY_STRING_ARRAY);
         assertTrue(Arrays.equals(ArrayUtils.EMPTY_STRING_ARRAY, newArray));
-        assertTrue(Arrays.equals((new String[]{}), newArray));
+        assertTrue(Arrays.equals(new String[]{}, newArray));
         assertEquals(String.class, newArray.getClass().getComponentType());
         String[] stringArrayNull = new String []{null};
         newArray = ArrayUtils.addAll(stringArrayNull, stringArrayNull);
-        assertTrue(Arrays.equals((new String[]{null, null}), newArray));
+        assertTrue(Arrays.equals(new String[]{null, null}, newArray));
         assertEquals(String.class, newArray.getClass().getComponentType());
 
         // boolean
@@ -369,21 +369,21 @@ public class ArrayUtilsAddTest {
     public void testAddObjectAtIndex() {
         Object[] newArray;
         newArray = ArrayUtils.add((Object[])null, 0, "a");
-        assertTrue(Arrays.equals((new String[]{"a"}), newArray));
-        assertTrue(Arrays.equals((new Object[]{"a"}), newArray));
+        assertTrue(Arrays.equals(new String[]{"a"}, newArray));
+        assertTrue(Arrays.equals(new Object[]{"a"}, newArray));
         assertEquals(String.class, newArray.getClass().getComponentType());
         String[] stringArray1 = new String[]{"a", "b", "c"};
         newArray = ArrayUtils.add(stringArray1, 0, null);
-        assertTrue(Arrays.equals((new String[]{null, "a", "b", "c"}), newArray));
+        assertTrue(Arrays.equals(new String[]{null, "a", "b", "c"}, newArray));
         assertEquals(String.class, newArray.getClass().getComponentType());
         newArray = ArrayUtils.add(stringArray1, 1, null);
-        assertTrue(Arrays.equals((new String[]{"a", null, "b", "c"}), newArray));
+        assertTrue(Arrays.equals(new String[]{"a", null, "b", "c"}, newArray));
         assertEquals(String.class, newArray.getClass().getComponentType());
         newArray = ArrayUtils.add(stringArray1, 3, null);
-        assertTrue(Arrays.equals((new String[]{"a", "b", "c", null}), newArray));
+        assertTrue(Arrays.equals(new String[]{"a", "b", "c", null}, newArray));
         assertEquals(String.class, newArray.getClass().getComponentType());
         newArray = ArrayUtils.add(stringArray1, 3, "d");
-        assertTrue(Arrays.equals((new String[]{"a", "b", "c", "d"}), newArray));
+        assertTrue(Arrays.equals(new String[]{"a", "b", "c", "d"}, newArray));
         assertEquals(String.class, newArray.getClass().getComponentType());
         assertEquals(String.class, newArray.getClass().getComponentType());
 

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/BitFieldTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/BitFieldTest.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/BitFieldTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/BitFieldTest.java Wed Nov  9 17:53:59 2011
@@ -149,7 +149,7 @@ public class BitFieldTest extends TestCa
         }
         for (int j = 0; j < 128; j++) {
             assertEquals(bf_zero.getShortValue(bf_zero.setShortValue((short) 0, (short) j)), (short) 0);
-            assertEquals(bf_zero.setShortValue((short) 0, (short) j), (short) (0));
+            assertEquals(bf_zero.setShortValue((short) 0, (short) j), (short) 0);
         }
 
         // verify that excess bits are stripped off

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/CharUtilsPerfRun.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/CharUtilsPerfRun.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/CharUtilsPerfRun.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/CharUtilsPerfRun.java Wed Nov  9 17:53:59 2011
@@ -148,7 +148,7 @@ public class CharUtilsPerfRun {
         int t = 0;
         for (int i = 0; i < loopCount; i++) {
             for (char ch : CHAR_SAMPLES) {
-                boolean b = (ch >= '0' && ch <= '9');
+                boolean b = ch >= '0' && ch <= '9';
                 t += b ? 1 : 0;
             }
         }

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/RandomStringUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/RandomStringUtilsTest.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/RandomStringUtilsTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/RandomStringUtilsTest.java Wed Nov  9 17:53:59 2011
@@ -286,7 +286,7 @@ public class RandomStringUtilsTest exten
         double sumSq = 0.0d;
         double dev = 0.0d;
         for (int i = 0; i < observed.length; i++) {
-            dev = (observed[i] - expected[i]);
+            dev = observed[i] - expected[i];
             sumSq += dev * dev / expected[i];
         }
         return sumSq;
@@ -311,8 +311,8 @@ public class RandomStringUtilsTest exten
         for (int i=0; i < orig.length() && i < copy.length(); i++) {
             char o = orig.charAt(i);
             char c = copy.charAt(i);
-            assertEquals("differs at " + i + "(" + Integer.toHexString((new Character(o)).hashCode()) + "," +
-            Integer.toHexString((new Character(c)).hashCode()) + ")", o, c);
+            assertEquals("differs at " + i + "(" + Integer.toHexString(new Character(o).hashCode()) + "," +
+            Integer.toHexString(new Character(c).hashCode()) + ")", o, c);
         }
         // compare length also
         assertEquals(orig.length(), copy.length());

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/CompareToBuilderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/CompareToBuilderTest.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/CompareToBuilderTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/CompareToBuilderTest.java Wed Nov  9 17:53:59 2011
@@ -46,7 +46,7 @@ public class CompareToBuilderTest {
                 return false;
             }
             TestObject rhs = (TestObject) o;
-            return (a == rhs.a);
+            return a == rhs.a;
         }
 
         public void setA(int a) {
@@ -57,7 +57,7 @@ public class CompareToBuilderTest {
             return a;
         }
         public int compareTo(TestObject rhs) {
-            return (a < rhs.a) ? -1 : (a > rhs.a) ? +1 : 0;
+            return a < rhs.a ? -1 : a > rhs.a ? +1 : 0;
         }
     }
 
@@ -79,7 +79,7 @@ public class CompareToBuilderTest {
                 return false;
             }
             TestSubObject rhs = (TestSubObject) o;
-            return super.equals(o) && (b == rhs.b);
+            return super.equals(o) && b == rhs.b;
         }
     }
 
@@ -231,7 +231,7 @@ public class CompareToBuilderTest {
         }
         
         // strongly recommended but not strictly required
-        assertTrue((CompareToBuilder.reflectionCompare(x, y, testTransients) ==0 ) == EqualsBuilder.reflectionEquals(x, y, testTransients));
+        assertTrue(CompareToBuilder.reflectionCompare(x, y, testTransients) ==0 == EqualsBuilder.reflectionEquals(x, y, testTransients));
     }
     
     /**
@@ -823,9 +823,9 @@ public class CompareToBuilderTest {
         float[][] array3 = new float[2][3];
         for (int i = 0; i < array1.length; ++i) {
             for (int j = 0; j < array1[0].length; j++) {
-                array1[i][j] = ((i + 1) * (j + 1));
-                array2[i][j] = ((i + 1) * (j + 1));
-                array3[i][j] = ((i + 1) * (j + 1));
+                array1[i][j] = (i + 1) * (j + 1);
+                array2[i][j] = (i + 1) * (j + 1);
+                array3[i][j] = (i + 1) * (j + 1);
             }
         }
         array3[1][2] = 100;
@@ -847,9 +847,9 @@ public class CompareToBuilderTest {
         double[][] array3 = new double[2][3];
         for (int i = 0; i < array1.length; ++i) {
             for (int j = 0; j < array1[0].length; j++) {
-                array1[i][j] = ((i + 1) * (j + 1));
-                array2[i][j] = ((i + 1) * (j + 1));
-                array3[i][j] = ((i + 1) * (j + 1));
+                array1[i][j] = (i + 1) * (j + 1);
+                array2[i][j] = (i + 1) * (j + 1);
+                array3[i][j] = (i + 1) * (j + 1);
             }
         }
         array3[1][2] = 100;
@@ -871,9 +871,9 @@ public class CompareToBuilderTest {
         boolean[][] array3 = new boolean[2][3];
         for (int i = 0; i < array1.length; ++i) {
             for (int j = 0; j < array1[0].length; j++) {
-                array1[i][j] = ((i == 1) ^ (j == 1));
-                array2[i][j] = ((i == 1) ^ (j == 1));
-                array3[i][j] = ((i == 1) ^ (j == 1));
+                array1[i][j] = i == 1 ^ j == 1;
+                array2[i][j] = i == 1 ^ j == 1;
+                array3[i][j] = i == 1 ^ j == 1;
             }
         }
         array3[1][2] = false;

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/EqualsBuilderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/EqualsBuilderTest.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/EqualsBuilderTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/EqualsBuilderTest.java Wed Nov  9 17:53:59 2011
@@ -50,7 +50,7 @@ public class EqualsBuilderTest {
             }
 
             TestObject rhs = (TestObject) o;
-            return (a == rhs.a);
+            return a == rhs.a;
         }
 
         public void setA(int a) {
@@ -80,7 +80,7 @@ public class EqualsBuilderTest {
             }
 
             TestSubObject rhs = (TestSubObject) o;
-            return super.equals(o) && (b == rhs.b);
+            return super.equals(o) && b == rhs.b;
         }
 
         public void setB(int b) {
@@ -712,8 +712,8 @@ public class EqualsBuilderTest {
         boolean[][] array2 = new boolean[2][2];
         for (int i = 0; i < array1.length; ++i) {
             for (int j = 0; j < array1[0].length; j++) {
-                array1[i][j] = (i == 1) || (j == 1);
-                array2[i][j] = (i == 1) || (j == 1);
+                array1[i][j] = i == 1 || j == 1;
+                array2[i][j] = i == 1 || j == 1;
             }
         }
         assertTrue(new EqualsBuilder().append(array1, array1).isEquals());

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/HashCodeBuilderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/HashCodeBuilderTest.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/HashCodeBuilderTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/HashCodeBuilderTest.java Wed Nov  9 17:53:59 2011
@@ -94,7 +94,7 @@ public class HashCodeBuilderTest {
                 return false;
             }
             TestObject rhs = (TestObject) o;
-            return (a == rhs.a);
+            return a == rhs.a;
         }
 
         public void setA(int a) {
@@ -131,7 +131,7 @@ public class HashCodeBuilderTest {
                 return false;
             }
             TestSubObject rhs = (TestSubObject) o;
-            return super.equals(o) && (b == rhs.b);
+            return super.equals(o) && b == rhs.b;
         }
     }
 
@@ -204,7 +204,7 @@ public class HashCodeBuilderTest {
     @Test
     public void testSuper() {
         Object obj = new Object();
-        assertEquals(17 * 37 + (19 * 41 + obj.hashCode()), new HashCodeBuilder(17, 37).appendSuper(
+        assertEquals(17 * 37 + 19 * 41 + obj.hashCode(), new HashCodeBuilder(17, 37).appendSuper(
                 new HashCodeBuilder(19, 41).append(obj).toHashCode()).toHashCode());
     }
 
@@ -228,7 +228,7 @@ public class HashCodeBuilderTest {
     @SuppressWarnings("cast") // cast is not really needed, keep for consistency
     public void testLong() {
         assertEquals(17 * 37, new HashCodeBuilder(17, 37).append((long) 0L).toHashCode());
-        assertEquals(17 * 37 + (int) (123456789L ^ (123456789L >> 32)), new HashCodeBuilder(17, 37).append(
+        assertEquals(17 * 37 + (int) (123456789L ^ 123456789L >> 32), new HashCodeBuilder(17, 37).append(
                 (long) 123456789L).toHashCode());
     }
 
@@ -263,7 +263,7 @@ public class HashCodeBuilderTest {
         assertEquals(17 * 37, new HashCodeBuilder(17, 37).append((double) 0d).toHashCode());
         double d = 1234567.89;
         long l = Double.doubleToLongBits(d);
-        assertEquals(17 * 37 + (int) (l ^ (l >> 32)), new HashCodeBuilder(17, 37).append(d).toHashCode());
+        assertEquals(17 * 37 + (int) (l ^ l >> 32), new HashCodeBuilder(17, 37).append(d).toHashCode());
     }
 
     @Test
@@ -285,7 +285,7 @@ public class HashCodeBuilderTest {
     public void testObjectArray() {
         assertEquals(17 * 37, new HashCodeBuilder(17, 37).append((Object[]) null).toHashCode());
         Object[] obj = new Object[2];
-        assertEquals((17 * 37) * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
+        assertEquals(17 * 37 * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
         obj[0] = new Object();
         assertEquals((17 * 37 + obj[0].hashCode()) * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
         obj[1] = new Object();
@@ -296,7 +296,7 @@ public class HashCodeBuilderTest {
     @Test
     public void testObjectArrayAsObject() {
         Object[] obj = new Object[2];
-        assertEquals((17 * 37) * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
+        assertEquals(17 * 37 * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
         obj[0] = new Object();
         assertEquals((17 * 37 + obj[0].hashCode()) * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
         obj[1] = new Object();
@@ -308,24 +308,24 @@ public class HashCodeBuilderTest {
     public void testLongArray() {
         assertEquals(17 * 37, new HashCodeBuilder(17, 37).append((long[]) null).toHashCode());
         long[] obj = new long[2];
-        assertEquals((17 * 37) * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
+        assertEquals(17 * 37 * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
         obj[0] = 5L;
-        int h1 = (int) (5L ^ (5L >> 32));
+        int h1 = (int) (5L ^ 5L >> 32);
         assertEquals((17 * 37 + h1) * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
         obj[1] = 6L;
-        int h2 = (int) (6L ^ (6L >> 32));
+        int h2 = (int) (6L ^ 6L >> 32);
         assertEquals((17 * 37 + h1) * 37 + h2, new HashCodeBuilder(17, 37).append(obj).toHashCode());
     }
 
     @Test
     public void testLongArrayAsObject() {
         long[] obj = new long[2];
-        assertEquals((17 * 37) * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
+        assertEquals(17 * 37 * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
         obj[0] = 5L;
-        int h1 = (int) (5L ^ (5L >> 32));
+        int h1 = (int) (5L ^ 5L >> 32);
         assertEquals((17 * 37 + h1) * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
         obj[1] = 6L;
-        int h2 = (int) (6L ^ (6L >> 32));
+        int h2 = (int) (6L ^ 6L >> 32);
         assertEquals((17 * 37 + h1) * 37 + h2, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
     }
 
@@ -333,7 +333,7 @@ public class HashCodeBuilderTest {
     public void testIntArray() {
         assertEquals(17 * 37, new HashCodeBuilder(17, 37).append((int[]) null).toHashCode());
         int[] obj = new int[2];
-        assertEquals((17 * 37) * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
+        assertEquals(17 * 37 * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
         obj[0] = 5;
         assertEquals((17 * 37 + 5) * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
         obj[1] = 6;
@@ -343,7 +343,7 @@ public class HashCodeBuilderTest {
     @Test
     public void testIntArrayAsObject() {
         int[] obj = new int[2];
-        assertEquals((17 * 37) * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
+        assertEquals(17 * 37 * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
         obj[0] = 5;
         assertEquals((17 * 37 + 5) * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
         obj[1] = 6;
@@ -354,7 +354,7 @@ public class HashCodeBuilderTest {
     public void testShortArray() {
         assertEquals(17 * 37, new HashCodeBuilder(17, 37).append((short[]) null).toHashCode());
         short[] obj = new short[2];
-        assertEquals((17 * 37) * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
+        assertEquals(17 * 37 * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
         obj[0] = (short) 5;
         assertEquals((17 * 37 + 5) * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
         obj[1] = (short) 6;
@@ -364,7 +364,7 @@ public class HashCodeBuilderTest {
     @Test
     public void testShortArrayAsObject() {
         short[] obj = new short[2];
-        assertEquals((17 * 37) * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
+        assertEquals(17 * 37 * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
         obj[0] = (short) 5;
         assertEquals((17 * 37 + 5) * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
         obj[1] = (short) 6;
@@ -375,7 +375,7 @@ public class HashCodeBuilderTest {
     public void testCharArray() {
         assertEquals(17 * 37, new HashCodeBuilder(17, 37).append((char[]) null).toHashCode());
         char[] obj = new char[2];
-        assertEquals((17 * 37) * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
+        assertEquals(17 * 37 * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
         obj[0] = (char) 5;
         assertEquals((17 * 37 + 5) * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
         obj[1] = (char) 6;
@@ -385,7 +385,7 @@ public class HashCodeBuilderTest {
     @Test
     public void testCharArrayAsObject() {
         char[] obj = new char[2];
-        assertEquals((17 * 37) * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
+        assertEquals(17 * 37 * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
         obj[0] = (char) 5;
         assertEquals((17 * 37 + 5) * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
         obj[1] = (char) 6;
@@ -396,7 +396,7 @@ public class HashCodeBuilderTest {
     public void testByteArray() {
         assertEquals(17 * 37, new HashCodeBuilder(17, 37).append((byte[]) null).toHashCode());
         byte[] obj = new byte[2];
-        assertEquals((17 * 37) * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
+        assertEquals(17 * 37 * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
         obj[0] = (byte) 5;
         assertEquals((17 * 37 + 5) * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
         obj[1] = (byte) 6;
@@ -406,7 +406,7 @@ public class HashCodeBuilderTest {
     @Test
     public void testByteArrayAsObject() {
         byte[] obj = new byte[2];
-        assertEquals((17 * 37) * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
+        assertEquals(17 * 37 * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
         obj[0] = (byte) 5;
         assertEquals((17 * 37 + 5) * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
         obj[1] = (byte) 6;
@@ -417,28 +417,28 @@ public class HashCodeBuilderTest {
     public void testDoubleArray() {
         assertEquals(17 * 37, new HashCodeBuilder(17, 37).append((double[]) null).toHashCode());
         double[] obj = new double[2];
-        assertEquals((17 * 37) * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
+        assertEquals(17 * 37 * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
         obj[0] = 5.4d;
         long l1 = Double.doubleToLongBits(5.4d);
-        int h1 = (int) (l1 ^ (l1 >> 32));
+        int h1 = (int) (l1 ^ l1 >> 32);
         assertEquals((17 * 37 + h1) * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
         obj[1] = 6.3d;
         long l2 = Double.doubleToLongBits(6.3d);
-        int h2 = (int) (l2 ^ (l2 >> 32));
+        int h2 = (int) (l2 ^ l2 >> 32);
         assertEquals((17 * 37 + h1) * 37 + h2, new HashCodeBuilder(17, 37).append(obj).toHashCode());
     }
 
     @Test
     public void testDoubleArrayAsObject() {
         double[] obj = new double[2];
-        assertEquals((17 * 37) * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
+        assertEquals(17 * 37 * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
         obj[0] = 5.4d;
         long l1 = Double.doubleToLongBits(5.4d);
-        int h1 = (int) (l1 ^ (l1 >> 32));
+        int h1 = (int) (l1 ^ l1 >> 32);
         assertEquals((17 * 37 + h1) * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
         obj[1] = 6.3d;
         long l2 = Double.doubleToLongBits(6.3d);
-        int h2 = (int) (l2 ^ (l2 >> 32));
+        int h2 = (int) (l2 ^ l2 >> 32);
         assertEquals((17 * 37 + h1) * 37 + h2, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
     }
 
@@ -446,7 +446,7 @@ public class HashCodeBuilderTest {
     public void testFloatArray() {
         assertEquals(17 * 37, new HashCodeBuilder(17, 37).append((float[]) null).toHashCode());
         float[] obj = new float[2];
-        assertEquals((17 * 37) * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
+        assertEquals(17 * 37 * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
         obj[0] = 5.4f;
         int h1 = Float.floatToIntBits(5.4f);
         assertEquals((17 * 37 + h1) * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
@@ -458,7 +458,7 @@ public class HashCodeBuilderTest {
     @Test
     public void testFloatArrayAsObject() {
         float[] obj = new float[2];
-        assertEquals((17 * 37) * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
+        assertEquals(17 * 37 * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
         obj[0] = 5.4f;
         int h1 = Float.floatToIntBits(5.4f);
         assertEquals((17 * 37 + h1) * 37, new HashCodeBuilder(17, 37).append((Object) obj).toHashCode());
@@ -491,7 +491,7 @@ public class HashCodeBuilderTest {
     @Test
     public void testBooleanMultiArray() {
         boolean[][] obj = new boolean[2][];
-        assertEquals((17 * 37) * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
+        assertEquals(17 * 37 * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
         obj[0] = new boolean[0];
         assertEquals(17 * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
         obj[0] = new boolean[1];
@@ -501,23 +501,23 @@ public class HashCodeBuilderTest {
         obj[0][0] = true;
         assertEquals(((17 * 37 + 0) * 37 + 1) * 37, new HashCodeBuilder(17, 37).append(obj).toHashCode());
         obj[1] = new boolean[1];
-        assertEquals((((17 * 37 + 0) * 37 + 1) * 37 + 1), new HashCodeBuilder(17, 37).append(obj).toHashCode());
+        assertEquals(((17 * 37 + 0) * 37 + 1) * 37 + 1, new HashCodeBuilder(17, 37).append(obj).toHashCode());
     }
 
     @Test
     public void testReflectionHashCodeExcludeFields() throws Exception {
         TestObjectWithMultipleFields x = new TestObjectWithMultipleFields(1, 2, 3);
 
-        assertEquals((((17 * 37 + 1) * 37 + 2) * 37 + 3), HashCodeBuilder.reflectionHashCode(x));
+        assertEquals(((17 * 37 + 1) * 37 + 2) * 37 + 3, HashCodeBuilder.reflectionHashCode(x));
 
-        assertEquals((((17 * 37 + 1) * 37 + 2) * 37 + 3), HashCodeBuilder.reflectionHashCode(x, (String[]) null));
-        assertEquals((((17 * 37 + 1) * 37 + 2) * 37 + 3), HashCodeBuilder.reflectionHashCode(x, new String[]{}));
-        assertEquals((((17 * 37 + 1) * 37 + 2) * 37 + 3), HashCodeBuilder.reflectionHashCode(x, new String[]{"xxx"}));
+        assertEquals(((17 * 37 + 1) * 37 + 2) * 37 + 3, HashCodeBuilder.reflectionHashCode(x, (String[]) null));
+        assertEquals(((17 * 37 + 1) * 37 + 2) * 37 + 3, HashCodeBuilder.reflectionHashCode(x, new String[]{}));
+        assertEquals(((17 * 37 + 1) * 37 + 2) * 37 + 3, HashCodeBuilder.reflectionHashCode(x, new String[]{"xxx"}));
 
-        assertEquals(((17 * 37 + 1) * 37 + 3), HashCodeBuilder.reflectionHashCode(x, new String[]{"two"}));
-        assertEquals(((17 * 37 + 1) * 37 + 2), HashCodeBuilder.reflectionHashCode(x, new String[]{"three"}));
+        assertEquals((17 * 37 + 1) * 37 + 3, HashCodeBuilder.reflectionHashCode(x, new String[]{"two"}));
+        assertEquals((17 * 37 + 1) * 37 + 2, HashCodeBuilder.reflectionHashCode(x, new String[]{"three"}));
 
-        assertEquals((17 * 37 + 1), HashCodeBuilder.reflectionHashCode(x, new String[]{"two", "three"}));
+        assertEquals(17 * 37 + 1, HashCodeBuilder.reflectionHashCode(x, new String[]{"two", "three"}));
 
         assertEquals(17, HashCodeBuilder.reflectionHashCode(x, new String[]{"one", "two", "three"}));
         assertEquals(17, HashCodeBuilder.reflectionHashCode(x, new String[]{"one", "two", "three", "xxx"}));

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/TimedSemaphoreTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/TimedSemaphoreTest.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/TimedSemaphoreTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/TimedSemaphoreTest.java Wed Nov  9 17:53:59 2011
@@ -428,7 +428,7 @@ public class TimedSemaphoreTest {
          */
         @Override
         protected ScheduledFuture<?> startTimer() {
-            return (schedFuture != null) ? schedFuture : super.startTimer();
+            return schedFuture != null ? schedFuture : super.startTimer();
         }
     }
 

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/text/StrTokenizerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/text/StrTokenizerTest.java?rev=1199894&r1=1199893&r2=1199894&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/text/StrTokenizerTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/text/StrTokenizerTest.java Wed Nov  9 17:53:59 2011
@@ -551,12 +551,12 @@ public class StrTokenizerTest extends Te
      * <code>null</code>.
      */
     public void testCloneNotSupportedException() {
-        Object notCloned = (new StrTokenizer() {
+        Object notCloned = new StrTokenizer() {
             @Override
             Object cloneReset() throws CloneNotSupportedException {
                 throw new CloneNotSupportedException("test");
             }
-        }).clone();
+        }.clone();
         assertNull(notCloned);
     }
 



Mime
View raw message