HBASE-19239 Fix findbugs and error-prone issues
Fixes for hbase-prefix-tree
This commit is contained in:
parent
5b7411290b
commit
24feb1ab75
|
@ -186,7 +186,7 @@ public class RowSectionWriter {
|
|||
ArrayList<TokenizerNode> outs = Lists.newArrayList();
|
||||
for (int i = ins.size() - 1; i >= 0; --i) {
|
||||
TokenizerNode n = ins.get(i);
|
||||
if (n.isLeaf() && leaves || (!n.isLeaf() && !leaves)) {
|
||||
if ((n.isLeaf() && leaves) || (!n.isLeaf() && !leaves)) {
|
||||
outs.add(ins.get(i));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -312,7 +312,7 @@ public class TokenizerNode{
|
|||
|
||||
public void appendNodesToExternalList(List<TokenizerNode> appendTo, boolean includeNonLeaves,
|
||||
boolean includeLeaves) {
|
||||
if (includeNonLeaves && !isLeaf() || includeLeaves && isLeaf()) {
|
||||
if ((includeNonLeaves && !isLeaf()) || (includeLeaves && isLeaf())) {
|
||||
appendTo.add(this);
|
||||
}
|
||||
for (int i = 0; i < children.size(); ++i) {
|
||||
|
|
|
@ -72,7 +72,7 @@ public class UFIntTool {
|
|||
public static void writeBytes(int outputWidth, final long value, byte[] bytes, int offset) {
|
||||
bytes[offset + outputWidth - 1] = (byte) value;
|
||||
for (int i = outputWidth - 2; i >= 0; --i) {
|
||||
bytes[offset + i] = (byte) (value >>> (outputWidth - i - 1) * 8);
|
||||
bytes[offset + i] = (byte) (value >>> ((outputWidth - i - 1) * 8));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue