You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2013/04/30 19:49:13 UTC

svn commit: r1477737 - /commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/trie/CharacterKeyAnalyzer.java

Author: sebb
Date: Tue Apr 30 17:49:12 2013
New Revision: 1477737

URL: http://svn.apache.org/r1477737
Log:
Unnecessary code - the null check is already done below

Modified:
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/trie/CharacterKeyAnalyzer.java

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/trie/CharacterKeyAnalyzer.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/trie/CharacterKeyAnalyzer.java?rev=1477737&r1=1477736&r2=1477737&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/trie/CharacterKeyAnalyzer.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/trie/CharacterKeyAnalyzer.java Tue Apr 30 17:49:12 2013
@@ -74,7 +74,7 @@ public class CharacterKeyAnalyzer extend
      * {@inheritDoc}
      */
     public int bitIndex(final Character key, final int offsetInBits, final int lengthInBits, 
-            Character other, final int otherOffsetInBits, final int otherLengthInBits) {
+            final Character other, final int otherOffsetInBits, final int otherLengthInBits) {
         
         if (offsetInBits != 0 || otherOffsetInBits != 0) {
             throw new IllegalArgumentException("offsetInBits=" + offsetInBits 
@@ -85,11 +85,7 @@ public class CharacterKeyAnalyzer extend
         if (keyValue == Character.MIN_VALUE) {
             return NULL_BIT_KEY;
         }
-        
-        if (other == null) {
-            other = Character.MIN_VALUE;
-        }
-        
+
         final char otherValue = other != null ? other.charValue() : Character.MIN_VALUE;
         
         if (keyValue != otherValue) {