HBASE-26035 Redundant null check in the compareTo function (#3433)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
84f9900c99
commit
1c28633fba
|
@ -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