8287053: Avoid redundant HashMap.containsKey calls in ZoneInfoFile.getZoneInfo0
Reviewed-by: redestad, naoto, rriggs
This commit is contained in:
parent
414265bd83
commit
01916e1920
@ -125,10 +125,7 @@ public final class ZoneInfoFile {
|
||||
if (zi != null) {
|
||||
return zi;
|
||||
}
|
||||
String zid = zoneId;
|
||||
if (aliases.containsKey(zoneId)) {
|
||||
zid = aliases.get(zoneId);
|
||||
}
|
||||
String zid = aliases.getOrDefault(zoneId, zoneId);
|
||||
int index = Arrays.binarySearch(regions, zid);
|
||||
if (index < 0) {
|
||||
return null;
|
||||
@ -342,7 +339,7 @@ public final class ZoneInfoFile {
|
||||
}
|
||||
}
|
||||
// remove the following ids from the map, they
|
||||
// are exclued from the "old" ZoneInfo
|
||||
// are excluded from the "old" ZoneInfo
|
||||
zones.remove("ROC");
|
||||
for (int i = 0; i < versionCount; i++) {
|
||||
int aliasCount = dis.readShort();
|
||||
|
Loading…
x
Reference in New Issue
Block a user