changeset 6467:19e0f7fec24a

Merge
author coffeys
date Fri, 12 Jul 2013 14:16:42 +0100
parents 2054d1654f11 1217639266f5
children 2dae408e2954
files
diffstat 14 files changed, 346 insertions(+), 97 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/awt/GraphicsDevice.java	Thu Jul 11 15:49:17 2013 -0700
+++ b/src/share/classes/java/awt/GraphicsDevice.java	Fri Jul 12 14:16:42 2013 +0100
@@ -296,6 +296,12 @@
                                     bgColor.getBlue(), 255);
                 w.setBackground(bgColor);
             }
+            // Check if this window is in fullscreen mode on another device.
+            final GraphicsConfiguration gc = w.getGraphicsConfiguration();
+            if (gc != null && gc.getDevice() != this
+                    && gc.getDevice().getFullScreenWindow() == w) {
+                gc.getDevice().setFullScreenWindow(null);
+            }
         }
         if (fullScreenWindow != null && windowedModeBounds != null) {
             // if the window went into fs mode before it was realized it may
--- a/src/share/classes/sun/util/logging/resources/logging_de.properties	Thu Jul 11 15:49:17 2013 -0700
+++ b/src/share/classes/sun/util/logging/resources/logging_de.properties	Fri Jul 12 14:16:42 2013 +0100
@@ -27,20 +27,20 @@
 # these are the same as the non-localized level name.
 
 # The following ALL CAPS words should be translated.
-ALL=ALL
+ALL=Alle
 # The following ALL CAPS words should be translated.
-SEVERE=SEVERE
+SEVERE=Schwerwiegend
 # The following ALL CAPS words should be translated.
-WARNING=WARNING
+WARNING=Warnung
 # The following ALL CAPS words should be translated.
-INFO=INFO
+INFO=Information
 # The following ALL CAPS words should be translated.
-CONFIG= CONFIG
+CONFIG= Konfiguration
 # The following ALL CAPS words should be translated.
-FINE=FINE
+FINE=Fein
 # The following ALL CAPS words should be translated.
-FINER=FINER
+FINER=Feiner
 # The following ALL CAPS words should be translated.
-FINEST=FINEST
+FINEST=Am feinsten
 # The following ALL CAPS words should be translated.
-OFF=OFF
+OFF=Deaktiviert
--- a/src/share/classes/sun/util/logging/resources/logging_es.properties	Thu Jul 11 15:49:17 2013 -0700
+++ b/src/share/classes/sun/util/logging/resources/logging_es.properties	Fri Jul 12 14:16:42 2013 +0100
@@ -27,20 +27,20 @@
 # these are the same as the non-localized level name.
 
 # The following ALL CAPS words should be translated.
-ALL=ALL
+ALL=Todo
 # The following ALL CAPS words should be translated.
-SEVERE=SEVERE
+SEVERE=Grave
 # The following ALL CAPS words should be translated.
-WARNING=WARNING
+WARNING=Advertencia
 # The following ALL CAPS words should be translated.
-INFO=INFO
+INFO=Informaci\u00F3n
 # The following ALL CAPS words should be translated.
-CONFIG= CONFIG
+CONFIG= Configurar
 # The following ALL CAPS words should be translated.
-FINE=FINE
+FINE=Detallado
 # The following ALL CAPS words should be translated.
-FINER=FINER
+FINER=Muy Detallado
 # The following ALL CAPS words should be translated.
-FINEST=FINEST
+FINEST=M\u00E1s Detallado
 # The following ALL CAPS words should be translated.
-OFF=OFF
+OFF=Desactivado
--- a/src/share/classes/sun/util/logging/resources/logging_fr.properties	Thu Jul 11 15:49:17 2013 -0700
+++ b/src/share/classes/sun/util/logging/resources/logging_fr.properties	Fri Jul 12 14:16:42 2013 +0100
@@ -27,20 +27,20 @@
 # these are the same as the non-localized level name.
 
 # The following ALL CAPS words should be translated.
-ALL=ALL
+ALL=Tout
 # The following ALL CAPS words should be translated.
-SEVERE=SEVERE
+SEVERE=Grave
 # The following ALL CAPS words should be translated.
-WARNING=WARNING
+WARNING=Avertissement
 # The following ALL CAPS words should be translated.
-INFO=INFO
+INFO=Infos
 # The following ALL CAPS words should be translated.
-CONFIG= CONFIG
+CONFIG= Config
 # The following ALL CAPS words should be translated.
-FINE=FINE
+FINE=Pr\u00E9cis
 # The following ALL CAPS words should be translated.
-FINER=FINER
+FINER=Plus pr\u00E9cis
 # The following ALL CAPS words should be translated.
-FINEST=FINEST
+FINEST=Le plus pr\u00E9cis
 # The following ALL CAPS words should be translated.
-OFF=OFF
+OFF=D\u00E9sactiv\u00E9
--- a/src/share/classes/sun/util/logging/resources/logging_it.properties	Thu Jul 11 15:49:17 2013 -0700
+++ b/src/share/classes/sun/util/logging/resources/logging_it.properties	Fri Jul 12 14:16:42 2013 +0100
@@ -27,20 +27,20 @@
 # these are the same as the non-localized level name.
 
 # The following ALL CAPS words should be translated.
-ALL=ALL
+ALL=Tutto
 # The following ALL CAPS words should be translated.
-SEVERE=SEVERE
+SEVERE=Grave
 # The following ALL CAPS words should be translated.
-WARNING=WARNING
+WARNING=Avvertenza
 # The following ALL CAPS words should be translated.
-INFO=INFO
+INFO=Informazioni
 # The following ALL CAPS words should be translated.
-CONFIG= CONFIG
+CONFIG= Configurazione
 # The following ALL CAPS words should be translated.
-FINE=FINE
+FINE=Buono
 # The following ALL CAPS words should be translated.
-FINER=FINER
+FINER=Migliore
 # The following ALL CAPS words should be translated.
-FINEST=FINEST
+FINEST=Ottimale
 # The following ALL CAPS words should be translated.
-OFF=OFF
+OFF=Non attivo
--- a/src/share/classes/sun/util/logging/resources/logging_ja.properties	Thu Jul 11 15:49:17 2013 -0700
+++ b/src/share/classes/sun/util/logging/resources/logging_ja.properties	Fri Jul 12 14:16:42 2013 +0100
@@ -29,18 +29,18 @@
 # The following ALL CAPS words should be translated.
 ALL=\u3059\u3079\u3066
 # The following ALL CAPS words should be translated.
-SEVERE=SEVERE
+SEVERE=\u91CD\u5927
 # The following ALL CAPS words should be translated.
-WARNING=WARNING
+WARNING=\u8B66\u544A
 # The following ALL CAPS words should be translated.
 INFO=\u60C5\u5831
 # The following ALL CAPS words should be translated.
-CONFIG= CONFIG
+CONFIG= \u69CB\u6210
 # The following ALL CAPS words should be translated.
-FINE=\u8A73\u7D30\u30EC\u30D9\u30EB(\u4F4E)
+FINE=\u666E\u901A
 # The following ALL CAPS words should be translated.
-FINER=FINER
+FINER=\u8A73\u7D30
 # The following ALL CAPS words should be translated.
-FINEST=FINEST
+FINEST=\u6700\u3082\u8A73\u7D30
 # The following ALL CAPS words should be translated.
 OFF=\u30AA\u30D5
--- a/src/share/classes/sun/util/logging/resources/logging_ko.properties	Thu Jul 11 15:49:17 2013 -0700
+++ b/src/share/classes/sun/util/logging/resources/logging_ko.properties	Fri Jul 12 14:16:42 2013 +0100
@@ -27,20 +27,20 @@
 # these are the same as the non-localized level name.
 
 # The following ALL CAPS words should be translated.
-ALL=ALL
+ALL=\uBAA8\uB450
 # The following ALL CAPS words should be translated.
-SEVERE=SEVERE
+SEVERE=\uC2EC\uAC01
 # The following ALL CAPS words should be translated.
-WARNING=WARNING
+WARNING=\uACBD\uACE0
 # The following ALL CAPS words should be translated.
-INFO=INFO
+INFO=\uC815\uBCF4
 # The following ALL CAPS words should be translated.
-CONFIG= CONFIG
+CONFIG= \uAD6C\uC131
 # The following ALL CAPS words should be translated.
-FINE=FINE
+FINE=\uBBF8\uC138
 # The following ALL CAPS words should be translated.
-FINER=FINER
+FINER=\uBCF4\uB2E4 \uBBF8\uC138
 # The following ALL CAPS words should be translated.
-FINEST=FINEST
+FINEST=\uAC00\uC7A5 \uBBF8\uC138
 # The following ALL CAPS words should be translated.
-OFF=OFF
+OFF=\uD574\uC81C
--- a/src/share/classes/sun/util/logging/resources/logging_pt_BR.properties	Thu Jul 11 15:49:17 2013 -0700
+++ b/src/share/classes/sun/util/logging/resources/logging_pt_BR.properties	Fri Jul 12 14:16:42 2013 +0100
@@ -27,20 +27,20 @@
 # these are the same as the non-localized level name.
 
 # The following ALL CAPS words should be translated.
-ALL=ALL
+ALL=Tudo
 # The following ALL CAPS words should be translated.
-SEVERE=SEVERE
+SEVERE=Grave
 # The following ALL CAPS words should be translated.
-WARNING=WARNING
+WARNING=Advert\u00EAncia
 # The following ALL CAPS words should be translated.
-INFO=INFO
+INFO=Informa\u00E7\u00F5es
 # The following ALL CAPS words should be translated.
-CONFIG= CONFIG
+CONFIG= Configura\u00E7\u00E3o
 # The following ALL CAPS words should be translated.
-FINE=FINE
+FINE=Detalhado
 # The following ALL CAPS words should be translated.
-FINER=FINER
+FINER=Mais Detalhado
 # The following ALL CAPS words should be translated.
-FINEST=FINEST
+FINEST=O Mais Detalhado
 # The following ALL CAPS words should be translated.
-OFF=OFF
+OFF=Desativado
--- a/src/share/classes/sun/util/logging/resources/logging_sv.properties	Thu Jul 11 15:49:17 2013 -0700
+++ b/src/share/classes/sun/util/logging/resources/logging_sv.properties	Fri Jul 12 14:16:42 2013 +0100
@@ -27,20 +27,20 @@
 # these are the same as the non-localized level name.
 
 # The following ALL CAPS words should be translated.
-ALL=ALLA
+ALL=Alla
 # The following ALL CAPS words should be translated.
-SEVERE=SEVERE
+SEVERE=Allvarlig
 # The following ALL CAPS words should be translated.
-WARNING=WARNING
+WARNING=Varning
 # The following ALL CAPS words should be translated.
-INFO=INFO
+INFO=Info
 # The following ALL CAPS words should be translated.
-CONFIG= CONFIG
+CONFIG= Konfig
 # The following ALL CAPS words should be translated.
-FINE=FINE
+FINE=Fin
 # The following ALL CAPS words should be translated.
-FINER=FINER
+FINER=Finare
 # The following ALL CAPS words should be translated.
-FINEST=FINEST
+FINEST=Finaste
 # The following ALL CAPS words should be translated.
-OFF=OFF
+OFF=Av
--- a/src/share/classes/sun/util/logging/resources/logging_zh_CN.properties	Thu Jul 11 15:49:17 2013 -0700
+++ b/src/share/classes/sun/util/logging/resources/logging_zh_CN.properties	Fri Jul 12 14:16:42 2013 +0100
@@ -27,20 +27,20 @@
 # these are the same as the non-localized level name.
 
 # The following ALL CAPS words should be translated.
-ALL=ALL
+ALL=\u5168\u90E8
 # The following ALL CAPS words should be translated.
-SEVERE=SEVERE
+SEVERE=\u4E25\u91CD
 # The following ALL CAPS words should be translated.
-WARNING=WARNING
+WARNING=\u8B66\u544A
 # The following ALL CAPS words should be translated.
-INFO=INFO
+INFO=\u4FE1\u606F
 # The following ALL CAPS words should be translated.
-CONFIG= CONFIG
+CONFIG= \u914D\u7F6E
 # The following ALL CAPS words should be translated.
-FINE=FINE
+FINE=\u8BE6\u7EC6
 # The following ALL CAPS words should be translated.
-FINER=FINER
+FINER=\u8F83\u8BE6\u7EC6
 # The following ALL CAPS words should be translated.
-FINEST=FINEST
+FINEST=\u975E\u5E38\u8BE6\u7EC6
 # The following ALL CAPS words should be translated.
-OFF=OFF
+OFF=\u7981\u7528
--- a/src/share/classes/sun/util/logging/resources/logging_zh_TW.properties	Thu Jul 11 15:49:17 2013 -0700
+++ b/src/share/classes/sun/util/logging/resources/logging_zh_TW.properties	Fri Jul 12 14:16:42 2013 +0100
@@ -27,20 +27,20 @@
 # these are the same as the non-localized level name.
 
 # The following ALL CAPS words should be translated.
-ALL=\u6240\u6709
+ALL=\u5168\u90E8
 # The following ALL CAPS words should be translated.
-SEVERE=SEVERE
+SEVERE=\u56B4\u91CD
 # The following ALL CAPS words should be translated.
-WARNING=WARNING
+WARNING=\u8B66\u544A
 # The following ALL CAPS words should be translated.
 INFO=\u8CC7\u8A0A
 # The following ALL CAPS words should be translated.
-CONFIG= CONFIG
+CONFIG= \u7D44\u614B
 # The following ALL CAPS words should be translated.
 FINE=\u8A73\u7D30
 # The following ALL CAPS words should be translated.
-FINER=FINER
+FINER=\u8F03\u8A73\u7D30
 # The following ALL CAPS words should be translated.
-FINEST=FINEST
+FINEST=\u6700\u8A73\u7D30
 # The following ALL CAPS words should be translated.
 OFF=\u95DC\u9589
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/GraphicsDevice/IncorrectDisplayModeExitFullscreen.java	Fri Jul 12 14:16:42 2013 +0100
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2013, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+import java.awt.Color;
+import java.awt.DisplayMode;
+import java.awt.Frame;
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
+import java.awt.Toolkit;
+
+import sun.awt.SunToolkit;
+
+/**
+ * @test
+ * @bug 8019587
+ * @author Sergey Bylokhov
+ */
+public class IncorrectDisplayModeExitFullscreen {
+
+    public static void main(final String[] args) {
+
+        final GraphicsDevice[] devices =
+                GraphicsEnvironment.getLocalGraphicsEnvironment()
+                                   .getScreenDevices();
+        if (devices.length < 2 || devices[0].getDisplayModes().length < 2
+                || !devices[0].isFullScreenSupported()
+                || !devices[1].isFullScreenSupported()) {
+            System.err.println("Testcase is not applicable");
+            return;
+        }
+        final DisplayMode defaultDM = devices[0].getDisplayMode();
+        final DisplayMode[] dms = devices[0].getDisplayModes();
+        DisplayMode nonDefaultDM = null;
+
+        for (final DisplayMode dm : dms) {
+            if (!dm.equals(defaultDM)) {
+                nonDefaultDM = dm;
+                break;
+            }
+        }
+        if (nonDefaultDM == null) {
+            System.err.println("Testcase is not applicable");
+            return;
+        }
+
+        final Frame frame = new Frame();
+        frame.setBackground(Color.GREEN);
+        frame.setUndecorated(true);
+        try {
+            devices[0].setFullScreenWindow(frame);
+            sleep();
+            devices[0].setDisplayMode(nonDefaultDM);
+            sleep();
+            devices[1].setFullScreenWindow(frame);
+            sleep();
+            if (!defaultDM.equals(devices[0].getDisplayMode())) {
+                throw new RuntimeException("DisplayMode is not restored");
+            }
+        } finally {
+            // cleaning up
+            devices[0].setFullScreenWindow(null);
+            devices[1].setFullScreenWindow(null);
+            frame.dispose();
+        }
+    }
+    private static void sleep() {
+        ((SunToolkit) Toolkit.getDefaultToolkit()).realSync();
+        try {
+            Thread.sleep(1500);
+        } catch (InterruptedException ignored) {
+        }
+    }
+}
--- a/test/java/lang/SecurityManager/CheckPackageAccess.java	Thu Jul 11 15:49:17 2013 -0700
+++ b/test/java/lang/SecurityManager/CheckPackageAccess.java	Fri Jul 12 14:16:42 2013 +0100
@@ -22,31 +22,128 @@
  */
 
 /*
- * @test
- * @bug 7146431 8000450
- * @summary Test that internal packages cannot be accessed
+ *  @test
+ *  @bug 6741606 7146431 8000450
+ *  @summary Make sure all restricted packages listed in the package.access
+ *           property in the java.security file are blocked
+ *  @run main/othervm CheckPackageAccess
  */
 
+import java.security.Security;
+import java.util.Collections;
+import java.util.Arrays;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+/*
+ * The main benefit of this test is to catch merge errors or other types
+ * of issues where one or more of the packages are accidentally
+ * removed. This is why the packages that are known to be restricted have to
+ * be explicitly listed below.
+ */
 public class CheckPackageAccess {
 
+    /*
+     * This array should be updated whenever new packages are added to the
+     * package.access property in the java.security file
+     */
+    private static final String[] packages = {
+        "sun.",
+        "com.sun.corba.se.impl.",
+        "com.sun.xml.internal.",
+        "com.sun.imageio.",
+        "com.sun.istack.internal.",
+        "com.sun.jmx.",
+        "com.sun.proxy.",
+        "com.sun.org.apache.bcel.internal.",
+        "com.sun.org.apache.regexp.internal.",
+        "com.sun.org.apache.xerces.internal.",
+        "com.sun.org.apache.xpath.internal.",
+        "com.sun.org.apache.xalan.internal.extensions.",
+        "com.sun.org.apache.xalan.internal.lib.",
+        "com.sun.org.apache.xalan.internal.res.",
+        "com.sun.org.apache.xalan.internal.templates.",
+        "com.sun.org.apache.xalan.internal.utils.",
+        "com.sun.org.apache.xalan.internal.xslt.",
+        "com.sun.org.apache.xalan.internal.xsltc.cmdline.",
+        "com.sun.org.apache.xalan.internal.xsltc.compiler.",
+        "com.sun.org.apache.xalan.internal.xsltc.trax.",
+        "com.sun.org.apache.xalan.internal.xsltc.util.",
+        "com.sun.org.apache.xml.internal.res.",
+        "com.sun.org.apache.xml.internal.security.",
+        "com.sun.org.apache.xml.internal.serializer.utils.",
+        "com.sun.org.apache.xml.internal.utils.",
+        "com.sun.org.glassfish.",
+        "oracle.jrockit.jfr.",
+        "org.jcp.xml.dsig.internal.",
+    };
+
     public static void main(String[] args) throws Exception {
+        List<String> pkgs = new ArrayList<>(Arrays.asList(packages));
+        String osName = System.getProperty("os.name");
+        if (osName.contains("OS X")) {
+            pkgs.add("apple.");  // add apple package for OS X
+        } else if (osName.startsWith("Windows")) {
+            pkgs.add("com.sun.java.accessibility.");
+        }
 
-        String[] pkgs = new String[] {
-            "com.sun.corba.se.impl.",
-            "com.sun.org.apache.xerces.internal.utils.",
-            "com.sun.org.apache.xalan.internal.utils." };
-        SecurityManager sm = new SecurityManager();
-        System.setSecurityManager(sm);
-        for (String pkg : pkgs) {
-            System.out.println("Checking package access for " + pkg);
+        List<String> jspkgs =
+            getPackages(Security.getProperty("package.access"));
+
+        // Sort to ensure lists are comparable
+        Collections.sort(pkgs);
+        Collections.sort(jspkgs);
+
+        if (!pkgs.equals(jspkgs)) {
+            for (String p : pkgs)
+                if (!jspkgs.contains(p))
+                    System.out.println("In golden set, but not in j.s file: " + p);
+            for (String p : jspkgs)
+                if (!pkgs.contains(p))
+                    System.out.println("In j.s file, but not in golden set: " + p);
+
+
+            throw new RuntimeException("restricted packages are not " +
+                                       "consistent with java.security file");
+        }
+        System.setSecurityManager(new SecurityManager());
+        SecurityManager sm = System.getSecurityManager();
+        for (String pkg : packages) {
+            String subpkg = pkg + "foo";
             try {
                 sm.checkPackageAccess(pkg);
-                throw new Exception("Expected PackageAccess SecurityException not thrown");
+                throw new RuntimeException("Able to access " + pkg +
+                                           " package");
+            } catch (SecurityException se) { }
+            try {
+                sm.checkPackageAccess(subpkg);
+                throw new RuntimeException("Able to access " + subpkg +
+                                           " package");
             } catch (SecurityException se) { }
             try {
                 sm.checkPackageDefinition(pkg);
-                throw new Exception("Expected PackageDefinition SecurityException not thrown");
+                throw new RuntimeException("Able to define class in " + pkg +
+                                           " package");
+            } catch (SecurityException se) { }
+            try {
+                sm.checkPackageDefinition(subpkg);
+                throw new RuntimeException("Able to define class in " + subpkg +
+                                           " package");
             } catch (SecurityException se) { }
         }
+        System.out.println("Test passed");
+    }
+
+    private static List<String> getPackages(String p) {
+        List<String> packages = new ArrayList<>();
+        if (p != null && !p.equals("")) {
+            StringTokenizer tok = new StringTokenizer(p, ",");
+            while (tok.hasMoreElements()) {
+                String s = tok.nextToken().trim();
+                packages.add(s);
+            }
+        }
+        return packages;
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/LevelResourceBundle.java	Fri Jul 12 14:16:42 2013 +0100
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2013, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.*;
+import java.util.logging.*;
+
+/*
+ * @test
+ * @bug 8020228
+ * @summary test logging.properties localized
+ * @run main LevelResourceBundle
+ */
+
+public class LevelResourceBundle {
+    public static void main(String args[]) throws Exception {
+        final String name = "SEVERE";
+        String en = getLocalizedMessage(Locale.getDefault(), name);
+        String fr = getLocalizedMessage(Locale.FRANCE, name);
+        if (!name.equals(en)) {
+             throw new RuntimeException("Expect " + name + " equals " + en);
+        }
+        if (name.equals(fr)) {
+             throw new RuntimeException("Expect " + name + " not equals " + fr);
+        }
+    }
+
+    private static final String RBNAME = "sun.util.logging.resources.logging";
+    private static String getLocalizedMessage(Locale locale, String key) {
+        ResourceBundle rb = ResourceBundle.getBundle(RBNAME, locale);
+        return rb.getString(key);
+    }
+}