jdk/make/src/classes/build/tools/generatebreakiteratordata/GenerateBreakIteratorData.java
--- a/jdk/make/src/classes/build/tools/generatebreakiteratordata/GenerateBreakIteratorData.java Tue Mar 15 13:48:26 2016 -0700
+++ b/jdk/make/src/classes/build/tools/generatebreakiteratordata/GenerateBreakIteratorData.java Thu Mar 17 19:04:16 2016 +0000
@@ -62,25 +62,37 @@
CharacterCategory.makeCategoryMap(unicodeData);
/* Generate files */
- generateFiles();
+ try {
+ generateFiles();
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.exit(1);
+ }
+ }
+
+ private static String localizedBundleName(String pkg, String clazz) {
+ if (language.length() > 0) {
+ return pkg + ".ext." + clazz + '_' + language;
+ } else {
+ return pkg + '.' + clazz;
+ }
}
/**
* Generate data files whose names are included in
* sun.text.resources.BreakIteratorInfo+<localeName>
*/
- private static void generateFiles() {
+ private static void generateFiles() throws Exception {
String[] classNames;
ResourceBundle rules, info;
- String pkgName = "sun.text.resources" + (language.length() > 0 ? ".ext" : "");
+ info = (ResourceBundle) Class.forName(
+ localizedBundleName("sun.text.resources", "BreakIteratorInfo")).newInstance();
- info = ResourceBundle.getBundle(pkgName + ".BreakIteratorInfo",
- new Locale(language, country, valiant));
classNames = info.getStringArray("BreakIteratorClasses");
- rules = ResourceBundle.getBundle(pkgName + ".BreakIteratorRules",
- new Locale(language, country, valiant));
+ rules = (ResourceBundle) Class.forName(
+ localizedBundleName("sun.text.resources", "BreakIteratorRules")).newInstance();
if (info.containsKey("CharacterData")) {
generateDataFile(info.getString("CharacterData"),