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 Nick Dimiduk
parent 0c85952a8f
commit 6bc84de563
1 changed files with 5 additions and 1 deletions

View File

@ -126,7 +126,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;
}
}