RFR 8063087: policytool reports error message with prefix of "java.lang.Exception"

Wang Weijun weijun.wang at oracle.com
Tue Nov 11 02:58:07 UTC 2014


Please review the fix at

   http://cr.openjdk.java.net/~weijun/8063087/webrev.00/

which is simply

     void displayErrorDialog(Window w, Throwable t) {
         if (t instanceof NoDisplayException) {
             return;
         }

+        if (t.getClass() == Exception.class) {
+            displayErrorDialog(w, t.getLocalizedMessage());
+        } else {
         displayErrorDialog(w, t.toString());
+        }
     }

Error messages like "java.lang.Exception:No Policy Entry selected" is now "No Policy Entry selected". For other exception types, there will be no change.

Thanks
Max




More information about the security-dev mailing list