提交 1d5b1f12 编写于 作者: X xuelei

7068662: Reserve and restore the default locale

Reviewed-by: alanb, weijun
上级 8632cf43
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2011, 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
......@@ -36,15 +36,19 @@ public class LocaleTest {
public static void main(String[] args) throws Exception {
Locale reservedLocale = Locale.getDefault();
try {
Locale.setDefault(Locale.ITALY);
try {
throw new XMLSecurityException("foo");
} catch (XMLSecurityException xse) {
System.out.println("Test PASSED");
} catch (Throwable t) {
System.out.println("Test FAILED");
t.printStackTrace();
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
}
}
/*
* Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2011, 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
......@@ -47,8 +47,14 @@ public class Test6341798 {
+ "</java> ";
public static void main(String[] args) {
Locale reservedLocale = Locale.getDefault();
try {
test(ENGLISH, DATA.getBytes());
test(TURKISH, DATA.getBytes());
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
}
private static void test(Locale locale, byte[] data) {
......
/*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2011, 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
......@@ -32,6 +32,8 @@ import java.util.*;
public class bug6344646 {
public static void main(String[] s) {
Locale reservedLocale = Locale.getDefault();
try {
/* This test is only valid on win32 systems */
if (File.separatorChar != '\\') {
return;
......@@ -42,7 +44,12 @@ public class bug6344646 {
File f2 = new File("j\u0301");
if (f1.hashCode() != f2.hashCode()) {
throw new RuntimeException("File.hashCode() for \"J\u0301\" and \"j\u0301\" should be the same");
throw new RuntimeException("File.hashCode() for \"J\u0301\" " +
"and \"j\u0301\" should be the same");
}
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
}
}
/*
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2011, 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
......@@ -33,6 +33,8 @@ import java.util.Locale;
public class B6791927 {
public static final void main( String[] aaParamters ) throws Exception{
Locale reservedLocale = Locale.getDefault();
try {
// Forces a non US locale
Locale.setDefault(Locale.FRANCE);
List<HttpCookie> cookies = HttpCookie.parse("set-cookie: CUSTOMER=WILE_E_COYOTE; expires=Wednesday, 09-Nov-2019 23:12:40 GMT");
......@@ -41,8 +43,13 @@ public class B6791927 {
}
for (HttpCookie c : cookies) {
if (c.getMaxAge() == 0) {
throw new RuntimeException("Expiration date shouldn't be 0");
throw new RuntimeException(
"Expiration date shouldn't be 0");
}
}
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
}
}
/*
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2011, 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
......@@ -73,6 +73,7 @@ public class SetIfModifiedSince {
}
public static void main (String[] args) {
Locale reservedLocale = Locale.getDefault();
try {
Locale.setDefault(Locale.JAPAN);
ServerSocket serversocket = new ServerSocket (0);
......@@ -87,6 +88,10 @@ public class SetIfModifiedSince {
int i=0, c;
Thread.sleep (5000);
} catch (Exception e) {
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
}
}
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2011, 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
......@@ -29,13 +29,16 @@ public class LocaleCategory {
private static String enc = null;
public static void main(String[] args) {
Locale reservedLocale = Locale.getDefault();
try {
Locale.Builder builder = new Locale.Builder();
base = builder.setLanguage(System.getProperty("user.language", ""))
.setScript(System.getProperty("user.script", ""))
.setRegion(System.getProperty("user.country", ""))
.setVariant(System.getProperty("user.variant", "")).build();
disp = builder.setLanguage(System.getProperty("user.language.display",
disp = builder.setLanguage(
System.getProperty("user.language.display",
Locale.getDefault().getLanguage()))
.setScript(System.getProperty("user.script.display",
Locale.getDefault().getScript()))
......@@ -53,6 +56,10 @@ public class LocaleCategory {
Locale.getDefault().getVariant())).build();
checkDefault();
testGetSetDefault();
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
}
static void checkDefault() {
......
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2011, 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
......@@ -32,7 +32,13 @@ import sun.util.resources.*;
public class CurrencyNameProviderTest extends ProviderTest {
public static void main(String[] s) {
Locale reservedLocale = Locale.getDefault();
try {
new CurrencyNameProviderTest();
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
}
CurrencyNameProviderTest() {
......
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2011, 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
......@@ -113,6 +113,7 @@ public class TimeZoneNameProviderTest extends ProviderTest {
void test2() {
Locale defaultLocale = Locale.getDefault();
TimeZone reservedTimeZone = TimeZone.getDefault();
Date d = new Date(2005-1900, Calendar.DECEMBER, 22);
String formatted;
......@@ -139,7 +140,6 @@ public class TimeZoneNameProviderTest extends ProviderTest {
df = new SimpleDateFormat(pattern, DateFormatSymbols.getInstance());
System.out.println(formatted = df.format(d));
if(!formatted.equals(DISPLAY_NAMES_KYOTO[i])) {
Locale.setDefault(defaultLocale);
throw new RuntimeException("Timezone " + TIMEZONES[i] +
": formatted zone names mismatch. " +
formatted + " should match with " +
......@@ -148,10 +148,12 @@ public class TimeZoneNameProviderTest extends ProviderTest {
df.parse(DISPLAY_NAMES_KYOTO[i]);
}
} catch (ParseException pe) {
Locale.setDefault(defaultLocale);
throw new RuntimeException("parse error occured" + pe);
}
} finally {
// restore the reserved locale and time zone
Locale.setDefault(defaultLocale);
TimeZone.setDefault(reservedTimeZone);
}
}
final String LATIME = "America/Los_Angeles";
......
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2011, 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
......@@ -32,6 +32,8 @@ import java.util.*;
public class Bug6190861 {
static public void main(String[] args) {
Locale reservedLocale = Locale.getDefault();
try {
Locale.setDefault(new Locale("en", "US"));
List localeList = new ArrayList();
......@@ -47,13 +49,18 @@ public class Bug6190861 {
System.out.println("\ncurrentLocale = "
+ currentLocale.getDisplayName());
ResourceBundle messages = ResourceBundle.getBundle("Bug6190861Data",currentLocale);
ResourceBundle messages =
ResourceBundle.getBundle("Bug6190861Data",currentLocale);
Locale messagesLocale = messages.getLocale();
System.out.println("messagesLocale = "
+ messagesLocale.getDisplayName());
checkMessages(messages);
}
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
}
static void checkMessages(ResourceBundle messages) {
......
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2011, 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
......@@ -43,6 +43,12 @@ public class Bug6530694 {
}
public static void main(String[] args) {
Locale reservedLocale = Locale.getDefault();
try {
new Bug6530694();
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
}
}
......@@ -69,6 +69,9 @@ public class StressTest {
if (args.length > 1) {
duration = Math.max(5, Integer.parseInt(args[1]));
}
Locale reservedLocale = Locale.getDefault();
try {
Locale.setDefault(Locale.US);
Thread[] tasks = new Thread[locales.length * threadsFactor];
counters = new AtomicIntegerArray(tasks.length);
......@@ -82,7 +85,8 @@ public class StressTest {
int nProcessors = Runtime.getRuntime().availableProcessors();
intervalForCounterCheck = Math.max(tasks.length / nProcessors, 1);
System.out.printf("%d processors, intervalForCounterCheck = %d [sec]%n",
System.out.printf(
"%d processors, intervalForCounterCheck = %d [sec]%n",
nProcessors, intervalForCounterCheck);
try {
for (int i = 0; runrun && i < duration; i++) {
......@@ -99,6 +103,10 @@ public class StressTest {
}
printCounters();
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
}
static void checkCounters() {
......
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2011, 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
......@@ -35,8 +35,14 @@ import java.util.MissingResourceException;
public class Test4314141 {
public static void main(String[] args) {
Locale reservedLocale = Locale.getDefault();
try {
testCandidateOmission();
testExample();
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
}
/**
......
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2011, 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
......@@ -36,8 +36,14 @@ import java.util.Locale;
public class Test4318520 {
public static void main(String[] args) {
Locale reservedLocale = Locale.getDefault();
try {
test(Locale.GERMAN);
test(Locale.ENGLISH);
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
}
private static void test(Locale locale) {
......
/*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2011, 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
......@@ -26,7 +26,6 @@
* @bug 4624534
* @summary Make sure jar certificates work for Turkish locale
* @author kladko
* @run main/othervm TurkCert
*/
import java.util.*;
......@@ -36,15 +35,24 @@ import java.io.*;
public class TurkCert {
public static void main(String[] args) throws Exception{
Locale reservedLocale = Locale.getDefault();
try {
Locale.setDefault(new Locale("TR", "tr"));
File f = new File(System.getProperty("test.src","."), "test.jar");
JarFile jf = new JarFile(f, true);
try (JarFile jf = new JarFile(f, true)) {
JarEntry je = (JarEntry)jf.getEntry("test.class");
InputStream is = jf.getInputStream(je);
try (InputStream is = jf.getInputStream(je)) {
byte[] b = new byte[1024];
while (is.read(b) != -1) {
}
if (je.getCertificates() == null)
}
if (je.getCertificates() == null) {
throw new Exception("Null certificate for test.class.");
}
}
} finally {
// restore the default locale
Locale.setDefault(reservedLocale);
}
}
}
/*
* Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2011, 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
......@@ -35,6 +35,8 @@ import javax.crypto.Cipher;
public class Turkish {
public static void main(String[] args) throws Exception {
Locale reservedLocale = Locale.getDefault();
try {
Locale.setDefault(new Locale("tr", "TR"));
System.out.println(Cipher.getInstance("RSA/ECB/PKCS1Padding"));
......@@ -45,5 +47,9 @@ public class Turkish {
System.out.println(Cipher.getInstance("BLOWFISH"));
System.out.println("OK");
} finally {
// restore the default locale
Locale.setDefault(reservedLocale);
}
}
}
/*
* Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2011, 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
......@@ -98,6 +98,8 @@ public class Test6524757 {
private static final Object[] FRENCH = convert(Locale.FRENCH, KEYS);
public static void main(String[] args) {
Locale reservedLocale = Locale.getDefault();
try {
// it affects Swing because it is not initialized
Locale.setDefault(Locale.KOREAN);
validate(KOREAN, create());
......@@ -109,6 +111,10 @@ public class Test6524757 {
// it definitely should affect Swing
JComponent.setDefaultLocale(Locale.FRENCH);
validate(FRENCH, create());
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
}
private static void validate(Object[] expected, Object[] actual) {
......
/*
* Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2011, 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
......@@ -1278,6 +1278,8 @@ public class KeyToolTest {
}
public static void main(String[] args) throws Exception {
Locale reservedLocale = Locale.getDefault();
try {
// first test if HumanInputStream really acts like a human being
HumanInputStream.test();
KeyToolTest t = new KeyToolTest();
......@@ -1324,6 +1326,10 @@ public class KeyToolTest {
}
System.out.println("Test pass!!!");
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
}
}
......
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2011, 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
......@@ -35,6 +35,8 @@ public class Bug4248694 {
/********************************************************
*********************************************************/
public static void main (String[] args) {
Locale reservedLocale = Locale.getDefault();
try {
int errors=0;
Locale loc = new Locale ("is", "is"); // Icelandic
......@@ -72,6 +74,10 @@ public class Bug4248694 {
if (errors > 0)
throw new RuntimeException();
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
}//end main
}//end class CollatorTest
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2011, 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
......@@ -35,6 +35,8 @@ public class Bug4804273 {
/********************************************************
*********************************************************/
public static void main (String[] args) {
Locale reservedLocale = Locale.getDefault();
try {
int errors=0;
Locale loc = new Locale ("sv", "se"); // Swedish
......@@ -110,7 +112,12 @@ public class Bug4804273 {
}//end for
if (errors > 0)
throw new RuntimeException("There are " + errors + " words sorted incorrectly!");
throw new RuntimeException("There are " + errors +
" words sorted incorrectly!");
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
}//end main
}//end class CollatorTest
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2011, 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
......@@ -35,7 +35,8 @@ public class Bug4848897 {
/********************************************************
*********************************************************/
public static void main (String[] args) {
Locale reservedLocale = Locale.getDefault();
try {
int errors=0;
Locale loc = new Locale ("no", "NO"); // Norwegian
......@@ -68,6 +69,10 @@ public class Bug4848897 {
if (errors > 0)
throw new RuntimeException();
}//end main
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
} // end main
}//end class CollatorTest
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2011, 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
......@@ -34,6 +34,8 @@ import java.util.Locale;
public class Bug4651568 {
public static void main (String argv[] ) {
Locale reservedLocale = Locale.getDefault();
try {
String expectedCurrencyPattern = "\u00A4 #.##0,00";
Locale locale = new Locale ("pt", "BR");
......@@ -42,8 +44,8 @@ public class Bug4651568 {
DecimalFormat formatter =
(DecimalFormat) NumberFormat.getCurrencyInstance(locale);
if (formatter.toLocalizedPattern().equals(expectedCurrencyPattern))
{
if (formatter.toLocalizedPattern().equals(
expectedCurrencyPattern)) {
System.out.println ("Passed.");
} else {
System.out.println ("Failed Currency pattern." +
......@@ -52,5 +54,9 @@ public class Bug4651568 {
throw new RuntimeException();
}
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
}
}
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2011, 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
......@@ -48,6 +48,8 @@ public class Bug4965260 {
};
public static void main(String[] args) throws Exception {
Locale reservedLocale = Locale.getDefault();
try {
Locale.setDefault(Locale.ENGLISH);
if (locales2Test.length != expectedNames.length) {
throw new Exception("\nData sizes does not match!\n");
......@@ -74,5 +76,9 @@ public class Bug4965260 {
if (message.length() >0) {
throw new Exception("\n" + message.toString());
}
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
}
}
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2011, 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
......@@ -24,11 +24,11 @@
/**
* @test
* @bug 4640234 4946057 4938151 4873691 5023181
* @summary Verifies the translation of time zone names, this test will catch presence
* of country name for english and selected locales for all ISO country
* codes.
* The test program also displays which timezone, country and language names
* are not translated
* @summary Verifies the translation of time zone names, this test will catch
* presence of country name for english and selected locales for all
* ISO country codes.
* The test program also displays which timezone, country and
* language names are not translated
*/
......@@ -73,6 +73,8 @@ public class Bug4640234 {
};
public static void main(String[] args) throws Exception {
Locale reservedLocale = Locale.getDefault();
try {
Locale.setDefault(Locale.ENGLISH);
StringBuffer errors = new StringBuffer("");
......@@ -82,7 +84,8 @@ public class Bug4640234 {
String[] countries = locEn.getISOCountries();
String[] languages = locEn.getISOLanguages();
ResourceBundle resEn = ResourceBundle.getBundle("sun.util.resources.LocaleNames", locEn);
ResourceBundle resEn = ResourceBundle.getBundle(
"sun.util.resources.LocaleNames", locEn);
Map<String, String> countryMapEn = getList(resEn, true);
Map<String, String> languageMapEn = getList(resEn, false);
......@@ -91,7 +94,8 @@ public class Bug4640234 {
Map<String, String> languageMap;
for (Locale locale : locales2Test) {
resLoc = ResourceBundle.getBundle("sun.util.resources.LocaleNames", locale);
resLoc = ResourceBundle.getBundle(
"sun.util.resources.LocaleNames", locale);
sdfLoc = new SimpleDateFormat("zzzz", locale);
sdfLocShort = new SimpleDateFormat("z", locale);
......@@ -153,6 +157,10 @@ public class Bug4640234 {
System.out.println(warnings.toString());
throw new Exception("\n" + message);
}
} finally {
// restore the reserved locale
Locale.setDefault(reservedLocale);
}
}
/**
......@@ -210,16 +218,19 @@ public class Bug4640234 {
/**
* Verifies whether the name for ISOCode is localized.
* @param ISOCode - ISO country/language code for country/language name to test
* @param ISOCode - ISO country/language code for country/language name
* to test
* @param entriesEn - array of english country/language names
* @param entriesLoc - array of localized country/language names for specified locale
* @param entriesLoc - array of localized country/language names for
* specified locale
* @param locale - locale to test against english
* @param notFoundMessage - message in form ready for MessageFormat, {0} will be human readable
* language name, {1} will be ISOCode.
* @param notLocalizedMessage - message in for ready for MessageFormat, same formatting like
* for notFountMessage
* @return array of two empty strings when passed, descriptive error message in
* other cases, [0] - warnings for not localized, [1] - errors for missing keys.
* @param notFoundMessage - message in form ready for MessageFormat,
* {0} will be human readable language name, {1} will be ISOCode.
* @param notLocalizedMessage - message in for ready for MessageFormat,
* same formatting like for notFountMessage
* @return array of two empty strings when passed, descriptive error message
* in other cases, [0] - warnings for not localized, [1] - errors for
* missing keys.
*/
private static String[] testEntry(String ISOCode,
Map<String, String> entriesEn,
......@@ -274,7 +285,8 @@ public class Bug4640234 {
return false;
}
private static Map<String, String> getList(ResourceBundle rs, Boolean getCountryList) {
private static Map<String, String> getList(
ResourceBundle rs, Boolean getCountryList) {
char beginChar = 'a';
char endChar = 'z';
if (getCountryList) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册