changeset 10117:62b09e94b2b6

8043456: KSS: javax.swing.plaf.basic.BasicInternalFrameTitlePane#postClosingEvent Reviewed-by: alexsch, serb
author malenkov
date Wed, 21 May 2014 16:48:04 +0400
parents a1635cd4bdb5
children 3d7eaa4dbdec
files src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
diffstat 1 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java	Wed May 21 14:13:17 2014 +0400
+++ b/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);
     }