logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpo...@apache.org
Subject svn commit: r1568957 - /logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/ClientGUI.java
Date Mon, 17 Feb 2014 12:23:26 GMT
Author: rpopma
Date: Mon Feb 17 12:23:26 2014
New Revision: 1568957

URL: http://svn.apache.org/r1568957
Log:
LOG4J2-538 ensure AWT/Swing components are only accessed/modified from the AWT event thread

Modified:
    logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/ClientGUI.java

Modified: logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/ClientGUI.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/ClientGUI.java?rev=1568957&r1=1568956&r2=1568957&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/ClientGUI.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/ClientGUI.java
Mon Feb 17 12:23:26 2014
@@ -177,6 +177,14 @@ public class ClientGUI extends JPanel im
 
     @Override
     public void handleNotification(final Notification notif, final Object paramObject) {
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() { // LOG4J2-538
+                handleNotificationInAWTEventThread(notif, paramObject);
+            }
+        });
+    }
+
+    private void handleNotificationInAWTEventThread(final Notification notif, final Object
paramObject) {
         if (StatusLoggerAdminMBean.NOTIF_TYPE_MESSAGE.equals(notif.getType())) {
             JTextArea text = statusLogTextAreaMap.get(paramObject);
             if (text != null) {



Mime
View raw message