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