commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1477737 - /commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/trie/CharacterKeyAnalyzer.java
Date Tue, 30 Apr 2013 17:49:13 GMT
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) {



Mime
View raw message