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:50:46 UTC
svn commit: r1477738 -
/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/trie/CharacterKeyAnalyzer.java
Author: sebb
Date: Tue Apr 30 17:50:45 2013
New Revision: 1477738
URL: http://svn.apache.org/r1477738
Log:
Explicit boxing shows that NPE may occur so document it
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=1477738&r1=1477737&r2=1477738&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:50:45 2013
@@ -65,9 +65,10 @@ public class CharacterKeyAnalyzer extend
/**
* {@inheritDoc}
+ * @throws NullPointerException if the key is null
*/
public boolean isBitSet(final Character key, final int bitIndex, final int lengthInBits) {
- return (key & mask(bitIndex)) != 0;
+ return (key.charValue() & mask(bitIndex)) != 0;
}
/**