HBASE-20669 [findbugs] autoboxing to parse primitive

Signed-off-by: Sean Busbey <busbey@apache.org>
This commit is contained in:
Wei-Chiu Chuang 2018-06-01 13:25:56 -05:00 committed by Sean Busbey
parent 7c1366de45
commit f1eda99451
1 changed files with 1 additions and 1 deletions

View File

@ -576,7 +576,7 @@ public class HColumnDescriptor implements WritableComparable<HColumnDescriptor>
cachedMaxVersions = UNINITIALIZED;
} else if (Bytes.compareTo(REPLICATION_SCOPE_BYTES, key) == 0) {
// as bytes are encoded from string, we have to decode value as string
int scopeType = Integer.valueOf(Bytes.toString(value));
int scopeType = Integer.parseInt(Bytes.toString(value));
if (scopeType != WALProtos.ScopeType.REPLICATION_SCOPE_GLOBAL_VALUE &&
scopeType != WALProtos.ScopeType.REPLICATION_SCOPE_LOCAL_VALUE) {
throw new IllegalArgumentException("Invalid value '" + scopeType +