mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-18 19:25:49 +00:00
ICU-8626 Set time zone ID in the OlsonTimeZone constructor, not via setID after creation.
X-SVN-Rev: 30197
This commit is contained in:
parent
2e84d2861b
commit
3fafa85a60
2 changed files with 4 additions and 3 deletions
|
@ -444,8 +444,10 @@ public class OlsonTimeZone extends BasicTimeZone {
|
|||
* @param top the top-level zoneinfo resource bundle. This is used
|
||||
* to lookup the rule that `res' may refer to, if there is one.
|
||||
* @param res the resource bundle of the zone to be constructed
|
||||
* @param id time zone ID
|
||||
*/
|
||||
public OlsonTimeZone(UResourceBundle top, UResourceBundle res){
|
||||
public OlsonTimeZone(UResourceBundle top, UResourceBundle res, String id){
|
||||
super.setID(id);
|
||||
construct(top, res);
|
||||
}
|
||||
|
||||
|
|
|
@ -501,8 +501,7 @@ public final class ZoneMeta {
|
|||
UResourceBundle top = UResourceBundle.getBundleInstance(
|
||||
ICUResourceBundle.ICU_BASE_NAME, ZONEINFORESNAME, ICUResourceBundle.ICU_DATA_CLASS_LOADER);
|
||||
UResourceBundle res = openOlsonResource(top, id);
|
||||
z = new OlsonTimeZone(top, res);
|
||||
z.setID(id);
|
||||
z = new OlsonTimeZone(top, res, id);
|
||||
SYSTEM_ZONE_CACHE.put(id, z);
|
||||
}catch(Exception ex){
|
||||
return null;
|
||||
|
|
Loading…
Add table
Reference in a new issue