jdk/test/java/util/PluggableLocale/TimeZoneNameProviderTest.java
author naoto
Tue, 21 Aug 2012 11:00:30 -0700
changeset 13583 dc0017b1a452
parent 10138 b7572da25d15
child 14185 916ec0a4d039
permissions -rw-r--r--
6336885: RFE: Locale Data Deployment Enhancements 4609153: Provide locale data for Indic locales 5104387: Support for gl_ES locale (galician language) 6337471: desktop/system locale preferences support 7056139: (cal) SPI support for locale-dependent Calendar parameters 7058206: Provide CalendarData SPI for week params and display field value names 7073852: Support multiple scripts for digits and decimal symbols per locale 7079560: [Fmt-Da] Context dependent month names support in SimpleDateFormat 7171324: getAvailableLocales() of locale sensitive services should return the actual availability of locales 7151414: (cal) Support calendar type identification 7168528: LocaleServiceProvider needs to be aware of Locale extensions 7171372: (cal) locale's default Calendar should be created if unknown calendar is specified Summary: JEP 127: Improve Locale Data Packaging and Adopt Unicode CLDR Data (part 1 w/o packaging changes. by Naoto Sato and Masayoshi Okutsu) Reviewed-by: erikj, sherman, peytoia
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents: 10138
diff changeset
     2
 * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
import java.text.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.util.*;
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents: 10138
diff changeset
    29
import sun.util.locale.provider.*;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import sun.util.resources.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
public class TimeZoneNameProviderTest extends ProviderTest {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
    com.bar.TimeZoneNameProviderImpl tznp = new com.bar.TimeZoneNameProviderImpl();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
    public static void main(String[] s) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
        new TimeZoneNameProviderTest();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
    TimeZoneNameProviderTest() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
        test1();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
        test2();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
        aliasTest();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
    void test1() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
        Locale[] available = Locale.getAvailableLocales();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
        List<Locale> providerLocales = Arrays.asList(tznp.getAvailableLocales());
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
        String[] ids = TimeZone.getAvailableIDs();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
        for (Locale target: available) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
            // pure JRE implementation
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents: 10138
diff changeset
    53
            OpenListResourceBundle rb = LocaleProviderAdapter.forJRE().getLocaleData().getTimeZoneNames(target);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
            boolean jreHasBundle = rb.getLocale().equals(target);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
            for (String id: ids) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
                // the time zone
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
                TimeZone tz = TimeZone.getTimeZone(id);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
                // JRE string array for the id
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
                String[] jrearray = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
                if (jreHasBundle) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
                    try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
                        jrearray = rb.getStringArray(id);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
                    } catch (MissingResourceException mre) {}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
                for (int i = 1; i <=(tz.useDaylightTime()?4:2); i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
                    // the localized name
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
                    String name = tz.getDisplayName(i>=3, i%2, target);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
                    // provider's name (if any)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
                    String providersname = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
                    if (providerLocales.contains(target)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
                        providersname = tznp.getDisplayName(id, i>=3, i%2, target);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
                    // JRE's name (if any)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
                    String jresname = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
                    if (jrearray != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
                        jresname = jrearray[i];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
                    checkValidity(target, jresname, providersname, name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
                        jreHasBundle && rb.handleGetKeys().contains(id));
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
    final String pattern = "z";
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
    final Locale OSAKA = new Locale("ja", "JP", "osaka");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
    final Locale KYOTO = new Locale("ja", "JP", "kyoto");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
    final String[] TIMEZONES = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
        "GMT", "America/Los_Angeles", "SystemV/PST8",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
        "SystemV/PST8PDT", "PST8PDT",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
    final String[] DISPLAY_NAMES_OSAKA = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
        tznp.getDisplayName(TIMEZONES[0], false, TimeZone.SHORT, OSAKA),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
        tznp.getDisplayName(TIMEZONES[1], false, TimeZone.SHORT, OSAKA),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
        tznp.getDisplayName(TIMEZONES[2], false, TimeZone.SHORT, OSAKA),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
        tznp.getDisplayName(TIMEZONES[3], false, TimeZone.SHORT, OSAKA),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
        tznp.getDisplayName(TIMEZONES[4], false, TimeZone.SHORT, OSAKA)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
    final String[] DISPLAY_NAMES_KYOTO = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
        tznp.getDisplayName(TIMEZONES[0], false, TimeZone.SHORT, KYOTO),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
        tznp.getDisplayName(TIMEZONES[1], false, TimeZone.SHORT, KYOTO),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
        tznp.getDisplayName(TIMEZONES[2], false, TimeZone.SHORT, KYOTO),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
        tznp.getDisplayName(TIMEZONES[3], false, TimeZone.SHORT, KYOTO),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        tznp.getDisplayName(TIMEZONES[4], false, TimeZone.SHORT, KYOTO)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
    void test2() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
        Locale defaultLocale = Locale.getDefault();
10138
b7572da25d15 7068662: Reserve and restore the default locale
xuelei
parents: 5506
diff changeset
   116
        TimeZone reservedTimeZone = TimeZone.getDefault();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
        Date d = new Date(2005-1900, Calendar.DECEMBER, 22);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
        String formatted;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
        TimeZone tz;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
        SimpleDateFormat df;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
            for (int i = 0; i < TIMEZONES.length; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
                tz = TimeZone.getTimeZone(TIMEZONES[i]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
                TimeZone.setDefault(tz);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
                df = new SimpleDateFormat(pattern, DateFormatSymbols.getInstance(OSAKA));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
                Locale.setDefault(defaultLocale);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
                System.out.println(formatted = df.format(d));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
                if(!formatted.equals(DISPLAY_NAMES_OSAKA[i])) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
                    throw new RuntimeException("TimeZone " + TIMEZONES[i] +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
                        ": formatted zone names mismatch. " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
                        formatted + " should match with " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
                        DISPLAY_NAMES_OSAKA[i]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
                df.parse(DISPLAY_NAMES_OSAKA[i]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
                Locale.setDefault(KYOTO);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
                df = new SimpleDateFormat(pattern, DateFormatSymbols.getInstance());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
                System.out.println(formatted = df.format(d));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
                if(!formatted.equals(DISPLAY_NAMES_KYOTO[i])) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
                    throw new RuntimeException("Timezone " + TIMEZONES[i] +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
                        ": formatted zone names mismatch. " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
                        formatted + " should match with " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
                        DISPLAY_NAMES_KYOTO[i]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
                df.parse(DISPLAY_NAMES_KYOTO[i]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
        } catch (ParseException pe) {
10138
b7572da25d15 7068662: Reserve and restore the default locale
xuelei
parents: 5506
diff changeset
   151
            throw new RuntimeException("parse error occured" + pe);
b7572da25d15 7068662: Reserve and restore the default locale
xuelei
parents: 5506
diff changeset
   152
        } finally {
b7572da25d15 7068662: Reserve and restore the default locale
xuelei
parents: 5506
diff changeset
   153
            // restore the reserved locale and time zone
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
            Locale.setDefault(defaultLocale);
10138
b7572da25d15 7068662: Reserve and restore the default locale
xuelei
parents: 5506
diff changeset
   155
            TimeZone.setDefault(reservedTimeZone);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
    final String LATIME = "America/Los_Angeles";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
    final String PST = "PST";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
    final String PST8PDT = "PST8PDT";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
    final String US_PACIFIC = "US/Pacific";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
    final String LATIME_IN_OSAKA =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
        tznp.getDisplayName(LATIME, false, TimeZone.LONG, OSAKA);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
    final String TOKYOTIME = "Asia/Tokyo";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
    final String JST = "JST";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
    final String JAPAN = "Japan";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
    final String JST_IN_OSAKA =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
        tznp.getDisplayName(JST, false, TimeZone.LONG, OSAKA);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
    void aliasTest() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
        // Check that provider's name for a standard id (America/Los_Angeles) is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
        // propagated to its aliases
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
        String latime = TimeZone.getTimeZone(LATIME).getDisplayName(OSAKA);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
        if (!LATIME_IN_OSAKA.equals(latime)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
            throw new RuntimeException("Could not get provider's localized name.  result: "+latime+" expected: "+LATIME_IN_OSAKA);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
        String pst = TimeZone.getTimeZone(PST).getDisplayName(OSAKA);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
        if (!LATIME_IN_OSAKA.equals(pst)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
            throw new RuntimeException("Provider's localized name is not available for an alias ID: "+PST+".  result: "+pst+" expected: "+LATIME_IN_OSAKA);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
        String us_pacific = TimeZone.getTimeZone(US_PACIFIC).getDisplayName(OSAKA);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
        if (!LATIME_IN_OSAKA.equals(us_pacific)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
            throw new RuntimeException("Provider's localized name is not available for an alias ID: "+US_PACIFIC+".  result: "+us_pacific+" expected: "+LATIME_IN_OSAKA);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
        // Check that provider's name for an alias id (JST) is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
        // propagated to its standard id and alias ids.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
        String jstime = TimeZone.getTimeZone(JST).getDisplayName(OSAKA);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
        if (!JST_IN_OSAKA.equals(jstime)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
            throw new RuntimeException("Could not get provider's localized name.  result: "+jstime+" expected: "+JST_IN_OSAKA);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
        String tokyotime = TimeZone.getTimeZone(TOKYOTIME).getDisplayName(OSAKA);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
        if (!JST_IN_OSAKA.equals(tokyotime)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
            throw new RuntimeException("Provider's localized name is not available for a standard ID: "+TOKYOTIME+".  result: "+tokyotime+" expected: "+JST_IN_OSAKA);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
        String japan = TimeZone.getTimeZone(JAPAN).getDisplayName(OSAKA);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
        if (!JST_IN_OSAKA.equals(japan)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
            throw new RuntimeException("Provider's localized name is not available for an alias ID: "+JAPAN+".  result: "+japan+" expected: "+JST_IN_OSAKA);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
}