HBASE-18365 Eliminate the findbugs warnings for hbase-common

This commit is contained in:
Chia-Ping Tsai 2017-07-13 19:31:59 +08:00
parent 22df926541
commit cf636e50b9
2 changed files with 4 additions and 3 deletions

View File

@ -179,8 +179,9 @@ public class DynamicClassLoader extends ClassLoaderBase {
private synchronized void loadNewJars() {
// Refresh local jar file lists
if (localDir != null) {
for (File file : localDir.listFiles()) {
File[] files = localDir == null ? null : localDir.listFiles();
if (files != null) {
for (File file : files) {
String fileName = file.getName();
if (jarModifiedTime.containsKey(fileName)) {
continue;

View File

@ -461,7 +461,7 @@ public class OrderedBytes {
static int lengthVaruint64(PositionedByteRange src, boolean comp) {
int a0 = (comp ? DESCENDING : ASCENDING).apply(src.peek()) & 0xff;
if (a0 <= 240) return 1;
if (a0 >= 241 && a0 <= 248) return 2;
if (a0 <= 248) return 2;
if (a0 == 249) return 3;
if (a0 == 250) return 4;
if (a0 == 251) return 5;