Author: sdeboy
Date: Fri Apr 16 05:32:34 2010
New Revision: 934693

URL: http://svn.apache.org/viewvc?rev=934693&view=rev
Log:
Chainsaw UI updates (feedback appreciated)
 - instead of the default row selection rendering of changing the row's 
background color, the selected row color is preserved but a border around the 
selected row is displayed
 - removed table row and column margin (border around cells in the selected row 
had gaps without making this change)
 - updated widths of fields in status bar
 - performance tweak: tree node selection no longer triggers unnecessary 
calculations (only currently displayed rows are recalculated for highlighting)
 - removed bevel border around ID field
 
Fixed xml decoders - an empty throwable node was resulting in a loggingEvent 
with a non-null (but blank) throwableInformation ('exception exists' expression 
in Chainsaw would match all events)

Modified:
    
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/UtilLoggingXMLDecoder.java
    
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/XMLDecoder.java

Modified: 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/UtilLoggingXMLDecoder.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/UtilLoggingXMLDecoder.java?rev=934693&r1=934692&r2=934693&view=diff
==============================================================================
--- 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/UtilLoggingXMLDecoder.java
 (original)
+++ 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/UtilLoggingXMLDecoder.java
 Fri Apr 16 05:32:34 2010
@@ -393,9 +393,10 @@ public class UtilLoggingXMLDecoder imple
               }
             }
           }
-
-          exception =
-            (String[]) exceptionList.toArray(new String[exceptionList.size()]);
+          if (exceptionList.size() > 0) {
+              exception =
+                (String[]) exceptionList.toArray(new 
String[exceptionList.size()]);
+          }
         }
       }
 
@@ -424,14 +425,15 @@ public class UtilLoggingXMLDecoder imple
         info = LocationInfo.NA_LOCATION_INFO;
       }
 
-      if (exception == null) {
-          exception = new String[]{""};
-      }
+        ThrowableInformation throwableInfo = null;
+        if (exception != null) {
+            throwableInfo = new ThrowableInformation(exception);
+        }
 
         LoggingEvent loggingEvent = new LoggingEvent(null,
                 logger, timeStamp, level, message,
                 threadName,
-                new ThrowableInformation(exception),
+                throwableInfo,
                 ndc,
                 info,
                 properties);

Modified: 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/XMLDecoder.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/XMLDecoder.java?rev=934693&r1=934692&r2=934693&view=diff
==============================================================================
--- 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/XMLDecoder.java
 (original)
+++ 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/XMLDecoder.java
 Fri Apr 16 05:32:34 2010
@@ -378,9 +378,11 @@ public class XMLDecoder implements Decod
         }
 
         if (tagName.equalsIgnoreCase("log4j:throwable")) {
-          exception = new String[] {
-                  getCData(list.item(y))
-          };
+            String exceptionString = getCData(list.item(y));
+            if (exceptionString != null && !exceptionString.trim().equals("")) 
{
+                exception = new String[] {exceptionString.trim()
+            };
+          }
         }
 
         if (tagName.equalsIgnoreCase("log4j:locationinfo")) {
@@ -440,14 +442,15 @@ public class XMLDecoder implements Decod
       } else {
         info = LocationInfo.NA_LOCATION_INFO;
       }
-      if (exception == null) {
-          exception = new String[]{""};
+      ThrowableInformation throwableInfo = null;
+      if (exception != null) {
+          throwableInfo = new ThrowableInformation(exception);
       }
 
         LoggingEvent loggingEvent = new LoggingEvent(null,
                 logger, timeStamp, level, message,
                 threadName,
-                new ThrowableInformation(exception),
+                throwableInfo,
                 ndc,
                 info,
                 properties);



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to