diff --git a/src/main/java/org/apache/commons/collections/trie/ByteKeyAnalyzer.java b/src/main/java/org/apache/commons/collections/trie/ByteKeyAnalyzer.java index 2744a5b14..5f4f0efff 100644 --- a/src/main/java/org/apache/commons/collections/trie/ByteKeyAnalyzer.java +++ b/src/main/java/org/apache/commons/collections/trie/ByteKeyAnalyzer.java @@ -66,7 +66,7 @@ public class ByteKeyAnalyzer extends AbstractKeyAnalyzer { * {@inheritDoc} */ public boolean isBitSet(final Byte key, final int bitIndex, final int lengthInBits) { - return (key & mask(bitIndex)) != 0; + return (key.intValue() & mask(bitIndex)) != 0; } /** diff --git a/src/main/java/org/apache/commons/collections/trie/IntegerKeyAnalyzer.java b/src/main/java/org/apache/commons/collections/trie/IntegerKeyAnalyzer.java index 2811059ad..ad0db207b 100644 --- a/src/main/java/org/apache/commons/collections/trie/IntegerKeyAnalyzer.java +++ b/src/main/java/org/apache/commons/collections/trie/IntegerKeyAnalyzer.java @@ -66,7 +66,7 @@ public class IntegerKeyAnalyzer extends AbstractKeyAnalyzer { * {@inheritDoc} */ public boolean isBitSet(final Integer key, final int bitIndex, final int lengthInBits) { - return (key & mask(bitIndex)) != 0; + return (key.intValue() & mask(bitIndex)) != 0; } /** diff --git a/src/main/java/org/apache/commons/collections/trie/LongKeyAnalyzer.java b/src/main/java/org/apache/commons/collections/trie/LongKeyAnalyzer.java index 1a2b7ccb8..03b26a32e 100644 --- a/src/main/java/org/apache/commons/collections/trie/LongKeyAnalyzer.java +++ b/src/main/java/org/apache/commons/collections/trie/LongKeyAnalyzer.java @@ -66,7 +66,7 @@ public class LongKeyAnalyzer extends AbstractKeyAnalyzer { * {@inheritDoc} */ public boolean isBitSet(final Long key, final int bitIndex, final int lengthInBits) { - return (key & mask(bitIndex)) != 0; + return (key.longValue() & mask(bitIndex)) != 0; } /** diff --git a/src/main/java/org/apache/commons/collections/trie/ShortKeyAnalyzer.java b/src/main/java/org/apache/commons/collections/trie/ShortKeyAnalyzer.java index 652811638..f936b7447 100644 --- a/src/main/java/org/apache/commons/collections/trie/ShortKeyAnalyzer.java +++ b/src/main/java/org/apache/commons/collections/trie/ShortKeyAnalyzer.java @@ -66,7 +66,7 @@ public class ShortKeyAnalyzer implements KeyAnalyzer { * {@inheritDoc} */ public boolean isBitSet(final Short key, final int bitIndex, final int lengthInBits) { - return (key & mask(bitIndex)) != 0; + return (key.intValue() & mask(bitIndex)) != 0; } /**