HBASE-26035 Redundant null check in the compareTo function (#3433)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
1d6eb77ef8
commit
1f1e6219a5
|
@ -180,13 +180,7 @@ public class MetricsRegionSourceImpl implements MetricsRegionSource {
|
|||
if (!(source instanceof MetricsRegionSourceImpl)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
MetricsRegionSourceImpl impl = (MetricsRegionSourceImpl) source;
|
||||
if (impl == null) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return Long.compare(hashCode, impl.hashCode);
|
||||
return Long.compare(hashCode, ((MetricsRegionSourceImpl) source).hashCode);
|
||||
}
|
||||
|
||||
void snapshot(MetricsRecordBuilder mrb, boolean ignored) {
|
||||
|
|
Loading…
Reference in New Issue