6267105: UIDefaults.getUIError dumps error message to System.err and also throws Error.
authoraghaisas
Tue, 13 Jun 2017 14:32:24 +0530
changeset 47135 9ee067ea1785
parent 47134 bb00cc237908
child 47136 6d7aeb035804
6267105: UIDefaults.getUIError dumps error message to System.err and also throws Error. Reviewed-by: prr, ssadetsky Contributed-by: shashidhara.veerabhadraiah@oracle.com
jdk/src/java.desktop/share/classes/javax/swing/UIDefaults.java
--- a/jdk/src/java.desktop/share/classes/javax/swing/UIDefaults.java	Wed Jun 07 16:43:18 2017 +0530
+++ b/jdk/src/java.desktop/share/classes/javax/swing/UIDefaults.java	Tue Jun 13 14:32:24 2017 +0530
@@ -756,9 +756,8 @@
      * @see #getUI
      */
     protected void getUIError(String msg) {
-        System.err.println("UIDefaults.getUI() failed: " + msg);
         try {
-            throw new Error();
+            throw new Error(msg);
         }
         catch (Throwable e) {
             e.printStackTrace();