8043456: KSS: javax.swing.plaf.basic.BasicInternalFrameTitlePane#postClosingEvent
authormalenkov
Wed, 21 May 2014 16:48:04 +0400
changeset 25096 6aff20f916b2
parent 25095 c5dedd869f01
child 25097 147ac5785a84
8043456: KSS: javax.swing.plaf.basic.BasicInternalFrameTitlePane#postClosingEvent Reviewed-by: alexsch, serb
jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java	Wed May 21 14:13:17 2014 +0400
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java	Wed May 21 16:48:04 2014 +0400
@@ -380,15 +380,11 @@
         InternalFrameEvent e = new InternalFrameEvent(
             frame, InternalFrameEvent.INTERNAL_FRAME_CLOSING);
         // Try posting event, unless there's a SecurityManager.
-        if (JInternalFrame.class.getClassLoader() == null) {
-            try {
-                Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(e);
-                return;
-            } catch (SecurityException se) {
-                // Use dispatchEvent instead.
-            }
+        try {
+            Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(e);
+        } catch (SecurityException se) {
+            frame.dispatchEvent(e);
         }
-        frame.dispatchEvent(e);
     }