< prev index next >
make/jdk/src/classes/build/tools/tzdb/TzdbZoneRulesProvider.java
Print this page
rev 51769 : imported patch 8209880
*** 1,7 ****
/*
! * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 31,51 ****
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
- import java.util.HashMap;
- import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.NavigableMap;
import java.util.Objects;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
! import java.util.concurrent.ConcurrentHashMap;
import java.time.*;
import java.time.Year;
import java.time.chrono.IsoChronology;
import java.time.temporal.TemporalAdjusters;
import java.time.zone.ZoneOffsetTransition;
--- 31,49 ----
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.NavigableMap;
import java.util.Objects;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
! import java.util.concurrent.ConcurrentSkipListMap;
import java.time.*;
import java.time.Year;
import java.time.chrono.IsoChronology;
import java.time.temporal.TemporalAdjusters;
import java.time.zone.ZoneOffsetTransition;
*** 129,160 ****
private List<String> regionIds = new ArrayList<>(600);
/**
* Zone region to rules mapping
*/
! private final Map<String, Object> zones = new ConcurrentHashMap<>();
/**
* compatibility list
*/
! private static HashSet<String> excludedZones;
static {
// (1) exclude EST, HST and MST. They are supported
// via the short-id mapping
// (2) remove UTC and GMT
// (3) remove ROC, which is not supported in j.u.tz
! excludedZones = new HashSet<>(10);
excludedZones.add("EST");
excludedZones.add("HST");
excludedZones.add("MST");
excludedZones.add("GMT+0");
excludedZones.add("GMT-0");
excludedZones.add("ROC");
}
! private Map<String, String> links = new HashMap<>(150);
! private Map<String, List<RuleLine>> rules = new HashMap<>(500);
private void load(List<Path> files) throws IOException {
for (Path file : files) {
List<ZoneLine> openZone = null;
--- 127,158 ----
private List<String> regionIds = new ArrayList<>(600);
/**
* Zone region to rules mapping
*/
! private final Map<String, Object> zones = new ConcurrentSkipListMap<>();
/**
* compatibility list
*/
! private static Set<String> excludedZones;
static {
// (1) exclude EST, HST and MST. They are supported
// via the short-id mapping
// (2) remove UTC and GMT
// (3) remove ROC, which is not supported in j.u.tz
! excludedZones = new TreeSet<>();
excludedZones.add("EST");
excludedZones.add("HST");
excludedZones.add("MST");
excludedZones.add("GMT+0");
excludedZones.add("GMT-0");
excludedZones.add("ROC");
}
! private Map<String, String> links = new TreeMap<>();
! private Map<String, List<RuleLine>> rules = new TreeMap<>();
private void load(List<Path> files) throws IOException {
for (Path file : files) {
List<ZoneLine> openZone = null;
< prev index next >