HBASE-23983 Fixed Spotbugs complaint in RegionStates related to ignored return value

Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
Jan Hentschel 2020-03-25 00:02:54 +01:00 committed by GitHub
parent 84977eeebb
commit aa966e354a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -129,7 +129,11 @@ public class RegionStates {
synchronized (regionsMapLock) {
RegionStateNode node = regionsMap.computeIfAbsent(regionInfo.getRegionName(),
key -> new RegionStateNode(regionInfo, regionInTransition));
encodedRegionsMap.putIfAbsent(regionInfo.getEncodedName(), node);
if (encodedRegionsMap.get(regionInfo.getEncodedName()) != node) {
encodedRegionsMap.put(regionInfo.getEncodedName(), node);
}
return node;
}
}