--- a/jdk/test/java/util/ResourceBundle/ResourceBundleTest.java Thu Nov 07 13:33:03 2013 +0100
+++ b/jdk/test/java/util/ResourceBundle/ResourceBundleTest.java Thu Nov 07 10:03:38 2013 -0800
@@ -22,7 +22,7 @@
*/
/*
@test
- @bug 4049325 4073127 4083270 4106034 4108126
+ @bug 4049325 4073127 4083270 4106034 4108126 8027930
@summary test Resource Bundle
@build TestResource TestResource_de TestResource_fr TestResource_fr_CH
@build TestResource_it FakeTestResource
@@ -63,6 +63,7 @@
import java.text.*;
import java.util.*;
+import java.util.ResourceBundle.Control;
import java.io.*;
public class ResourceBundleTest extends RBTestFmwk {
@@ -134,7 +135,8 @@
// load up the resource and check to make sure we got the right class
// (we don't define be_BY or be, so we fall back on the root default)
ResourceBundle bundle = ResourceBundle.getBundle("TestResource",
- new Locale("be", "BY"));
+ new Locale("be", "BY"),
+ Control.getNoFallbackControl(Control.FORMAT_DEFAULT));
if (!bundle.getClass().getName().equals("TestResource"))
errln("Expected TestResource, got " + bundle.getClass().getName());
@@ -268,7 +270,8 @@
// try to find TestResource_iw_IL, which doesn't exist. Should get root locale
// as its locale
test = ResourceBundle.getBundle("TestResource",
- new Locale("iw", "IL", ""));
+ new Locale("iw", "IL", ""),
+ Control.getNoFallbackControl(Control.FORMAT_DEFAULT));
locale = test.getLocale();
if (!(locale.getLanguage().equals("")) || !(locale.getCountry().equals("")))
errln("Actual locale for TestResource_iw_IL should have been the root locale, got "
--- a/jdk/test/java/util/ResourceBundle/getBaseBundleName/TestGetBaseBundleName.java Thu Nov 07 13:33:03 2013 +0100
+++ b/jdk/test/java/util/ResourceBundle/getBaseBundleName/TestGetBaseBundleName.java Thu Nov 07 10:03:38 2013 -0800
@@ -29,7 +29,7 @@
/**
* @test
- * @bug 4814565
+ * @bug 4814565 8027930
* @summary tests ResourceBundle.getBaseBundleName();
* @build TestGetBaseBundleName resources.ListBundle resources.ListBundle_fr
* @run main TestGetBaseBundleName
@@ -52,18 +52,20 @@
PROPERTY_BUNDLE_NAME,
LIST_BUNDLE_NAME
}) {
- ResourceBundle bundle = ResourceBundle.getBundle(baseName);
- System.out.println(getBaseName(bundle));
- if (!Locale.ROOT.equals(bundle.getLocale())) {
- throw new RuntimeException("Unexpected locale: "
- + bundle.getLocale());
- }
- if (!baseName.equals(getBaseName(bundle))) {
- throw new RuntimeException("Unexpected base name: "
- + getBaseName(bundle));
- }
- Locale.setDefault(Locale.FRENCH);
try {
+ Locale.setDefault(Locale.US);
+ ResourceBundle bundle = ResourceBundle.getBundle(baseName);
+ System.out.println(getBaseName(bundle));
+ if (!Locale.ROOT.equals(bundle.getLocale())) {
+ throw new RuntimeException("Unexpected locale: "
+ + bundle.getLocale());
+ }
+ if (!baseName.equals(getBaseName(bundle))) {
+ throw new RuntimeException("Unexpected base name: "
+ + getBaseName(bundle));
+ }
+
+ Locale.setDefault(Locale.FRENCH);
ResourceBundle bundle_fr = ResourceBundle.getBundle(baseName);
if (!Locale.FRENCH.equals(bundle_fr.getLocale())) {
throw new RuntimeException("Unexpected locale: "