You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2013/01/07 18:04:53 UTC

svn commit: r1429897 [2/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...

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LRUMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LRUMap.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LRUMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LRUMap.java Mon Jan  7 17:04:52 2013
@@ -124,7 +124,7 @@ public class LRUMap<K, V>
      * @since 3.1
      */
     public LRUMap(int maxSize, float loadFactor, boolean scanUntilRemovable) {
-        super((maxSize < 1 ? DEFAULT_CAPACITY : maxSize), loadFactor);
+        super(maxSize < 1 ? DEFAULT_CAPACITY : maxSize, loadFactor);
         if (maxSize < 1) {
             throw new IllegalArgumentException("LRUMap max size must be greater than 0");
         }
@@ -373,7 +373,7 @@ public class LRUMap<K, V>
      * @return <code>true</code> if the map is full
      */
     public boolean isFull() {
-        return (size >= maxSize);
+        return size >= maxSize;
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiKeyMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiKeyMap.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiKeyMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiKeyMap.java Mon Jan  7 17:04:52 2013
@@ -229,9 +229,9 @@ public class MultiKeyMap<K, V> extends A
             h ^= key2.hashCode();
         }
         h += ~(h << 9);
-        h ^=  (h >>> 14);
-        h +=  (h << 4);
-        h ^=  (h >>> 10);
+        h ^=  h >>> 14;
+        h +=  h << 4;
+        h ^=  h >>> 10;
         return h;
     }
 
@@ -365,9 +365,9 @@ public class MultiKeyMap<K, V> extends A
             h ^= key3.hashCode();
         }
         h += ~(h << 9);
-        h ^=  (h >>> 14);
-        h +=  (h << 4);
-        h ^=  (h >>> 10);
+        h ^=  h >>> 14;
+        h +=  h << 4;
+        h ^=  h >>> 10;
         return h;
     }
 
@@ -511,9 +511,9 @@ public class MultiKeyMap<K, V> extends A
             h ^= key4.hashCode();
         }
         h += ~(h << 9);
-        h ^=  (h >>> 14);
-        h +=  (h << 4);
-        h ^=  (h >>> 10);
+        h ^=  h >>> 14;
+        h +=  h << 4;
+        h ^=  h >>> 10;
         return h;
     }
 
@@ -667,9 +667,9 @@ public class MultiKeyMap<K, V> extends A
             h ^= key5.hashCode();
         }
         h += ~(h << 9);
-        h ^=  (h >>> 14);
-        h +=  (h << 4);
-        h ^=  (h >>> 10);
+        h ^=  h >>> 14;
+        h +=  h << 4;
+        h ^=  h >>> 10;
         return h;
     }
 

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiValueMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiValueMap.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiValueMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiValueMap.java Mon Jan  7 17:04:52 2013
@@ -261,7 +261,7 @@ public class MultiValueMap<K, V> extends
         } else {
             result = coll.add((V) value);
         }
-        return (result ? value : null);
+        return result ? value : null;
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PassiveExpiringMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PassiveExpiringMap.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PassiveExpiringMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PassiveExpiringMap.java Mon Jan  7 17:04:52 2013
@@ -402,7 +402,7 @@ public class PassiveExpiringMap<K, V>
     private boolean isExpired(long now, Long expirationTimeObject) {
         if (expirationTimeObject != null) {
             long expirationTime = expirationTimeObject.longValue();
-            return (expirationTime >= 0 && now >= expirationTime);
+            return expirationTime >= 0 && now >= expirationTime;
         }
         return false;
     }

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PredicatedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PredicatedMap.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PredicatedMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PredicatedMap.java Mon Jan  7 17:04:52 2013
@@ -169,7 +169,7 @@ public class PredicatedMap<K, V>
      */
     @Override
     protected boolean isSetValueChecking() {
-        return (valuePredicate != null);
+        return valuePredicate != null;
     }
 
     //-----------------------------------------------------------------------

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/SingletonMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/SingletonMap.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/SingletonMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/SingletonMap.java Mon Jan  7 17:04:52 2013
@@ -219,7 +219,7 @@ public class SingletonMap<K, V>
      * @return true if the map contains the key
      */
     public boolean containsKey(Object key) {
-        return (isEqualKey(key));
+        return isEqualKey(key);
     }
 
     /**
@@ -229,7 +229,7 @@ public class SingletonMap<K, V>
      * @return true if the map contains the key
      */
     public boolean containsValue(Object value) {
-        return (isEqualValue(value));
+        return isEqualValue(value);
     }
 
     //-----------------------------------------------------------------------
@@ -383,7 +383,7 @@ public class SingletonMap<K, V>
      * @return true if equal
      */
     protected boolean isEqualKey(Object key) {
-        return (key == null ? getKey() == null : key.equals(getKey()));
+        return key == null ? getKey() == null : key.equals(getKey());
     }
 
     /**
@@ -393,7 +393,7 @@ public class SingletonMap<K, V>
      * @return true if equal
      */
     protected boolean isEqualValue(Object value) {
-        return (value == null ? getValue() == null : value.equals(getValue()));
+        return value == null ? getValue() == null : value.equals(getValue());
     }
 
     //-----------------------------------------------------------------------
@@ -424,7 +424,7 @@ public class SingletonMap<K, V>
         }
 
         public boolean hasPrevious() {
-            return (hasNext == false);
+            return hasNext == false;
         }
 
         public K previous() {
@@ -566,9 +566,9 @@ public class SingletonMap<K, V>
     public String toString() {
         return new StringBuilder(128)
             .append('{')
-            .append((getKey() == this ? "(this Map)" : getKey()))
+            .append(getKey() == this ? "(this Map)" : getKey())
             .append('=')
-            .append((getValue() == this ? "(this Map)" : getValue()))
+            .append(getValue() == this ? "(this Map)" : getValue())
             .append('}')
             .toString();
     }

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/TransformedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/TransformedMap.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/TransformedMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/TransformedMap.java Mon Jan  7 17:04:52 2013
@@ -225,7 +225,7 @@ public class TransformedMap<K, V>
      */
     @Override
     protected boolean isSetValueChecking() {
-        return (valueTransformer != null);
+        return valueTransformer != null;
     }
 
     //-----------------------------------------------------------------------

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/set/CompositeSet.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/set/CompositeSet.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/set/CompositeSet.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/set/CompositeSet.java Mon Jan  7 17:04:52 2013
@@ -189,7 +189,7 @@ public class CompositeSet<E> extends Com
     public int hashCode() {
         int code = 0;
         for (E e : this) {
-            code += (e == null ? 0 : e.hashCode());
+            code += e == null ? 0 : e.hashCode();
         }
         return code;
     }

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/set/MapBackedSet.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/set/MapBackedSet.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/set/MapBackedSet.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/set/MapBackedSet.java Mon Jan  7 17:04:52 2013
@@ -114,7 +114,7 @@ public final class MapBackedSet<E, V> im
     public boolean add(E obj) {
         int size = map.size();
         map.put(obj, dummyValue);
-        return (map.size() != size);
+        return map.size() != size;
     }
 
     public boolean addAll(Collection<? extends E> coll) {
@@ -122,13 +122,13 @@ public final class MapBackedSet<E, V> im
         for (E e : coll) {
             map.put(e, dummyValue);
         }
-        return (map.size() != size);
+        return map.size() != size;
     }
 
     public boolean remove(Object obj) {
         int size = map.size();
         map.remove(obj);
-        return (map.size() != size);
+        return map.size() != size;
     }
 
     public boolean removeAll(Collection<?> coll) {

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/AbstractKeyAnalyzer.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/AbstractKeyAnalyzer.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/AbstractKeyAnalyzer.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/AbstractKeyAnalyzer.java Mon Jan  7 17:04:52 2013
@@ -32,9 +32,9 @@ public abstract class AbstractKeyAnalyze
     @SuppressWarnings("unchecked")
     public int compare(K o1, K o2) {
         if (o1 == null) {
-            return (o2 == null) ? 0 : -1;
+            return o2 == null ? 0 : -1;
         } else if (o2 == null) {
-            return (o1 == null) ? 0 : 1;
+            return o1 == null ? 0 : 1;
         }
         
         return ((Comparable<K>)o1).compareTo(o2);

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/AbstractTrie.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/AbstractTrie.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/AbstractTrie.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/AbstractTrie.java Mon Jan  7 17:04:52 2013
@@ -148,9 +148,9 @@ abstract class AbstractTrie<K, V> extend
      */
     final boolean compareKeys(K key, K other) {
         if (key == null) {
-            return (other == null);
+            return other == null;
         } else if (other == null) {
-            return (key == null);
+            return key == null;
         }
         
         return keyAnalyzer.compare(key, other) == 0;
@@ -160,7 +160,7 @@ abstract class AbstractTrie<K, V> extend
      * Returns true if both values are either null or equal
      */
     static boolean compare(Object a, Object b) {
-        return (a == null ? b == null : a.equals(b));
+        return a == null ? b == null : a.equals(b);
     }
     
     /**
@@ -178,7 +178,7 @@ abstract class AbstractTrie<K, V> extend
         
         public BasicEntry(K key) {
             this.key = key;
-            this.hashCode = (key != null ? key.hashCode() : 0);
+            this.hashCode = key != null ? key.hashCode() : 0;
         }
         
         public BasicEntry(K key, V value) {

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/ByteArrayKeyAnalyzer.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/ByteArrayKeyAnalyzer.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/ByteArrayKeyAnalyzer.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/ByteArrayKeyAnalyzer.java Mon Jan  7 17:04:52 2013
@@ -87,7 +87,7 @@ public class ByteArrayKeyAnalyzer extend
      * {@inheritDoc}
      */
     public int lengthInBits(byte[] key) {
-        return (key != null ? key.length * bitsPerElement() : 0);
+        return key != null ? key.length * bitsPerElement() : 0;
     }
     
     /**
@@ -129,14 +129,14 @@ public class ByteArrayKeyAnalyzer extend
         }
         
         for (int i = 0; i < length; i++) {
-            int index = prefix + (offsetInBits + i);
+            int index = prefix + offsetInBits + i;
             boolean value = isBitSet(key, index, lengthInBits);
                 
             if (value) {
                 allNull = false;
             }
             
-            int otherIndex = prefix + (otherOffsetInBits + i);
+            int otherIndex = prefix + otherOffsetInBits + i;
             boolean otherValue = isBitSet(other, otherIndex, otherLengthInBits);
             
             if (value != otherValue) {
@@ -179,9 +179,9 @@ public class ByteArrayKeyAnalyzer extend
     @Override
     public int compare(byte[] o1, byte[] o2) {
         if (o1 == null) {
-            return (o2 == null) ? 0 : -1;
+            return o2 == null ? 0 : -1;
         } else if (o2 == null) {
-            return (o1 == null) ? 0 : 1;
+            return o1 == null ? 0 : 1;
         }
         
         if (o1.length != o2.length) {

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/ByteKeyAnalyzer.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/ByteKeyAnalyzer.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/ByteKeyAnalyzer.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/ByteKeyAnalyzer.java Mon Jan  7 17:04:52 2013
@@ -85,7 +85,7 @@ public class ByteKeyAnalyzer extends Abs
             return NULL_BIT_KEY;
         }
 
-        byte otherValue = (other != null ? other.byteValue() : 0);
+        byte otherValue = other != null ? other.byteValue() : 0;
         
         if (keyValue != otherValue) {
             int xorValue = keyValue ^ otherValue;
@@ -105,12 +105,12 @@ public class ByteKeyAnalyzer extends Abs
     public boolean isPrefix(Byte prefix, int offsetInBits, 
             int lengthInBits, Byte key) {
         
-        int value1 = (prefix.byteValue() << offsetInBits);
+        int value1 = prefix.byteValue() << offsetInBits;
         int value2 = key.byteValue();
         
         int mask = 0;
         for (int i = 0; i < lengthInBits; i++) {
-            mask |= (0x1 << i);
+            mask |= 0x1 << i;
         }
         
         return (value1 & mask) == (value2 & mask);

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/CharArrayKeyAnalyzer.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/CharArrayKeyAnalyzer.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/CharArrayKeyAnalyzer.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/CharArrayKeyAnalyzer.java Mon Jan  7 17:04:52 2013
@@ -59,7 +59,7 @@ public class CharArrayKeyAnalyzer extend
      * {@inheritDoc}
      */
     public int lengthInBits(char[] key) {
-        return (key != null ? key.length * LENGTH : 0);
+        return key != null ? key.length * LENGTH : 0;
     }
 
     /**
@@ -106,7 +106,7 @@ public class CharArrayKeyAnalyzer extend
 
             if (k != f) {
                int x = k ^ f;
-               return i * LENGTH + (Integer.numberOfLeadingZeros(x) - LENGTH);
+               return i * LENGTH + Integer.numberOfLeadingZeros(x) - LENGTH;
             }
 
             if (k != 0) {

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/CharacterKeyAnalyzer.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/CharacterKeyAnalyzer.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/CharacterKeyAnalyzer.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/CharacterKeyAnalyzer.java Mon Jan  7 17:04:52 2013
@@ -90,7 +90,7 @@ public class CharacterKeyAnalyzer extend
             other = Character.MIN_VALUE;
         }
         
-        char otherValue = (other != null ? other.charValue() : Character.MIN_VALUE);
+        char otherValue = other != null ? other.charValue() : Character.MIN_VALUE;
         
         if (keyValue != otherValue) {
             int xorValue = keyValue ^ otherValue;
@@ -110,12 +110,12 @@ public class CharacterKeyAnalyzer extend
     public boolean isPrefix(Character prefix, int offsetInBits, 
             int lengthInBits, Character key) {
         
-        int value1 = (prefix.charValue() << offsetInBits);
+        int value1 = prefix.charValue() << offsetInBits;
         int value2 = key.charValue();
         
         int mask = 0;
         for(int i = 0; i < lengthInBits; i++) {
-            mask |= (0x1 << i);
+            mask |= 0x1 << i;
         }
         
         return (value1 & mask) == (value2 & mask);

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/IntegerKeyAnalyzer.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/IntegerKeyAnalyzer.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/IntegerKeyAnalyzer.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/IntegerKeyAnalyzer.java Mon Jan  7 17:04:52 2013
@@ -85,7 +85,7 @@ public class IntegerKeyAnalyzer extends 
             return NULL_BIT_KEY;
         }
 
-        int otherValue = (other != null ? other.intValue() : 0);
+        int otherValue = other != null ? other.intValue() : 0;
         
         if (keyValue != otherValue) {
             int xorValue = keyValue ^ otherValue;
@@ -105,12 +105,12 @@ public class IntegerKeyAnalyzer extends 
     public boolean isPrefix(Integer prefix, int offsetInBits, 
             int lengthInBits, Integer key) {
         
-        int value1 = (prefix.intValue() << offsetInBits);
+        int value1 = prefix.intValue() << offsetInBits;
         int value2 = key.intValue();
         
         int mask = 0;
         for (int i = 0; i < lengthInBits; i++) {
-            mask |= (0x1 << i);
+            mask |= 0x1 << i;
         }
         
         return (value1 & mask) == (value2 & mask);

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/LongKeyAnalyzer.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/LongKeyAnalyzer.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/LongKeyAnalyzer.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/LongKeyAnalyzer.java Mon Jan  7 17:04:52 2013
@@ -85,7 +85,7 @@ public class LongKeyAnalyzer extends Abs
             return NULL_BIT_KEY;
         }
 
-        long otherValue = (other != null ? other.longValue() : 0L);
+        long otherValue = other != null ? other.longValue() : 0L;
         
         if (keyValue != otherValue) {
             long xorValue = keyValue ^ otherValue;
@@ -105,12 +105,12 @@ public class LongKeyAnalyzer extends Abs
     public boolean isPrefix(Long prefix, int offsetInBits, 
             int lengthInBits, Long key) {
         
-        long value1 = (prefix.longValue() << offsetInBits);
+        long value1 = prefix.longValue() << offsetInBits;
         long value2 = key.longValue();
         
         long mask = 0L;
         for (int i = 0; i < lengthInBits; i++) {
-            mask |= (0x1L << i);
+            mask |= 0x1L << i;
         }
         
         return (value1 & mask) == (value2 & mask);

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/PatriciaTrie.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/PatriciaTrie.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/PatriciaTrie.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/PatriciaTrie.java Mon Jan  7 17:04:52 2013
@@ -1050,7 +1050,7 @@ public class PatriciaTrie<K, V> extends 
                     TrieEntry<K,V> last) {
                 super(first);
                 
-                this.excludedKey = (last != null ? last.getKey() : null);
+                this.excludedKey = last != null ? last.getKey() : null;
             }
 
             /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/PatriciaTrieBase.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/PatriciaTrieBase.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/PatriciaTrieBase.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/PatriciaTrieBase.java Mon Jan  7 17:04:52 2013
@@ -555,7 +555,7 @@ abstract class PatriciaTrieBase<K, V> ex
         } 
         
         TrieEntry<K, V> parent = h.parent;
-        TrieEntry<K, V> child = (h.left == h) ? h.right : h.left;
+        TrieEntry<K, V> child = h.left == h ? h.right : h.left;
         
         if (parent.left == h) {
             parent.left = child;
@@ -594,7 +594,7 @@ abstract class PatriciaTrieBase<K, V> ex
         // Fix P's parent, predecessor and child Nodes
         {
             TrieEntry<K, V> parent = p.parent;
-            TrieEntry<K, V> child = (p.left == h) ? p.right : p.left;
+            TrieEntry<K, V> child = p.left == h ? p.right : p.left;
             
             // if it was looping to itself previously,
             // it will now be pointed from it's parent

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/ShortKeyAnalyzer.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/ShortKeyAnalyzer.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/ShortKeyAnalyzer.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/ShortKeyAnalyzer.java Mon Jan  7 17:04:52 2013
@@ -85,7 +85,7 @@ public class ShortKeyAnalyzer implements
             return NULL_BIT_KEY;
         }
 
-        int otherValue = (other != null ? other.shortValue() : 0);
+        int otherValue = other != null ? other.shortValue() : 0;
         
         if (keyValue != otherValue) {
             int xorValue = keyValue ^ otherValue;
@@ -112,12 +112,12 @@ public class ShortKeyAnalyzer implements
     public boolean isPrefix(Short prefix, int offsetInBits, 
             int lengthInBits, Short key) {
         
-        int value1 = (prefix.shortValue() << offsetInBits);
+        int value1 = prefix.shortValue() << offsetInBits;
         int value2 = key.shortValue();
         
         int mask = 0;
         for (int i = 0; i < lengthInBits; i++) {
-            mask |= (0x1 << i);
+            mask |= 0x1 << i;
         }
         
         return (value1 & mask) == (value2 & mask);

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/StringKeyAnalyzer.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/StringKeyAnalyzer.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/StringKeyAnalyzer.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/StringKeyAnalyzer.java Mon Jan  7 17:04:52 2013
@@ -59,7 +59,7 @@ public class StringKeyAnalyzer extends A
      * {@inheritDoc}
      */
     public int lengthInBits(String key) {
-        return (key != null ? key.length() * LENGTH : 0);
+        return key != null ? key.length() * LENGTH : 0;
     }
     
     /**
@@ -106,7 +106,7 @@ public class StringKeyAnalyzer extends A
             
             if (k != f) {
                int x = k ^ f;
-               return i * LENGTH + (Integer.numberOfLeadingZeros(x) - LENGTH);
+               return i * LENGTH + Integer.numberOfLeadingZeros(x) - LENGTH;
             }
             
             if (k != 0) {

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/CollectionUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/CollectionUtilsTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/CollectionUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/CollectionUtilsTest.java Mon Jan  7 17:04:52 2013
@@ -899,7 +899,7 @@ public class CollectionUtilsTest extends
     // -----------------------------------------------------------------------
     private static Predicate<Number> EQUALS_TWO = new Predicate<Number>() {
         public boolean evaluate(Number input) {
-            return (input.intValue() == 2);
+            return input.intValue() == 2;
         }
     };
 
@@ -1203,7 +1203,7 @@ public class CollectionUtilsTest extends
         // or eltb, although this isn't strictly part of the
         // contract.
         Object eltc = intersection.iterator().next();
-        assertTrue((eltc == elta && eltc != eltb) || (eltc != elta && eltc == eltb));
+        assertTrue(eltc == elta && eltc != eltb || eltc != elta && eltc == eltb);
 
         // In any event, this element remains equal,
         // to both elta and eltb.

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/ExtendedPropertiesTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/ExtendedPropertiesTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/ExtendedPropertiesTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/ExtendedPropertiesTest.java Mon Jan  7 17:04:52 2013
@@ -60,28 +60,28 @@ public class ExtendedPropertiesTest exte
          * now add another and get a Vector/list
          */
         eprop.addProperty("number", "2");
-        assertTrue("This returns array", (eprop.getVector("number") instanceof java.util.Vector));
-        assertTrue("This returns array", (eprop.getList("number") instanceof java.util.List));
+        assertTrue("This returns array", eprop.getVector("number") instanceof java.util.Vector);
+        assertTrue("This returns array", eprop.getList("number") instanceof java.util.List);
 
         /*
          *  now test dan's new fix where we get the first scalar 
          *  when we access a vector/list valued
          *  property
          */
-        assertTrue("This returns scalar", (eprop.getString("number") instanceof String));
+        assertTrue("This returns scalar", eprop.getString("number") instanceof String);
 
         /*
          * test comma separated string properties
          */
         String prop = "hey, that's a test";
         eprop.setProperty("prop.string", prop);
-        assertTrue("This returns vector", (eprop.getVector("prop.string") instanceof java.util.Vector));
-        assertTrue("This returns list", (eprop.getList("prop.string") instanceof java.util.List));
+        assertTrue("This returns vector", eprop.getVector("prop.string") instanceof java.util.Vector);
+        assertTrue("This returns list", eprop.getList("prop.string") instanceof java.util.List);
 
         String prop2 = "hey\\, that's a test";
         eprop.remove("prop.string");
         eprop.setProperty("prop.string", prop2);
-        assertTrue("This returns array", (eprop.getString("prop.string") instanceof java.lang.String));
+        assertTrue("This returns array", eprop.getString("prop.string") instanceof java.lang.String);
 
         /*
          * test subset : we want to make sure that the EP doesn't reprocess the data 
@@ -91,9 +91,9 @@ public class ExtendedPropertiesTest exte
         ExtendedProperties subEprop = eprop.subset("prop");
 
         assertTrue("Returns the full string", subEprop.getString("string").equals(prop));
-        assertTrue("This returns string for subset", (subEprop.getString("string") instanceof java.lang.String));
-        assertTrue("This returns array for subset", (subEprop.getVector("string") instanceof java.util.Vector));
-        assertTrue("This returns array for subset", (subEprop.getList("string") instanceof java.util.List));
+        assertTrue("This returns string for subset", subEprop.getString("string") instanceof java.lang.String);
+        assertTrue("This returns array for subset", subEprop.getVector("string") instanceof java.util.Vector);
+        assertTrue("This returns array for subset", subEprop.getList("string") instanceof java.util.List);
 
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/ListUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/ListUtilsTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/ListUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/ListUtilsTest.java Mon Jan  7 17:04:52 2013
@@ -332,7 +332,7 @@ public class ListUtilsTest extends BulkT
     
     private static Predicate<Number> EQUALS_TWO = new Predicate<Number>() {
         public boolean evaluate(Number input) {
-            return (input.intValue() == 2);
+            return input.intValue() == 2;
         }
     };
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/MockTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/MockTestCase.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/MockTestCase.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/MockTestCase.java Mon Jan  7 17:04:52 2013
@@ -59,7 +59,7 @@ public abstract class MockTestCase {
             try {
                 EasyMock.verify(i.next());
             } catch (AssertionError e) {
-                throw new AssertionError((i.previousIndex() + 1) + ""
+                throw new AssertionError(i.previousIndex() + 1 + ""
                         + e.getMessage());
             }
         }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/AbstractBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/AbstractBagTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/AbstractBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/AbstractBagTest.java Mon Jan  7 17:04:52 2013
@@ -354,9 +354,9 @@ public abstract class AbstractBagTest<T>
         Object[] array = bag.toArray();
         int a = 0, b = 0, c = 0;
         for (Object element : array) {
-            a += (element.equals("A") ? 1 : 0);
-            b += (element.equals("B") ? 1 : 0);
-            c += (element.equals("C") ? 1 : 0);
+            a += element.equals("A") ? 1 : 0;
+            b += element.equals("B") ? 1 : 0;
+            c += element.equals("C") ? 1 : 0;
         }
         assertEquals(2, a);
         assertEquals(2, b);
@@ -374,9 +374,9 @@ public abstract class AbstractBagTest<T>
         String[] array = bag.toArray(new String[0]);
         int a = 0, b = 0, c = 0;
         for (String element : array) {
-            a += (element.equals("A") ? 1 : 0);
-            b += (element.equals("B") ? 1 : 0);
-            c += (element.equals("C") ? 1 : 0);
+            a += element.equals("A") ? 1 : 0;
+            b += element.equals("B") ? 1 : 0;
+            c += element.equals("C") ? 1 : 0;
         }
         assertEquals(2, a);
         assertEquals(2, b);
@@ -444,9 +444,9 @@ public abstract class AbstractBagTest<T>
         assertEquals(bag.hashCode(), bag2.hashCode());
         
         int total = 0;
-        total += ("A".hashCode() ^ 2);
-        total += ("B".hashCode() ^ 2);
-        total += ("C".hashCode() ^ 1);
+        total += "A".hashCode() ^ 2;
+        total += "B".hashCode() ^ 2;
+        total += "C".hashCode() ^ 1;
         assertEquals(total, bag.hashCode());
         assertEquals(total, bag2.hashCode());
     }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/collection/AbstractCollectionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/collection/AbstractCollectionTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/collection/AbstractCollectionTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/collection/AbstractCollectionTest.java Mon Jan  7 17:04:52 2013
@@ -282,7 +282,7 @@ public abstract class AbstractCollection
                     // skip values already matched
                     continue;
                 }
-                if (o == confirmedValues[i] || (o != null && o.equals(confirmedValues[i]))) {
+                if (o == confirmedValues[i] || o != null && o.equals(confirmedValues[i])) {
                     // values matched
                     matched[i] = true;
                     match = true;
@@ -703,9 +703,9 @@ public abstract class AbstractCollection
         // make sure calls to "containsAll" don't change anything
         verify();
 
-        int min = (getFullElements().length < 2 ? 0 : 2);
-        int max = (getFullElements().length == 1 ? 1 :
-                (getFullElements().length <= 5 ? getFullElements().length - 1 : 5));
+        int min = getFullElements().length < 2 ? 0 : 2;
+        int max = getFullElements().length == 1 ? 1 :
+                getFullElements().length <= 5 ? getFullElements().length - 1 : 5;
         col = Arrays.asList(getFullElements()).subList(min, max);
         assertTrue("Full collection should containAll partial full elements",
                 getCollection().containsAll(col));
@@ -931,9 +931,9 @@ public abstract class AbstractCollection
 
         resetFull();
         int size = getCollection().size();
-        int min = (getFullElements().length < 2 ? 0 : 2);
-        int max = (getFullElements().length == 1 ? 1 :
-                (getFullElements().length <= 5 ? getFullElements().length - 1 : 5));
+        int min = getFullElements().length < 2 ? 0 : 2;
+        int max = getFullElements().length == 1 ? 1 :
+                getFullElements().length <= 5 ? getFullElements().length - 1 : 5;
         Collection<E> all = Arrays.asList(getFullElements()).subList(min, max);
         assertTrue("Full collection removeAll should work", getCollection().removeAll(all));
         getConfirmed().removeAll(all);
@@ -987,8 +987,8 @@ public abstract class AbstractCollection
         if (getFullElements().length > 1) {
             resetFull();
             size = getCollection().size();
-            int min = (getFullElements().length < 2 ? 0 : 2);
-            int max = (getFullElements().length <= 5 ? getFullElements().length - 1 : 5);
+            int min = getFullElements().length < 2 ? 0 : 2;
+            int max = getFullElements().length <= 5 ? getFullElements().length - 1 : 5;
             assertTrue("Collection should changed by partial retainAll",
                     getCollection().retainAll(elements.subList(min, max)));
             getConfirmed().retainAll(elements.subList(min, max));
@@ -1051,7 +1051,7 @@ public abstract class AbstractCollection
                     continue;
                 }
                 if (array[i] == confirmedArray[j]
-                        || (array[i] != null && array[i].equals(confirmedArray[j]))) {
+                        || array[i] != null && array[i].equals(confirmedArray[j])) {
                     matched[j] = true;
                     match = true;
                     break;
@@ -1105,7 +1105,7 @@ public abstract class AbstractCollection
         // TODO: It'd be nicer to detect a common superclass
         HashSet<Class<?>> classes = new HashSet<Class<?>>();
         for (Object element : array) {
-            classes.add((element == null) ? null : element.getClass());
+            classes.add(element == null ? null : element.getClass());
         }
         if (classes.size() > 1) {
             return;

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/comparators/BooleanComparatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/comparators/BooleanComparatorTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/comparators/BooleanComparatorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/comparators/BooleanComparatorTest.java Mon Jan  7 17:04:52 2013
@@ -92,8 +92,8 @@ public class BooleanComparatorTest exten
         assertEquals(new BooleanComparator(true),BooleanComparator.getTrueFirstComparator());
         assertSame(BooleanComparator.getTrueFirstComparator(),BooleanComparator.booleanComparator(true));
 
-        assertTrue(!(new BooleanComparator().equals(new BooleanComparator(true))));
-        assertTrue(!(new BooleanComparator(true).equals(new BooleanComparator(false))));
+        assertTrue(!new BooleanComparator().equals(new BooleanComparator(true)));
+        assertTrue(!new BooleanComparator(true).equals(new BooleanComparator(false)));
     }
 
     // utilities

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractMapIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractMapIteratorTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractMapIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractMapIteratorTest.java Mon Jan  7 17:04:52 2013
@@ -193,7 +193,7 @@ public abstract class AbstractMapIterato
         }
 
         V newValue = addSetValues()[0];
-        V newValue2 = (addSetValues().length == 1 ? addSetValues()[0] : addSetValues()[1]);
+        V newValue2 = addSetValues().length == 1 ? addSetValues()[0] : addSetValues()[1];
         MapIterator<K, V> it = makeObject();
         Map<K, V> map = getMap();
         Map<K, V> confirmed = getConfirmedMap();

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayIterator2Test.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayIterator2Test.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayIterator2Test.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayIterator2Test.java Mon Jan  7 17:04:52 2013
@@ -75,7 +75,7 @@ public class ArrayIterator2Test<E> exten
         } catch (Exception e) {
             assertTrue(
                 "NoSuchElementException must be thrown",
-                e.getClass().equals((new NoSuchElementException()).getClass()));
+                e.getClass().equals(new NoSuchElementException().getClass()));
         }
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayIteratorTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayIteratorTest.java Mon Jan  7 17:04:52 2013
@@ -64,7 +64,7 @@ public class ArrayIteratorTest<E> extend
         } catch (Exception e) {
             assertTrue(
                 "NoSuchElementException must be thrown",
-                e.getClass().equals((new NoSuchElementException()).getClass()));
+                e.getClass().equals(new NoSuchElementException().getClass()));
         }
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayListIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayListIteratorTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayListIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayListIteratorTest.java Mon Jan  7 17:04:52 2013
@@ -79,7 +79,7 @@ public class ArrayListIteratorTest<E> ex
         } catch (Exception e) {
             assertTrue(
                 "NoSuchElementException must be thrown",
-                e.getClass().equals((new NoSuchElementException()).getClass()));
+                e.getClass().equals(new NoSuchElementException().getClass()));
         }
 
     }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/CollatingIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/CollatingIteratorTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/CollatingIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/CollatingIteratorTest.java Mon Jan  7 17:04:52 2013
@@ -121,7 +121,7 @@ public class CollatingIteratorTest exten
         for (int i = 0; i < 20; i++) {
             assertTrue(iter.hasNext());
             assertEquals(new Integer(i),iter.next());
-            assertEquals((i % 2) == 0 ? 1 : 0,iter.getIteratorIndex());
+            assertEquals(i % 2 == 0 ? 1 : 0,iter.getIteratorIndex());
         }
         assertTrue(!iter.hasNext());
     }
@@ -235,7 +235,7 @@ public class CollatingIteratorTest exten
                 iter.remove();
             }
         }
-        assertEquals(expectedSize, (evens.size() + odds.size()));
+        assertEquals(expectedSize, evens.size() + odds.size());
     }
 
     public void testNullComparator() {

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/IteratorChainTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/IteratorChainTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/IteratorChainTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/IteratorChainTest.java Mon Jan  7 17:04:52 2013
@@ -86,7 +86,7 @@ public class IteratorChainTest extends A
             iter.next();
         } catch (Exception e) {
             assertTrue("NoSuchElementException must be thrown", 
-                       e.getClass().equals((new NoSuchElementException()).getClass()));
+                       e.getClass().equals(new NoSuchElementException().getClass()));
         }
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ListIteratorWrapper2Test.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ListIteratorWrapper2Test.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ListIteratorWrapper2Test.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ListIteratorWrapper2Test.java Mon Jan  7 17:04:52 2013
@@ -77,7 +77,7 @@ public class ListIteratorWrapper2Test<E>
             iter.next();
         } catch (Exception e) {
             assertTrue("NoSuchElementException must be thrown",
-                       e.getClass().equals((new NoSuchElementException()).getClass()));
+                       e.getClass().equals(new NoSuchElementException().getClass()));
         }
 
         // now, read it backwards
@@ -92,7 +92,7 @@ public class ListIteratorWrapper2Test<E>
             iter.previous();
         } catch (Exception e) {
             assertTrue("NoSuchElementException must be thrown",
-                       e.getClass().equals((new NoSuchElementException()).getClass()));
+                       e.getClass().equals(new NoSuchElementException().getClass()));
         }
 
         // now, read it forwards again

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ListIteratorWrapperTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ListIteratorWrapperTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ListIteratorWrapperTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ListIteratorWrapperTest.java Mon Jan  7 17:04:52 2013
@@ -78,7 +78,7 @@ public class ListIteratorWrapperTest<E> 
             iter.next();
         } catch (Exception e) {
             assertTrue("NoSuchElementException must be thrown",
-                       e.getClass().equals((new NoSuchElementException()).getClass()));
+                       e.getClass().equals(new NoSuchElementException().getClass()));
         }
 
         // now, read it backwards
@@ -93,7 +93,7 @@ public class ListIteratorWrapperTest<E> 
             iter.previous();
         } catch (Exception e) {
             assertTrue("NoSuchElementException must be thrown",
-                       e.getClass().equals((new NoSuchElementException()).getClass()));
+                       e.getClass().equals(new NoSuchElementException().getClass()));
         }
 
         // now, read it forwards again

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayIteratorTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayIteratorTest.java Mon Jan  7 17:04:52 2013
@@ -80,7 +80,7 @@ public class ObjectArrayIteratorTest<E> 
         } catch (Exception e) {
             assertTrue(
                 "NoSuchElementException must be thrown",
-                e.getClass().equals((new NoSuchElementException()).getClass()));
+                e.getClass().equals(new NoSuchElementException().getClass()));
         }
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayListIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayListIteratorTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayListIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayListIteratorTest.java Mon Jan  7 17:04:52 2013
@@ -76,7 +76,7 @@ public class ObjectArrayListIteratorTest
         } catch (Exception e) {
             assertTrue(
                 "NoSuchElementException must be thrown",
-                e.getClass().equals((new NoSuchElementException()).getClass()));
+                e.getClass().equals(new NoSuchElementException().getClass()));
         }
 
     }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonIterator2Test.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonIterator2Test.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonIterator2Test.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonIterator2Test.java Mon Jan  7 17:04:52 2013
@@ -77,7 +77,7 @@ public class SingletonIterator2Test<E> e
         } catch (Exception e) {
             assertTrue(
                 "NoSuchElementException must be thrown",
-                e.getClass().equals((new NoSuchElementException()).getClass()));
+                e.getClass().equals(new NoSuchElementException().getClass()));
         }
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonIteratorTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonIteratorTest.java Mon Jan  7 17:04:52 2013
@@ -78,7 +78,7 @@ public class SingletonIteratorTest<E> ex
         } catch (Exception e) {
             assertTrue(
                 "NoSuchElementException must be thrown",
-                e.getClass().equals((new NoSuchElementException()).getClass()));
+                e.getClass().equals(new NoSuchElementException().getClass()));
         }
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonListIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonListIteratorTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonListIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonListIteratorTest.java Mon Jan  7 17:04:52 2013
@@ -103,14 +103,14 @@ public class SingletonListIteratorTest<E
             iter.next();
         } catch (Exception e) {
           assertTrue("NoSuchElementException must be thrown", 
-             e.getClass().equals((new NoSuchElementException()).getClass()));
+             e.getClass().equals(new NoSuchElementException().getClass()));
         }
         iter.previous();
         try {
             iter.previous();
         } catch (Exception e) {
           assertTrue("NoSuchElementException must be thrown", 
-             e.getClass().equals((new NoSuchElementException()).getClass()));
+             e.getClass().equals(new NoSuchElementException().getClass()));
         }
     }
     

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UniqueFilterIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UniqueFilterIteratorTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UniqueFilterIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UniqueFilterIteratorTest.java Mon Jan  7 17:04:52 2013
@@ -80,7 +80,7 @@ public class UniqueFilterIteratorTest<E>
             iter.next();
         } catch (Exception e) {
             assertTrue("NoSuchElementException must be thrown", 
-                       e.getClass().equals((new NoSuchElementException()).getClass()));
+                       e.getClass().equals(new NoSuchElementException().getClass()));
         }
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/AbstractListTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/AbstractListTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/AbstractListTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/AbstractListTest.java Mon Jan  7 17:04:52 2013
@@ -625,9 +625,9 @@ public abstract class AbstractListTest<E
 
         for (int i = 0; i < elements.length; i++) {
             E n = other[i % other.length];
-            E v = (getCollection()).set(i, n);
+            E v = getCollection().set(i, n);
             assertEquals("Set should return correct element", elements[i], v);
-            (getConfirmed()).set(i, n);
+            getConfirmed().set(i, n);
             verify();
         }
     }
@@ -643,7 +643,7 @@ public abstract class AbstractListTest<E
 
         resetFull();
         try {
-            (getCollection()).set(0, getFullElements()[0]);
+            getCollection().set(0, getFullElements()[0]);
             fail("Emtpy collection should not support set.");
         } catch (UnsupportedOperationException e) {
             // expected
@@ -754,8 +754,8 @@ public abstract class AbstractListTest<E
         int max = getFullElements().length;
         for (int i = 0; i < max; i++) {
             resetFull();
-            E o1 = (getCollection()).remove(i);
-            E o2 = (getConfirmed()).remove(i);
+            E o1 = getCollection().remove(i);
+            E o2 = getConfirmed().remove(i);
             assertEquals("remove should return correct element", o1, o2);
             verify();
         }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/CursorableLinkedListTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/CursorableLinkedListTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/CursorableLinkedListTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/CursorableLinkedListTest.java Mon Jan  7 17:04:52 2013
@@ -1400,7 +1400,7 @@ public class CursorableLinkedListTest<E>
         assertEquals("5", elts[4]);
         assertEquals(5, elts.length);
 
-        String[] elts2 = (list.toArray(new String[0]));
+        String[] elts2 = list.toArray(new String[0]);
         assertEquals("1", elts2[0]);
         assertEquals("2", elts2[1]);
         assertEquals("3", elts2[2]);
@@ -1418,7 +1418,7 @@ public class CursorableLinkedListTest<E>
         assertEquals(5, elts3.length);
 
         String[] elts4 = new String[3];
-        String[] elts4b = (list.toArray(elts4));
+        String[] elts4b = list.toArray(elts4);
         assertTrue(elts4 != elts4b);
         assertEquals("1", elts4b[0]);
         assertEquals("2", elts4b[1]);

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/SetUniqueListTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/SetUniqueListTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/SetUniqueListTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/SetUniqueListTest.java Mon Jan  7 17:04:52 2013
@@ -593,7 +593,7 @@ public class SetUniqueListTest<E> extend
         // make sure retainAll completes under 5 seconds
         // TODO if test is migrated to JUnit 4, add a Timeout rule.
         // http://kentbeck.github.com/junit/javadoc/latest/org/junit/rules/Timeout.html
-        assertTrue((stop - start) < 5000);
+        assertTrue(stop - start < 5000);
     }
     
     @SuppressWarnings("serial")

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/AbstractMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/AbstractMapTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/AbstractMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/AbstractMapTest.java Mon Jan  7 17:04:52 2013
@@ -305,7 +305,7 @@ public abstract class AbstractMapTest<K,
             "hello", "goodbye", "we'll", "see", "you", "all", "again",
             "key",
             "key2",
-            (isAllowNullKey() && !JDK12) ? null : "nonnullkey"
+            isAllowNullKey() && !JDK12 ? null : "nonnullkey"
         };
         return (K[]) result;
     }
@@ -358,9 +358,9 @@ public abstract class AbstractMapTest<K,
         Object[] result = new Object[] {
             "blahv", "foov", "barv", "bazv", "tmpv", "goshv", "gollyv", "geev",
             "hellov", "goodbyev", "we'llv", "seev", "youv", "allv", "againv",
-            (isAllowNullValue() && !JDK12) ? null : "nonnullvalue",
+            isAllowNullValue() && !JDK12 ? null : "nonnullvalue",
             "value",
-            (isAllowDuplicateValues()) ? "value" : "value2",
+            isAllowDuplicateValues() ? "value" : "value2",
         };
         return (V[]) result;
     }
@@ -379,9 +379,9 @@ public abstract class AbstractMapTest<K,
     @SuppressWarnings("unchecked")
     public V[] getNewSampleValues() {
         Object[] result = new Object[] {
-            (isAllowNullValue() && !JDK12 && isAllowDuplicateValues()) ? null : "newnonnullvalue",
+            isAllowNullValue() && !JDK12 && isAllowDuplicateValues() ? null : "newnonnullvalue",
             "newvalue",
-            (isAllowDuplicateValues()) ? "newvalue" : "newvalue2",
+            isAllowDuplicateValues() ? "newvalue" : "newvalue2",
             "newblahv", "newfoov", "newbarv", "newbazv", "newtmpv", "newgoshv",
             "newgollyv", "newgeev", "newhellov", "newgoodbyev", "newwe'llv",
             "newseev", "newyouv", "newallv", "newagainv",
@@ -505,11 +505,11 @@ public abstract class AbstractMapTest<K,
         for (int i = 0; i < keys.length - 1; i++) {
             for (int j = i + 1; j < keys.length; j++) {
                 assertTrue("failure in test: duplicate null keys.",
-                        (keys[i] != null || keys[j] != null));
+                        keys[i] != null || keys[j] != null);
                 assertTrue(
                         "failure in test: duplicate non-null key.",
-                        (keys[i] == null || keys[j] == null || (!keys[i].equals(keys[j]) && !keys[j]
-                                .equals(keys[i]))));
+                        keys[i] == null || keys[j] == null || !keys[i].equals(keys[j]) && !keys[j]
+                                .equals(keys[i]));
             }
             assertTrue("failure in test: found null key, but isNullKeySupported " + "is false.",
                     keys[i] != null || isAllowNullKey());
@@ -1627,9 +1627,9 @@ public abstract class AbstractMapTest<K,
 
         public void testMapEntrySetIteratorEntrySetValue() {
             K key1 = getSampleKeys()[0];
-            K key2 = (getSampleKeys().length == 1 ? getSampleKeys()[0] : getSampleKeys()[1]);
+            K key2 = getSampleKeys().length == 1 ? getSampleKeys()[0] : getSampleKeys()[1];
             V newValue1 = getNewSampleValues()[0];
-            V newValue2 = (getNewSampleValues().length ==1 ? getNewSampleValues()[0] : getNewSampleValues()[1]);
+            V newValue2 = getNewSampleValues().length ==1 ? getNewSampleValues()[0] : getNewSampleValues()[1];
 
             resetFull();
             // explicitly get entries as sample values/keys are connected for some maps

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/PredicatedMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/PredicatedMapTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/PredicatedMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/PredicatedMapTest.java Mon Jan  7 17:04:52 2013
@@ -39,7 +39,7 @@ public class PredicatedMapTest<K, V> ext
 
     protected static final Predicate<Object> testPredicate = new Predicate<Object>() {
         public boolean evaluate(Object o) {
-            return (o instanceof String);
+            return o instanceof String;
         }
     };
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/PredicatedSortedMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/PredicatedSortedMapTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/PredicatedSortedMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/PredicatedSortedMapTest.java Mon Jan  7 17:04:52 2013
@@ -41,7 +41,7 @@ public class PredicatedSortedMapTest<K, 
 
     protected static final Predicate<Object> testPredicate = new Predicate<Object>() {
         public boolean evaluate(Object o) {
-            return (o instanceof String);
+            return o instanceof String;
         }
     };
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/set/ListOrderedSetTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/set/ListOrderedSetTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/set/ListOrderedSetTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/set/ListOrderedSetTest.java Mon Jan  7 17:04:52 2013
@@ -223,14 +223,14 @@ public class ListOrderedSetTest<E>
         // make sure retainAll completes under 5 seconds
         // TODO if test is migrated to JUnit 4, add a Timeout rule.
         // http://kentbeck.github.com/junit/javadoc/latest/org/junit/rules/Timeout.html
-        assertTrue((stop - start) < 5000);
+        assertTrue(stop - start < 5000);
     }
 
     static class A {
 
         @Override
         public boolean equals(Object obj) {
-            return (obj instanceof A || obj instanceof B);
+            return obj instanceof A || obj instanceof B;
         }
 
         @Override
@@ -243,7 +243,7 @@ public class ListOrderedSetTest<E>
 
         @Override
         public boolean equals(Object obj) {
-            return (obj instanceof A || obj instanceof B);
+            return obj instanceof A || obj instanceof B;
         }
 
         @Override

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/set/PredicatedSortedSetTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/set/PredicatedSortedSetTest.java?rev=1429897&r1=1429896&r2=1429897&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/set/PredicatedSortedSetTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/set/PredicatedSortedSetTest.java Mon Jan  7 17:04:52 2013
@@ -65,7 +65,7 @@ public class PredicatedSortedSetTest<E> 
     protected Predicate<E> testPredicate =
         new Predicate<E>() {
             public boolean evaluate(E o) {
-                return (o instanceof String) && (((String) o).startsWith("A"));
+                return o instanceof String && ((String) o).startsWith("A");
             }
         };