Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 32B06F2DA for ; Tue, 30 Apr 2013 17:49:37 +0000 (UTC) Received: (qmail 36969 invoked by uid 500); 30 Apr 2013 17:49:37 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 36904 invoked by uid 500); 30 Apr 2013 17:49:36 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 36897 invoked by uid 99); 30 Apr 2013 17:49:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Apr 2013 17:49:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Apr 2013 17:49:34 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 6B00E23889E7; Tue, 30 Apr 2013 17:49:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@commons.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130430174913.6B00E23889E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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) {