8265746: Update java.time to use instanceof pattern variable (part II)

Reviewed-by: dfuchs, lancea, rriggs, chegar, naoto
This commit is contained in:
Patrick Concannon 2021-04-26 08:32:20 +00:00
parent a85f6cbbaa
commit 45c5da0fd3
20 changed files with 104 additions and 152 deletions

View file

@ -130,8 +130,7 @@ final class TzdbZoneRulesProvider extends ZoneRulesProvider {
throw new ZoneRulesException("Unknown time-zone ID: " + zoneId);
}
try {
if (obj instanceof byte[]) {
byte[] bytes = (byte[]) obj;
if (obj instanceof byte[] bytes) {
DataInputStream dis = new DataInputStream(new ByteArrayInputStream(bytes));
obj = Ser.read(dis);
regionToRules.put(zoneId, obj);