commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1429897 [1/2] - in /commons/proper/collections/trunk/src: main/java/org/apache/commons/collections/ main/java/org/apache/commons/collections/bag/ main/java/org/apache/commons/collections/bidimap/ main/java/org/apache/commons/collections/bu...
Date Mon, 07 Jan 2013 17:04:53 GMT
Author: ggregory
Date: Mon Jan  7 17:04:52 2013
New Revision: 1429897

URL: http://svn.apache.org/viewvc?rev=1429897&view=rev
Log:
Remove unnecessary parentheses (except for some bit expressions.)

Modified:
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/CollectionUtils.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/ComparatorUtils.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/ExtendedProperties.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/MapUtils.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/AbstractMapBag.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bidimap/TreeBidiMap.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/BlockingBuffer.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/BoundedBuffer.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/BoundedFifoBuffer.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/PriorityBuffer.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/UnboundedFifoBuffer.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/ComparableComparator.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/ComparatorChain.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/FixedOrderComparator.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/NullComparator.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/TransformingComparator.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/sequence/SequencesComparator.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/AndPredicate.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/ComparatorPredicate.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/IdentityPredicate.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/InstanceofPredicate.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/InstantiateFactory.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NotNullPredicate.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NotPredicate.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NullPredicate.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/OrPredicate.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ArrayIterator.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ArrayListIterator.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/FilterListIterator.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/LoopingIterator.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ObjectArrayIterator.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ObjectArrayListIterator.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/SingletonIterator.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/SingletonListIterator.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/AbstractLinkedList.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/CursorableLinkedList.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/GrowthList.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/SetUniqueList.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/TreeList.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractHashedMap.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractLinkedMap.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractReferenceMap.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/CompositeMap.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/Flat3Map.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/IdentityMap.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LRUMap.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiKeyMap.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiValueMap.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PassiveExpiringMap.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PredicatedMap.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/SingletonMap.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/TransformedMap.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/set/CompositeSet.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/set/MapBackedSet.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/AbstractKeyAnalyzer.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/AbstractTrie.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/ByteArrayKeyAnalyzer.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/ByteKeyAnalyzer.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/CharArrayKeyAnalyzer.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/CharacterKeyAnalyzer.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/IntegerKeyAnalyzer.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/LongKeyAnalyzer.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/PatriciaTrie.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/PatriciaTrieBase.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/ShortKeyAnalyzer.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/StringKeyAnalyzer.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/CollectionUtilsTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/ExtendedPropertiesTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/ListUtilsTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/MockTestCase.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/AbstractBagTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/collection/AbstractCollectionTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/comparators/BooleanComparatorTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractMapIteratorTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayIterator2Test.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayIteratorTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayListIteratorTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/CollatingIteratorTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/IteratorChainTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ListIteratorWrapper2Test.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ListIteratorWrapperTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayIteratorTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayListIteratorTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonIterator2Test.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonIteratorTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonListIteratorTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UniqueFilterIteratorTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/AbstractListTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/CursorableLinkedListTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/SetUniqueListTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/AbstractMapTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/PredicatedMapTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/PredicatedSortedMapTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/set/ListOrderedSetTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/set/PredicatedSortedSetTest.java

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/CollectionUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/CollectionUtils.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/CollectionUtils.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/CollectionUtils.java Mon Jan  7 17:04:52 2013
@@ -384,7 +384,7 @@ public class CollectionUtils {
      * @see Collection#containsAll
      */
     public static boolean isProperSubCollection(final Collection<?> a, final Collection<?> b) {
-        return (a.size() < b.size()) && CollectionUtils.isSubCollection(a, b);
+        return a.size() < b.size() && CollectionUtils.isSubCollection(a, b);
     }
 
     /**
@@ -425,7 +425,7 @@ public class CollectionUtils {
      */
     public static <O> int cardinality(O obj, final Iterable<? super O> coll) {
         if (coll instanceof Set<?>) {
-            return (((Set<? super O>) coll).contains(obj) ? 1 : 0);
+            return ((Set<? super O>) coll).contains(obj) ? 1 : 0;
         }
         if (coll instanceof Bag<?>) {
             return ((Bag<? super O>) coll).getCount(obj);
@@ -827,7 +827,7 @@ public class CollectionUtils {
         if (collection == null) {
             throw new NullPointerException("The collection must not be null");
         }
-        return (object != null && collection.add(object));
+        return object != null && collection.add(object);
     }
 
     /**
@@ -1153,7 +1153,7 @@ public class CollectionUtils {
      * @since 3.2
      */
     public static boolean isEmpty(Collection<?> coll) {
-        return (coll == null || coll.isEmpty());
+        return coll == null || coll.isEmpty();
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/ComparatorUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/ComparatorUtils.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/ComparatorUtils.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/ComparatorUtils.java Mon Jan  7 17:04:52 2013
@@ -220,7 +220,7 @@ public class ComparatorUtils {
             comparator = NATURAL_COMPARATOR;
         }
         int c = comparator.compare(o1, o2);
-        return (c < 0) ? o1 : o2;
+        return c < 0 ? o1 : o2;
     }
 
     /**
@@ -239,7 +239,7 @@ public class ComparatorUtils {
             comparator = NATURAL_COMPARATOR;
         }
         int c = comparator.compare(o1, o2);
-        return (c > 0) ? o1 : o2;
+        return c > 0 ? o1 : o2;
     }
     
 }

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/ExtendedProperties.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/ExtendedProperties.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/ExtendedProperties.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/ExtendedProperties.java Mon Jan  7 17:04:52 2013
@@ -190,7 +190,7 @@ public class ExtendedProperties extends 
      */
     protected String interpolate(String base) {
         // COPIED from [configuration] 2003-12-29
-        return (interpolateHelper(base, null));
+        return interpolateHelper(base, null);
     }
 
     /**
@@ -227,8 +227,8 @@ public class ExtendedProperties extends 
         StringBuilder result = new StringBuilder();
 
         // FIXME: we should probably allow the escaping of the start token
-        while (((begin = base.indexOf(START_TOKEN, prec + END_TOKEN.length())) > -1)
-            && ((end = base.indexOf(END_TOKEN, begin)) > -1)) {
+        while ((begin = base.indexOf(START_TOKEN, prec + END_TOKEN.length())) > -1
+            && (end = base.indexOf(END_TOKEN, begin)) > -1) {
             result.append(base.substring(prec + END_TOKEN.length(), begin));
             variable = base.substring(begin + START_TOKEN.length(), end);
 
@@ -329,7 +329,7 @@ public class ExtendedProperties extends 
         if (!line.endsWith("\\")) {
             return false;
         }
-        return (countPreceding(line, line.length() - 1, '\\') % 2 == 0);
+        return countPreceding(line, line.length() - 1, '\\') % 2 == 0;
     }
 
     /**
@@ -359,7 +359,7 @@ public class ExtendedProperties extends 
             String line = readLine();
             while (line != null) {
                 line = line.trim();
-                if ((line.length() != 0) && (line.charAt(0) != '#')) {
+                if (line.length() != 0 && line.charAt(0) != '#') {
                     if (endsWithSlash(line)) {
                         line = line.substring(0, line.length() - 1);
                         buffer.append(line);
@@ -795,7 +795,7 @@ public class ExtendedProperties extends 
             // we also need to rebuild the keysAsListed or else
             // things get *very* confusing
             for (int i = 0; i < keysAsListed.size(); i++) {
-                if (( keysAsListed.get(i)).equals(key)) {
+                if (keysAsListed.get(i).equals(key)) {
                     keysAsListed.remove(i);
                     break;
                 }
@@ -1071,7 +1071,7 @@ public class ExtendedProperties extends 
             if (defaults != null) {
                 return defaults.getVector(key, defaultValue);
             } else {
-                return ((defaultValue == null) ? new Vector<String>() : defaultValue);
+                return defaultValue == null ? new Vector<String>() : defaultValue;
             }
         } else {
             throw new ClassCastException('\'' + key + "' doesn't map to a Vector object");
@@ -1125,7 +1125,7 @@ public class ExtendedProperties extends 
             if (defaults != null) {
                 return defaults.getList(key, defaultValue);
             } else {
-                return ((defaultValue == null) ? new ArrayList<String>() : defaultValue);
+                return defaultValue == null ? new ArrayList<String>() : defaultValue;
             }
         } else {
             throw new ClassCastException('\'' + key + "' doesn't map to a List object");

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/MapUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/MapUtils.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/MapUtils.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/MapUtils.java Mon Jan  7 17:04:52 2013
@@ -161,7 +161,7 @@ public class MapUtils {
                 }
                 if (answer instanceof Number) {
                     Number n = (Number) answer;
-                    return (n.intValue() != 0) ? Boolean.TRUE : Boolean.FALSE;
+                    return n.intValue() != 0 ? Boolean.TRUE : Boolean.FALSE;
                 }
             }
         }
@@ -986,7 +986,7 @@ public class MapUtils {
             if (childValue instanceof Map && !lineage.contains(childValue)) {
                 verbosePrintInternal(
                     out,
-                    (childKey == null ? "null" : childKey),
+                    childKey == null ? "null" : childKey,
                     (Map<?, ?>) childValue,
                     lineage,
                     debug);
@@ -1186,7 +1186,7 @@ public class MapUtils {
      * @since 3.2
      */
     public static boolean isEmpty(Map<?,?> map) {
-        return (map == null || map.isEmpty());
+        return map == null || map.isEmpty();
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/AbstractMapBag.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/AbstractMapBag.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/AbstractMapBag.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/AbstractMapBag.java Mon Jan  7 17:04:52 2013
@@ -194,7 +194,7 @@ public abstract class AbstractMapBag<E> 
 
         /** {@inheritDoc} */
         public boolean hasNext() {
-            return (itemCount > 0 || entryIterator.hasNext());
+            return itemCount > 0 || entryIterator.hasNext();
         }
 
         /** {@inheritDoc} */

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bidimap/TreeBidiMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bidimap/TreeBidiMap.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bidimap/TreeBidiMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bidimap/TreeBidiMap.java Mon Jan  7 17:04:52 2013
@@ -141,7 +141,7 @@ public class TreeBidiMap<K extends Compa
      * @return true if the map is empty
      */
     public boolean isEmpty() {
-        return (nodeCount == 0);
+        return nodeCount == 0;
     }
 
     /**
@@ -156,7 +156,7 @@ public class TreeBidiMap<K extends Compa
      */
     public boolean containsKey(final Object key) {
         checkKey(key);
-        return (lookupKey(key) != null);
+        return lookupKey(key) != null;
     }
 
     /**
@@ -171,7 +171,7 @@ public class TreeBidiMap<K extends Compa
      */
     public boolean containsValue(final Object value) {
         checkValue(value);
-        return (lookupValue(value) != null);
+        return lookupValue(value) != null;
     }
 
     /**
@@ -566,7 +566,7 @@ public class TreeBidiMap<K extends Compa
                 rval = node;
                 break;
             } else {
-                node = (cmp < 0) ? node.getLeft(dataElement) : node.getRight(dataElement);
+                node = cmp < 0 ? node.getLeft(dataElement) : node.getRight(dataElement);
             }
         }
 
@@ -606,7 +606,7 @@ public class TreeBidiMap<K extends Compa
             Node<K, V> parent = node.getParent(dataElement);
             Node<K, V> child = node;
 
-            while ((parent != null) && (child == parent.getRight(dataElement))) {
+            while (parent != null && child == parent.getRight(dataElement)) {
                 child = parent;
                 parent = parent.getParent(dataElement);
             }
@@ -640,7 +640,7 @@ public class TreeBidiMap<K extends Compa
             Node<K, V> parent = node.getParent(dataElement);
             Node<K, V> child = node;
 
-            while ((parent != null) && (child == parent.getLeft(dataElement))) {
+            while (parent != null && child == parent.getLeft(dataElement)) {
                 child = parent;
                 parent = parent.getParent(dataElement);
             }
@@ -874,9 +874,9 @@ public class TreeBidiMap<K extends Compa
         Node<K, V> currentNode = insertedNode;
         makeRed(currentNode, dataElement);
 
-        while ((currentNode != null)
-            && (currentNode != rootNode[dataElement.ordinal()])
-            && (isRed(currentNode.getParent(dataElement), dataElement))) {
+        while (currentNode != null
+            && currentNode != rootNode[dataElement.ordinal()]
+            && isRed(currentNode.getParent(dataElement), dataElement)) {
             if (currentNode.isLeftChild(dataElement)) {
                 Node<K, V> y = getRightChild(getGrandParent(currentNode, dataElement), dataElement);
 
@@ -943,12 +943,12 @@ public class TreeBidiMap<K extends Compa
         for (DataElement dataElement : DataElement.values()) {
             // if deleted node has both left and children, swap with
             // the next greater node
-            if ((deletedNode.getLeft(dataElement) != null) && (deletedNode.getRight(dataElement) != null)) {
+            if (deletedNode.getLeft(dataElement) != null && deletedNode.getRight(dataElement) != null) {
                 swapPosition(nextGreater(deletedNode, dataElement), deletedNode, dataElement);
             }
 
-            Node<K, V> replacement = ((deletedNode.getLeft(dataElement) != null) ?
-                    deletedNode.getLeft(dataElement) : deletedNode.getRight(dataElement));
+            Node<K, V> replacement = deletedNode.getLeft(dataElement) != null ?
+                    deletedNode.getLeft(dataElement) : deletedNode.getRight(dataElement);
 
             if (replacement != null) {
                 replacement.setParent(deletedNode.getParent(dataElement), dataElement);
@@ -1009,7 +1009,7 @@ public class TreeBidiMap<K extends Compa
     private void doRedBlackDeleteFixup(final Node<K, V> replacementNode, final DataElement dataElement) {
         Node<K, V> currentNode = replacementNode;
 
-        while ((currentNode != rootNode[dataElement.ordinal()]) && (isBlack(currentNode, dataElement))) {
+        while (currentNode != rootNode[dataElement.ordinal()] && isBlack(currentNode, dataElement)) {
             if (currentNode.isLeftChild(dataElement)) {
                 Node<K, V> siblingNode = getRightChild(getParent(currentNode, dataElement), dataElement);
 
@@ -1098,9 +1098,9 @@ public class TreeBidiMap<K extends Compa
         Node<K, V> yFormerLeftChild = y.getLeft(dataElement);
         Node<K, V> yFormerRightChild = y.getRight(dataElement);
         boolean xWasLeftChild =
-                (x.getParent(dataElement) != null) && (x == x.getParent(dataElement).getLeft(dataElement));
+                x.getParent(dataElement) != null && x == x.getParent(dataElement).getLeft(dataElement);
         boolean yWasLeftChild =
-                (y.getParent(dataElement) != null) && (y == y.getParent(dataElement).getLeft(dataElement));
+                y.getParent(dataElement) != null && y == y.getParent(dataElement).getLeft(dataElement);
 
         // Swap, handling special cases of one being the other's parent.
         if (x == yFormerParent) { // x was y's parent
@@ -1355,7 +1355,7 @@ public class TreeBidiMap<K extends Compa
             for (MapIterator<?, ?> it = getMapIterator(dataElement); it.hasNext(); ) {
                 Object key = it.next();
                 Object value = it.getValue();
-                total += (key.hashCode() ^ value.hashCode());
+                total += key.hashCode() ^ value.hashCode();
             }
         }
         return total;
@@ -1450,7 +1450,7 @@ public class TreeBidiMap<K extends Compa
         @Override
         public boolean contains(final Object obj) {
             checkNonNullComparable(obj, KEY);
-            return (lookupKey(obj) != null);
+            return lookupKey(obj) != null;
         }
 
         @Override
@@ -1477,7 +1477,7 @@ public class TreeBidiMap<K extends Compa
         @Override
         public boolean contains(final Object obj) {
             checkNonNullComparable(obj, VALUE);
-            return (lookupValue(obj) != null);
+            return lookupValue(obj) != null;
         }
 
         @Override

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/BlockingBuffer.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/BlockingBuffer.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/BlockingBuffer.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/BlockingBuffer.java Mon Jan  7 17:04:52 2013
@@ -100,7 +100,7 @@ public class BlockingBuffer<E> extends S
      */
     protected BlockingBuffer(Buffer<E> buffer, long timeoutMillis) {
         super(buffer);
-        this.timeout = (timeoutMillis < 0 ? 0 : timeoutMillis);
+        this.timeout = timeoutMillis < 0 ? 0 : timeoutMillis;
     }
 
     //-----------------------------------------------------------------------

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/BoundedBuffer.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/BoundedBuffer.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/BoundedBuffer.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/BoundedBuffer.java Mon Jan  7 17:04:52 2013
@@ -179,7 +179,7 @@ public class BoundedBuffer<E> extends Sy
 
     public boolean isFull() {
         // size() is synchronized
-        return (size() == maxSize());
+        return size() == maxSize();
     }
 
     public int maxSize() {

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/BoundedFifoBuffer.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/BoundedFifoBuffer.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/BoundedFifoBuffer.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/BoundedFifoBuffer.java Mon Jan  7 17:04:52 2013
@@ -151,7 +151,7 @@ public class BoundedFifoBuffer<E> extend
             elements[i] = (E) in.readObject();
         }
         start = 0;
-        full = (size == maxElements);
+        full = size == maxElements;
         if (full) {
             end = 0;
         } else {
@@ -172,7 +172,7 @@ public class BoundedFifoBuffer<E> extend
         if (end < start) {
             size = maxElements - start + end;
         } else if (end == start) {
-            size = (full ? maxElements : 0);
+            size = full ? maxElements : 0;
         } else {
             size = end - start;
         }
@@ -348,7 +348,7 @@ public class BoundedFifoBuffer<E> extend
             private boolean isFirst = full;
 
             public boolean hasNext() {
-                return isFirst || (index != end);
+                return isFirst || index != end;
             }
 
             public E next() {

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/PriorityBuffer.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/PriorityBuffer.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/PriorityBuffer.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/PriorityBuffer.java Mon Jan  7 17:04:52 2013
@@ -316,7 +316,7 @@ public class PriorityBuffer<E> extends A
         final E element = elements[index];
         int hole = index;
 
-        while ((hole * 2) <= size) {
+        while (hole * 2 <= size) {
             int child = hole * 2;
 
             // if we have a right child and that child can not be percolated
@@ -348,7 +348,7 @@ public class PriorityBuffer<E> extends A
         final E element = elements[index];
         int hole = index;
 
-        while ((hole * 2) <= size) {
+        while (hole * 2 <= size) {
             int child = hole * 2;
 
             // if we have a right child and that child can not be percolated

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/UnboundedFifoBuffer.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/UnboundedFifoBuffer.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/UnboundedFifoBuffer.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/UnboundedFifoBuffer.java Mon Jan  7 17:04:52 2013
@@ -161,7 +161,7 @@ public class UnboundedFifoBuffer<E> exte
      */
     @Override
     public boolean isEmpty() {
-        return (size() == 0);
+        return size() == 0;
     }
 
     /**
@@ -180,7 +180,7 @@ public class UnboundedFifoBuffer<E> exte
 
         if (size() + 1 >= buffer.length) {
             // copy contents to a new buffer array
-            E[] tmp = (E[]) new Object[((buffer.length - 1) * 2) + 1];
+            E[] tmp = (E[]) new Object[(buffer.length - 1) * 2 + 1];
             int j = 0;
             // move head to element zero in the new array
             for (int i = head; i != tail;) {

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/ComparableComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/ComparableComparator.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/ComparableComparator.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/ComparableComparator.java Mon Jan  7 17:04:52 2013
@@ -120,8 +120,8 @@ public class ComparableComparator<E exte
      */
     @Override
     public boolean equals(Object object) {
-        return (this == object) || 
-               ((null != object) && (object.getClass().equals(this.getClass())));
+        return this == object || 
+               null != object && object.getClass().equals(this.getClass());
     }
 
 }

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/ComparatorChain.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/ComparatorChain.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/ComparatorChain.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/ComparatorChain.java Mon Jan  7 17:04:52 2013
@@ -340,9 +340,9 @@ public class ComparatorChain<E> implemen
         }
         if (object.getClass().equals(this.getClass())) {
             ComparatorChain<?> chain = (ComparatorChain<?>) object;
-            return ((null == orderingBits ? null == chain.orderingBits : orderingBits
+            return (null == orderingBits ? null == chain.orderingBits : orderingBits
                     .equals(chain.orderingBits)) && (null == comparatorChain ? null == chain.comparatorChain
-                    : comparatorChain.equals(chain.comparatorChain)));
+                    : comparatorChain.equals(chain.comparatorChain));
         }
         return false;
     }

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/FixedOrderComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/FixedOrderComparator.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/FixedOrderComparator.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/FixedOrderComparator.java Mon Jan  7 17:04:52 2013
@@ -182,7 +182,7 @@ public class FixedOrderComparator<T> imp
     public boolean add(T obj) {
         checkLocked();
         Integer position = map.put(obj, new Integer(counter++));
-        return (position == null);
+        return position == null;
     }
 
     /**
@@ -205,7 +205,7 @@ public class FixedOrderComparator<T> imp
             throw new IllegalArgumentException(existingObj + " not known to " + this);
         }
         Integer result = map.put(newObj, position);
-        return (result == null);
+        return result == null;
     }
 
     // Comparator methods
@@ -235,7 +235,7 @@ public class FixedOrderComparator<T> imp
             case AFTER:
                 return position1 == null ? position2 == null ? 0 : 1 : -1;
             case EXCEPTION:
-                Object unknownObj = (position1 == null) ? obj1 : obj2;
+                Object unknownObj = position1 == null ? obj1 : obj2;
                 throw new IllegalArgumentException("Attempting to compare unknown object "
                         + unknownObj);
             default: //could be null
@@ -285,12 +285,12 @@ public class FixedOrderComparator<T> imp
         }
         if (object.getClass().equals(this.getClass())) {
             FixedOrderComparator<?> comp = (FixedOrderComparator<?>) object;
-            return (null == map ? null == comp.map : map.equals(comp.map) &&
+            return null == map ? null == comp.map : map.equals(comp.map) &&
                     null == unknownObjectBehavior ? null == comp.unknownObjectBehavior :
                         unknownObjectBehavior == comp.unknownObjectBehavior &&
                     counter == comp.counter &&
                     isLocked == comp.isLocked &&
-                    unknownObjectBehavior == comp.unknownObjectBehavior);
+                    unknownObjectBehavior == comp.unknownObjectBehavior;
         }
         return false;
     }

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/NullComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/NullComparator.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/NullComparator.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/NullComparator.java Mon Jan  7 17:04:52 2013
@@ -137,8 +137,8 @@ public class NullComparator<E> implement
      **/
     public int compare(E o1, E o2) {
         if(o1 == o2) { return 0; }
-        if(o1 == null) { return (this.nullsAreHigh ? 1 : -1); }
-        if(o2 == null) { return (this.nullsAreHigh ? -1 : 1); }
+        if(o1 == null) { return this.nullsAreHigh ? 1 : -1; }
+        if(o2 == null) { return this.nullsAreHigh ? -1 : 1; }
         return this.nonNullComparator.compare(o1, o2);
     }
 
@@ -173,8 +173,8 @@ public class NullComparator<E> implement
 
         NullComparator<?> other = (NullComparator<?>) obj;
 
-        return ((this.nullsAreHigh == other.nullsAreHigh) &&
-                (this.nonNullComparator.equals(other.nonNullComparator)));
+        return this.nullsAreHigh == other.nullsAreHigh &&
+                this.nonNullComparator.equals(other.nonNullComparator);
     }
 
 }

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/TransformingComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/TransformingComparator.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/TransformingComparator.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/TransformingComparator.java Mon Jan  7 17:04:52 2013
@@ -119,8 +119,8 @@ public class TransformingComparator<E> i
         }
         if (object.getClass().equals(this.getClass())) {
             TransformingComparator<?> comp = (TransformingComparator<?>) object;
-            return (null == decorated ? null == comp.decorated : decorated.equals(comp.decorated) &&
-                    null == transformer ? null == comp.transformer : transformer.equals(comp.transformer));
+            return null == decorated ? null == comp.decorated : decorated.equals(comp.decorated) &&
+                    null == transformer ? null == comp.transformer : transformer.equals(comp.transformer);
         }
         return false;
     }

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/sequence/SequencesComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/sequence/SequencesComparator.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/sequence/SequencesComparator.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/sequence/SequencesComparator.java Mon Jan  7 17:04:52 2013
@@ -101,8 +101,8 @@ public class SequencesComparator<T> {
      */
     private Snake buildSnake(int start, int diag, int end1, int end2) {
         int end = start;
-        while (((end - diag) < end2)
-                && (end < end1)
+        while (end - diag < end2
+                && end < end1
                 && sequence1.get(end).equals(sequence2.get(end - diag))) {
             ++end;
         }
@@ -130,13 +130,13 @@ public class SequencesComparator<T> {
         // Initialisations
         int m = end1 - start1;
         int n = end2 - start2;
-        if ((m == 0) || (n == 0)) {
+        if (m == 0 || n == 0) {
             return null;
         }
 
         int delta  = m - n;
         int sum    = n + m;
-        int offset = ((sum % 2 == 0) ? sum : (sum + 1)) / 2;
+        int offset = (sum % 2 == 0 ? sum : sum + 1) / 2;
         vDown[1+offset] = start1;
         vUp[1+offset]   = end1 + 1;
 
@@ -146,7 +146,7 @@ public class SequencesComparator<T> {
                 // First step
 
                 int i = k + offset;
-                if ((k == -d) || ((k != d) && (vDown[i-1] < vDown[i+1]))) {
+                if (k == -d || k != d && vDown[i-1] < vDown[i+1]) {
                     vDown[i] = vDown[i+1];
                 } else {
                     vDown[i] = vDown[i-1] + 1;
@@ -155,12 +155,12 @@ public class SequencesComparator<T> {
                 int x = vDown[i];
                 int y = x - start1 + start2 - k;
 
-                while ((x < end1) && (y < end2) && (sequence1.get(x).equals(sequence2.get(y)))) {
+                while (x < end1 && y < end2 && sequence1.get(x).equals(sequence2.get(y))) {
                     vDown[i] = ++x;
                     ++y;
                 }
                 // Second step
-                if (((delta % 2) != 0 ) && ((delta - d) <= k) && (k <= (delta + d))) {
+                if (delta % 2 != 0 && delta - d <= k && k <= delta + d) {
                     if (vUp[i-delta] <= vDown[i]) {
                         return buildSnake(vUp[i-delta], k + start1 - start2, end1, end2);
                     }
@@ -168,11 +168,11 @@ public class SequencesComparator<T> {
             }
 
             // Up
-            for (int k = (delta - d); k <= (delta + d); k += 2) {
+            for (int k = delta - d; k <= delta + d; k += 2) {
                 // First step
                 int i = k + offset - delta;
-                if ((k == (delta - d))
-                        || ((k != (delta + d)) && (vUp[i+1] <= vUp[i-1]))) {
+                if (k == delta - d
+                        || k != delta + d && vUp[i+1] <= vUp[i-1]) {
                     vUp[i] = vUp[i+1] - 1;
                 } else {
                     vUp[i] = vUp[i-1];
@@ -180,13 +180,13 @@ public class SequencesComparator<T> {
 
                 int x = vUp[i] - 1;
                 int y = x - start1 + start2 - k;
-                while ((x >= start1) && (y >= start2)
+                while (x >= start1 && y >= start2
                         && sequence1.get(x).equals(sequence2.get(y))) {
                     vUp[i] = x--;
                     y--;
                 }
                 // Second step
-                if (((delta % 2) == 0) && (-d <= k) && (k <= d) ) {
+                if (delta % 2 == 0 && -d <= k && k <= d ) {
                     if (vUp[i] <= vDown[i + delta]) {
                         return buildSnake(vUp[i], k + start1 - start2, end1, end2);
                     }
@@ -213,19 +213,19 @@ public class SequencesComparator<T> {
 
         Snake middle = getMiddleSnake(start1, end1, start2, end2);
 
-        if ((middle == null)
-                || ((middle.getStart() == end1) && (middle.getDiag() == (end1 - end2)))
-                || ((middle.getEnd() == start1) && (middle.getDiag() == (start1 - start2)))) {
+        if (middle == null
+                || middle.getStart() == end1 && middle.getDiag() == end1 - end2
+                || middle.getEnd() == start1 && middle.getDiag() == start1 - start2) {
 
             int i = start1;
             int j = start2;
-            while ((i < end1) || (j < end2)) {
-                if ((i < end1) && (j < end2) && sequence1.get(i).equals(sequence2.get(j))) {
+            while (i < end1 || j < end2) {
+                if (i < end1 && j < end2 && sequence1.get(i).equals(sequence2.get(j))) {
                     script.append(new KeepCommand<T>(sequence1.get(i)));
                     ++i;
                     ++j;
                 } else {
-                    if ((end1 - start1) > (end2 - start2)) {
+                    if (end1 - start1 > end2 - start2) {
                         script.append(new DeleteCommand<T>(sequence1.get(i)));
                         ++i;
                     } else {

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/AndPredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/AndPredicate.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/AndPredicate.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/AndPredicate.java Mon Jan  7 17:04:52 2013
@@ -72,7 +72,7 @@ public final class AndPredicate<T> imple
      * @return true if both decorated predicates return true
      */
     public boolean evaluate(T object) {
-       return (iPredicate1.evaluate(object) && iPredicate2.evaluate(object));
+       return iPredicate1.evaluate(object) && iPredicate2.evaluate(object);
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/ComparatorPredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/ComparatorPredicate.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/ComparatorPredicate.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/ComparatorPredicate.java Mon Jan  7 17:04:52 2013
@@ -165,19 +165,19 @@ public class ComparatorPredicate<T> impl
         int comparison = comparator.compare(object, target);
         switch (criterion) {
         case EQUAL:
-            result = (comparison == 0);
+            result = comparison == 0;
             break;
         case GREATER:
-            result = (comparison > 0);
+            result = comparison > 0;
             break;
         case LESS:
-            result = (comparison < 0);
+            result = comparison < 0;
             break;
         case GREATER_OR_EQUAL:
-            result = (comparison >= 0);
+            result = comparison >= 0;
             break;
         case LESS_OR_EQUAL:
-            result = (comparison <= 0);
+            result = comparison <= 0;
             break;
         default:
             throw new IllegalStateException("The current criterion '" + criterion + "' is invalid.");

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/IdentityPredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/IdentityPredicate.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/IdentityPredicate.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/IdentityPredicate.java Mon Jan  7 17:04:52 2013
@@ -69,7 +69,7 @@ public final class IdentityPredicate<T> 
      * @return true if input is the same object as the stored value
      */
     public boolean evaluate(T object) {
-        return (iValue == object);
+        return iValue == object;
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/InstanceofPredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/InstanceofPredicate.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/InstanceofPredicate.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/InstanceofPredicate.java Mon Jan  7 17:04:52 2013
@@ -67,7 +67,7 @@ public final class InstanceofPredicate i
      * @return true if input is of stored type
      */
     public boolean evaluate(Object object) {
-        return (iType.isInstance(object));
+        return iType.isInstance(object);
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/InstantiateFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/InstantiateFactory.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/InstantiateFactory.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/InstantiateFactory.java Mon Jan  7 17:04:52 2013
@@ -55,9 +55,9 @@ public class InstantiateFactory<T> imple
         if (classToInstantiate == null) {
             throw new IllegalArgumentException("Class to instantiate must not be null");
         }
-        if (((paramTypes == null) && (args != null))
-            || ((paramTypes != null) && (args == null))
-            || ((paramTypes != null) && (args != null) && (paramTypes.length != args.length))) {
+        if (paramTypes == null && args != null
+            || paramTypes != null && args == null
+            || paramTypes != null && args != null && paramTypes.length != args.length) {
             throw new IllegalArgumentException("Parameter types must match the arguments");
         }
 

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NotNullPredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NotNullPredicate.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NotNullPredicate.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NotNullPredicate.java Mon Jan  7 17:04:52 2013
@@ -60,7 +60,7 @@ public final class NotNullPredicate<T> i
      * @return true if not null
      */
     public boolean evaluate(T object) {
-        return (object != null);
+        return object != null;
     }
 
     private Object readResolve() {

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NotPredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NotPredicate.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NotPredicate.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NotPredicate.java Mon Jan  7 17:04:52 2013
@@ -67,7 +67,7 @@ public final class NotPredicate<T> imple
      * @return true if predicate returns false
      */
     public boolean evaluate(T object) {
-        return !(iPredicate.evaluate(object));
+        return !iPredicate.evaluate(object);
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NullPredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NullPredicate.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NullPredicate.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NullPredicate.java Mon Jan  7 17:04:52 2013
@@ -60,7 +60,7 @@ public final class NullPredicate<T> impl
      * @return true if input is null
      */
     public boolean evaluate(T object) {
-        return (object == null);
+        return object == null;
     }
 
     private Object readResolve() {

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/OrPredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/OrPredicate.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/OrPredicate.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/OrPredicate.java Mon Jan  7 17:04:52 2013
@@ -72,7 +72,7 @@ public final class OrPredicate<T> implem
      * @return true if either decorated predicate returns true
      */
     public boolean evaluate(T object) {
-       return (iPredicate1.evaluate(object) || iPredicate2.evaluate(object));
+       return iPredicate1.evaluate(object) || iPredicate2.evaluate(object);
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ArrayIterator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ArrayIterator.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ArrayIterator.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ArrayIterator.java Mon Jan  7 17:04:52 2013
@@ -143,7 +143,7 @@ public class ArrayIterator<E> implements
      * @return true if there is a next element to return
      */
     public boolean hasNext() {
-        return (index < endIndex);
+        return index < endIndex;
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ArrayListIterator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ArrayListIterator.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ArrayListIterator.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ArrayListIterator.java Mon Jan  7 17:04:52 2013
@@ -116,7 +116,7 @@ public class ArrayListIterator<E> extend
      * @return true if there is a previous element to return
      */
     public boolean hasPrevious() {
-        return (this.index > this.startIndex);
+        return this.index > this.startIndex;
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/FilterListIterator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/FilterListIterator.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/FilterListIterator.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/FilterListIterator.java Mon Jan  7 17:04:52 2013
@@ -154,7 +154,7 @@ public class FilterListIterator<E> imple
     }
 
     public int previousIndex() {
-        return (nextIndex-1);
+        return nextIndex-1;
     }
 
     /** Not supported. */

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/LoopingIterator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/LoopingIterator.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/LoopingIterator.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/LoopingIterator.java Mon Jan  7 17:04:52 2013
@@ -68,7 +68,7 @@ public class LoopingIterator<E> implemen
      * @return <code>true</code> if there are more elements
      */
     public boolean hasNext() {
-        return (collection.size() > 0);
+        return collection.size() > 0;
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ObjectArrayIterator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ObjectArrayIterator.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ObjectArrayIterator.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ObjectArrayIterator.java Mon Jan  7 17:04:52 2013
@@ -119,7 +119,7 @@ public class ObjectArrayIterator<E>
      * @return true if there is a next element to return
      */
     public boolean hasNext() {
-        return (this.index < this.endIndex);
+        return this.index < this.endIndex;
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ObjectArrayListIterator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ObjectArrayListIterator.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ObjectArrayListIterator.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/ObjectArrayListIterator.java Mon Jan  7 17:04:52 2013
@@ -106,7 +106,7 @@ public class ObjectArrayListIterator<E> 
      * @return true if there is a previous element to return
      */
     public boolean hasPrevious() {
-        return (this.index > this.startIndex);
+        return this.index > this.startIndex;
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/SingletonIterator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/SingletonIterator.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/SingletonIterator.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/SingletonIterator.java Mon Jan  7 17:04:52 2013
@@ -73,7 +73,7 @@ public class SingletonIterator<E>
      * @return true if the single object hasn't been returned yet
      */
     public boolean hasNext() {
-        return (beforeFirst && !removed);
+        return beforeFirst && !removed;
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/SingletonListIterator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/SingletonListIterator.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/SingletonListIterator.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/iterators/SingletonListIterator.java Mon Jan  7 17:04:52 2013
@@ -74,7 +74,7 @@ public class SingletonListIterator<E> im
      * @return 0 or 1 depending on current state. 
      */
     public int nextIndex() {
-        return (beforeFirst ? 0 : 1);
+        return beforeFirst ? 0 : 1;
     }
 
     /**
@@ -85,7 +85,7 @@ public class SingletonListIterator<E> im
      * @return 0 or -1 depending on current state. 
      */
     public int previousIndex() {
-        return (beforeFirst ? -1 : 0);
+        return beforeFirst ? -1 : 0;
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/AbstractLinkedList.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/AbstractLinkedList.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/AbstractLinkedList.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/AbstractLinkedList.java Mon Jan  7 17:04:52 2013
@@ -105,7 +105,7 @@ public abstract class AbstractLinkedList
     }
 
     public boolean isEmpty() {
-        return (size() == 0);
+        return size() == 0;
     }
 
     public E get(int index) {
@@ -413,7 +413,7 @@ public abstract class AbstractLinkedList
      * @return true if equal
      */
     protected boolean isEqualValue(Object value1, Object value2) {
-        return (value1 == value2 || (value1 == null ? false : value1.equals(value2)));
+        return value1 == value2 || (value1 == null ? false : value1.equals(value2));
     }
 
     /**
@@ -550,7 +550,7 @@ public abstract class AbstractLinkedList
         }
         // Search the list and get the node
         Node<E> node;
-        if (index < (size / 2)) {
+        if (index < size / 2) {
             // Search forwards
             node = header.next;
             for (int currentIndex = 0; currentIndex < index; currentIndex++) {
@@ -895,17 +895,17 @@ public abstract class AbstractLinkedList
 
         @Override
         public boolean hasNext() {
-            return (nextIndex() < sub.size);
+            return nextIndex() < sub.size;
         }
 
         @Override
         public boolean hasPrevious() {
-            return (previousIndex() >= 0);
+            return previousIndex() >= 0;
         }
 
         @Override
         public int nextIndex() {
-            return (super.nextIndex() - sub.offset);
+            return super.nextIndex() - sub.offset;
         }
 
         @Override

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/CursorableLinkedList.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/CursorableLinkedList.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/CursorableLinkedList.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/CursorableLinkedList.java Mon Jan  7 17:04:52 2013
@@ -589,17 +589,17 @@ public class CursorableLinkedList<E> ext
 
         @Override
         public boolean hasNext() {
-            return (nextIndex() < sub.size);
+            return nextIndex() < sub.size;
         }
 
         @Override
         public boolean hasPrevious() {
-            return (previousIndex() >= 0);
+            return previousIndex() >= 0;
         }
 
         @Override
         public int nextIndex() {
-            return (super.nextIndex() - sub.offset);
+            return super.nextIndex() - sub.offset;
         }
 
         @Override

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/GrowthList.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/GrowthList.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/GrowthList.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/GrowthList.java Mon Jan  7 17:04:52 2013
@@ -153,7 +153,7 @@ public class GrowthList<E> extends Abstr
             decorated().addAll(Collections.<E>nCopies(index - size, null));
             result = true;
         }
-        return (decorated().addAll(index, coll) | result);
+        return decorated().addAll(index, coll) | result;
     }
 
     //-----------------------------------------------------------------------
@@ -180,7 +180,7 @@ public class GrowthList<E> extends Abstr
     public E set(int index, E element) {
         int size = decorated().size();
         if (index >= size) {
-            decorated().addAll(Collections.<E>nCopies((index - size) + 1, null));
+            decorated().addAll(Collections.<E>nCopies(index - size + 1, null));
         }
         return decorated().set(index, element);
     }

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/SetUniqueList.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/SetUniqueList.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/SetUniqueList.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/SetUniqueList.java Mon Jan  7 17:04:52 2013
@@ -137,7 +137,7 @@ public class SetUniqueList<E> extends Ab
         add(size(), object);
 
         // compares sizes to detect if collection changed
-        return (sizeBefore != size());
+        return sizeBefore != size();
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/TreeList.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/TreeList.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/TreeList.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/TreeList.java Mon Jan  7 17:04:52 2013
@@ -166,7 +166,7 @@ public class TreeList<E> extends Abstrac
      */
     @Override
     public boolean contains(Object object) {
-        return (indexOf(object) >= 0);
+        return indexOf(object) >= 0;
     }
 
     /**
@@ -336,7 +336,7 @@ public class TreeList<E> extends Abstrac
                 return this;
             }
 
-            AVLNode<E> nextNode = ((indexRelativeToMe < 0) ? getLeftSubTree() : getRightSubTree());
+            AVLNode<E> nextNode = indexRelativeToMe < 0 ? getLeftSubTree() : getRightSubTree();
             if (nextNode == null) {
                 return null;
             }
@@ -456,14 +456,14 @@ public class TreeList<E> extends Abstrac
          * Gets the left node, returning null if its a faedelung.
          */
         private AVLNode<E> getLeftSubTree() {
-            return (leftIsPrevious ? null : left);
+            return leftIsPrevious ? null : left;
         }
 
         /**
          * Gets the right node, returning null if its a faedelung.
          */
         private AVLNode<E> getRightSubTree() {
-            return (rightIsNext ? null : right);
+            return rightIsNext ? null : right;
         }
 
         /**
@@ -472,7 +472,7 @@ public class TreeList<E> extends Abstrac
          * @return the rightmost child (greatest index)
          */
         private AVLNode<E> max() {
-            return (getRightSubTree() == null) ? this : right.max();
+            return getRightSubTree() == null ? this : right.max();
         }
 
         /**
@@ -481,7 +481,7 @@ public class TreeList<E> extends Abstrac
          * @return the leftmost child (smallest index)
          */
         private AVLNode<E> min() {
-            return (getLeftSubTree() == null) ? this : left.min();
+            return getLeftSubTree() == null ? this : left.min();
         }
 
         /**
@@ -651,7 +651,7 @@ public class TreeList<E> extends Abstrac
          * Returns the height of the node or -1 if the node is null.
          */
         private int getHeight(AVLNode<E> node) {
-            return (node == null ? -1 : node.height);
+            return node == null ? -1 : node.height;
         }
 
         /**
@@ -702,8 +702,8 @@ public class TreeList<E> extends Abstrac
          * @param previous  the previous node in the linked list
          */
         private void setLeft(AVLNode<E> node, AVLNode<E> previous) {
-            leftIsPrevious = (node == null);
-            left = (leftIsPrevious ? previous : node);
+            leftIsPrevious = node == null;
+            left = leftIsPrevious ? previous : node;
             recalcHeight();
         }
 
@@ -714,8 +714,8 @@ public class TreeList<E> extends Abstrac
          * @param next  the next node in the linked list
          */
         private void setRight(AVLNode<E> node, AVLNode<E> next) {
-            rightIsNext = (node == null);
-            right = (rightIsNext ? next : node);
+            rightIsNext = node == null;
+            right = rightIsNext ? next : node;
             recalcHeight();
         }
 
@@ -822,7 +822,7 @@ public class TreeList<E> extends Abstrac
             super();
             this.parent = parent;
             this.expectedModCount = parent.modCount;
-            this.next = (parent.root == null ? null : parent.root.get(fromIndex));
+            this.next = parent.root == null ? null : parent.root.get(fromIndex);
             this.nextIndex = fromIndex;
             this.currentIndex = -1;
         }
@@ -841,7 +841,7 @@ public class TreeList<E> extends Abstrac
         }
 
         public boolean hasNext() {
-            return (nextIndex < parent.size());
+            return nextIndex < parent.size();
         }
 
         public E next() {
@@ -860,7 +860,7 @@ public class TreeList<E> extends Abstrac
         }
 
         public boolean hasPrevious() {
-            return (nextIndex > 0);
+            return nextIndex > 0;
         }
 
         public E previous() {

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractHashedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractHashedMap.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractHashedMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractHashedMap.java Mon Jan  7 17:04:52 2013
@@ -206,7 +206,7 @@ public class AbstractHashedMap<K, V> ext
      */
     @Override
     public boolean isEmpty() {
-        return (size == 0);
+        return size == 0;
     }
 
     //-----------------------------------------------------------------------
@@ -379,7 +379,7 @@ public class AbstractHashedMap<K, V> ext
      * @return the converted key
      */
     protected Object convertKey(Object key) {
-        return (key == null ? NULL : key);
+        return key == null ? NULL : key;
     }
 
     /**
@@ -394,9 +394,9 @@ public class AbstractHashedMap<K, V> ext
         // same as JDK 1.4
         int h = key.hashCode();
         h += ~(h << 9);
-        h ^=  (h >>> 14);
-        h +=  (h << 4);
-        h ^=  (h >>> 10);
+        h ^=  h >>> 14;
+        h +=  h << 4;
+        h ^=  h >>> 10;
         return h;
     }
 
@@ -410,7 +410,7 @@ public class AbstractHashedMap<K, V> ext
      * @return true if equal
      */
     protected boolean isEqualKey(Object key1, Object key2) {
-        return (key1 == key2 || key1.equals(key2));
+        return key1 == key2 || key1.equals(key2);
     }
 
     /**
@@ -423,7 +423,7 @@ public class AbstractHashedMap<K, V> ext
      * @return true if equal
      */
     protected boolean isEqualValue(Object value1, Object value2) {
-        return (value1 == value2 || value1.equals(value2));
+        return value1 == value2 || value1.equals(value2);
     }
 
     /**
@@ -436,7 +436,7 @@ public class AbstractHashedMap<K, V> ext
      * @return the bucket index
      */
     protected int hashIndex(int hashCode, int dataSize) {
-        return hashCode & (dataSize - 1);
+        return hashCode & dataSize - 1;
     }
 
     //-----------------------------------------------------------------------
@@ -852,7 +852,7 @@ public class AbstractHashedMap<K, V> ext
             if (entry instanceof Map.Entry) {
                 Map.Entry<?, ?> e = (Map.Entry<?, ?>) entry;
                 Entry<K, V> match = parent.getEntry(e.getKey());
-                return (match != null && match.equals(e));
+                return match != null && match.equals(e);
             }
             return false;
         }
@@ -1155,7 +1155,7 @@ public class AbstractHashedMap<K, V> ext
         }
 
         public boolean hasNext() {
-            return (next != null);
+            return next != null;
         }
 
         protected HashEntry<K, V> nextEntry() {

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractLinkedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractLinkedMap.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractLinkedMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractLinkedMap.java Mon Jan  7 17:04:52 2013
@@ -198,7 +198,7 @@ public abstract class AbstractLinkedMap<
      */
     public K nextKey(Object key) {
         LinkEntry<K, V> entry = getEntry(key);
-        return (entry == null || entry.after == header ? null : entry.after.getKey());
+        return entry == null || entry.after == header ? null : entry.after.getKey();
     }
 
     @Override
@@ -214,7 +214,7 @@ public abstract class AbstractLinkedMap<
      */
     public K previousKey(Object key) {
         LinkEntry<K, V> entry = getEntry(key);
-        return (entry == null || entry.before == header ? null : entry.before.getKey());
+        return entry == null || entry.before == header ? null : entry.before.getKey();
     }
 
     //-----------------------------------------------------------------------    
@@ -233,7 +233,7 @@ public abstract class AbstractLinkedMap<
             throw new IndexOutOfBoundsException("Index " + index + " is invalid for size " + size);
         }
         LinkEntry<K, V> entry;
-        if (index < (size / 2)) {
+        if (index < size / 2) {
             // Search forwards
             entry = header.after;
             for (int currentIndex = 0; currentIndex < index; currentIndex++) {
@@ -540,11 +540,11 @@ public abstract class AbstractLinkedMap<
         }
 
         public boolean hasNext() {
-            return (next != parent.header);
+            return next != parent.header;
         }
 
         public boolean hasPrevious() {
-            return (next.before != parent.header);
+            return next.before != parent.header;
         }
 
         protected LinkEntry<K, V> nextEntry() {

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractReferenceMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractReferenceMap.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractReferenceMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractReferenceMap.java Mon Jan  7 17:04:52 2013
@@ -214,7 +214,7 @@ public abstract class AbstractReferenceM
         if (entry == null) {
             return false;
         }
-        return (entry.getValue() != null);
+        return entry.getValue() != null;
     }
 
     /**
@@ -453,8 +453,8 @@ public abstract class AbstractReferenceM
     @Override
     @SuppressWarnings("unchecked")
     protected boolean isEqualKey(Object key1, Object key2) {
-        key2 = (keyType == ReferenceStrength.HARD ? key2 : ((Reference<K>) key2).get());
-        return (key1 == key2 || key1.equals(key2));
+        key2 = keyType == ReferenceStrength.HARD ? key2 : ((Reference<K>) key2).get();
+        return key1 == key2 || key1.equals(key2);
     }
 
     /**
@@ -617,7 +617,7 @@ public abstract class AbstractReferenceM
         @Override
         @SuppressWarnings("unchecked")
         public K getKey() {
-            return (K) ((parent.keyType == ReferenceStrength.HARD) ? key : ((Reference<K>) key).get());
+            return (K) (parent.keyType == ReferenceStrength.HARD ? key : ((Reference<K>) key).get());
         }
 
         /**
@@ -629,7 +629,7 @@ public abstract class AbstractReferenceM
         @Override
         @SuppressWarnings("unchecked")
         public V getValue() {
-            return (V) ((parent.valueType == ReferenceStrength.HARD) ? value : ((Reference<V>) value).get());
+            return (V) (parent.valueType == ReferenceStrength.HARD ? value : ((Reference<V>) value).get());
         }
 
         /**
@@ -670,7 +670,7 @@ public abstract class AbstractReferenceM
             Map.Entry<?, ?> entry = (Map.Entry<?, ?>)obj;
             Object entryKey = entry.getKey();  // convert to hard reference
             Object entryValue = entry.getValue();  // convert to hard reference
-            if ((entryKey == null) || (entryValue == null)) {
+            if (entryKey == null || entryValue == null) {
                 return false;
             }
             // compare using map methods, aiding identity subclass
@@ -722,8 +722,8 @@ public abstract class AbstractReferenceM
          * @return true or false
          */
         boolean purge(Reference<?> ref) {
-            boolean r = (parent.keyType != ReferenceStrength.HARD) && (key == ref);
-            r = r || ((parent.valueType != ReferenceStrength.HARD) && (value == ref));
+            boolean r = parent.keyType != ReferenceStrength.HARD && key == ref;
+            r = r || parent.valueType != ReferenceStrength.HARD && value == ref;
             if (r) {
                 if (parent.keyType != ReferenceStrength.HARD) {
                     ((Reference<?>) key).clear();
@@ -771,7 +771,7 @@ public abstract class AbstractReferenceM
         public ReferenceBaseIterator(AbstractReferenceMap<K, V> parent) {
             super();
             this.parent = parent;
-            index = (parent.size() != 0 ? parent.data.length : 0);
+            index = parent.size() != 0 ? parent.data.length : 0;
             // have to do this here!  size() invocation above
             // may have altered the modCount.
             expectedModCount = parent.modCount;
@@ -782,7 +782,7 @@ public abstract class AbstractReferenceM
             while (nextNull()) {
                 ReferenceEntry<K, V> e = entry;
                 int i = index;
-                while ((e == null) && (i > 0)) {
+                while (e == null && i > 0) {
                     i--;
                     e = (ReferenceEntry<K, V>) parent.data[i];
                 }
@@ -809,7 +809,7 @@ public abstract class AbstractReferenceM
         }
 
         private boolean nextNull() {
-            return (nextKey == null) || (nextValue == null);
+            return nextKey == null || nextValue == null;
         }
 
         protected ReferenceEntry<K, V> nextEntry() {

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/CompositeMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/CompositeMap.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/CompositeMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/CompositeMap.java Mon Jan  7 17:04:52 2013
@@ -465,7 +465,7 @@ public class CompositeMap<K, V> extends 
     public boolean equals(Object obj) {
         if (obj instanceof Map) {
             Map<?, ?> map = (Map<?, ?>) obj;
-            return (this.entrySet().equals(map.entrySet()));
+            return this.entrySet().equals(map.entrySet());
         }
         return false;
     }

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/Flat3Map.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/Flat3Map.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/Flat3Map.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/Flat3Map.java Mon Jan  7 17:04:52 2013
@@ -184,7 +184,7 @@ public class Flat3Map<K, V> implements I
      * @return true if the map is currently size zero
      */
     public boolean isEmpty() {
-        return (size() == 0);
+        return size() == 0;
     }
 
     //-----------------------------------------------------------------------
@@ -346,17 +346,17 @@ public class Flat3Map<K, V> implements I
                 delegateMap.put(key, value);
                 return null;
             case 2:
-                hash3 = (key == null ? 0 : key.hashCode());
+                hash3 = key == null ? 0 : key.hashCode();
                 key3 = key;
                 value3 = value;
                 break;
             case 1:
-                hash2 = (key == null ? 0 : key.hashCode());
+                hash2 = key == null ? 0 : key.hashCode();
                 key2 = key;
                 value2 = value;
                 break;
             case 0:
-                hash1 = (key == null ? 0 : key.hashCode());
+                hash1 = key == null ? 0 : key.hashCode();
                 key1 = key;
                 value1 = value;
                 break;
@@ -626,7 +626,7 @@ public class Flat3Map<K, V> implements I
         }
 
         public boolean hasNext() {
-            return (nextIndex < parent.size);
+            return nextIndex < parent.size;
         }
 
         public K next() {
@@ -784,7 +784,7 @@ public class Flat3Map<K, V> implements I
         }
 
         public boolean hasNext() {
-            return (nextIndex < parent.size);
+            return nextIndex < parent.size;
         }
 
         public Map.Entry<K, V> nextEntry() {
@@ -1161,11 +1161,11 @@ public class Flat3Map<K, V> implements I
         int total = 0;
         switch (size) {  // drop through
             case 3:
-                total += (hash3 ^ (value3 == null ? 0 : value3.hashCode()));
+                total += hash3 ^ (value3 == null ? 0 : value3.hashCode());
             case 2:
-                total += (hash2 ^ (value2 == null ? 0 : value2.hashCode()));
+                total += hash2 ^ (value2 == null ? 0 : value2.hashCode());
             case 1:
-                total += (hash1 ^ (value1 == null ? 0 : value1.hashCode()));
+                total += hash1 ^ (value1 == null ? 0 : value1.hashCode());
         }
         return total;
     }
@@ -1187,19 +1187,19 @@ public class Flat3Map<K, V> implements I
         buf.append('{');
         switch (size) {  // drop through
             case 3:
-                buf.append((key3 == this ? "(this Map)" : key3));
+                buf.append(key3 == this ? "(this Map)" : key3);
                 buf.append('=');
-                buf.append((value3 == this ? "(this Map)" : value3));
+                buf.append(value3 == this ? "(this Map)" : value3);
                 buf.append(',');
             case 2:
-                buf.append((key2 == this ? "(this Map)" : key2));
+                buf.append(key2 == this ? "(this Map)" : key2);
                 buf.append('=');
-                buf.append((value2 == this ? "(this Map)" : value2));
+                buf.append(value2 == this ? "(this Map)" : value2);
                 buf.append(',');
             case 1:
-                buf.append((key1 == this ? "(this Map)" : key1));
+                buf.append(key1 == this ? "(this Map)" : key1);
                 buf.append('=');
-                buf.append((value1 == this ? "(this Map)" : value1));
+                buf.append(value1 == this ? "(this Map)" : value1);
         }
         buf.append('}');
         return buf.toString();

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/IdentityMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/IdentityMap.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/IdentityMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/IdentityMap.java Mon Jan  7 17:04:52 2013
@@ -109,7 +109,7 @@ public class IdentityMap<K, V>
      */
     @Override
     protected boolean isEqualKey(Object key1, Object key2) {
-        return (key1 == key2);
+        return key1 == key2;
     }
 
     /**
@@ -122,7 +122,7 @@ public class IdentityMap<K, V>
      */
     @Override
     protected boolean isEqualValue(Object value1, Object value2) {
-        return (value1 == value2);
+        return value1 == value2;
     }
 
     /**
@@ -160,8 +160,8 @@ public class IdentityMap<K, V>
             }
             Map.Entry<?, ?> other = (Map.Entry<?, ?>) obj;
             return
-                (getKey() == other.getKey()) &&
-                (getValue() == other.getValue());
+                getKey() == other.getKey() &&
+                getValue() == other.getValue();
         }
 
         @Override



Mime
View raw message