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)

git-svn-id: https://svn.apache.org/repos/asf/logging/log4j/companions/receivers/trunk@934693 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/log4j/xml/UtilLoggingXMLDecoder.java b/src/main/java/org/apache/log4j/xml/UtilLoggingXMLDecoder.java
index 6b8fdfd..f9d8125 100644
--- a/src/main/java/org/apache/log4j/xml/UtilLoggingXMLDecoder.java
+++ b/src/main/java/org/apache/log4j/xml/UtilLoggingXMLDecoder.java
@@ -393,9 +393,10 @@
               }
             }
           }
-
-          exception =
-            (String[]) exceptionList.toArray(new String[exceptionList.size()]);
+          if (exceptionList.size() > 0) {
+              exception =
+                (String[]) exceptionList.toArray(new String[exceptionList.size()]);
+          }
         }
       }
 
@@ -424,14 +425,15 @@
         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);
diff --git a/src/main/java/org/apache/log4j/xml/XMLDecoder.java b/src/main/java/org/apache/log4j/xml/XMLDecoder.java
index 62cae3a..8ced851 100644
--- a/src/main/java/org/apache/log4j/xml/XMLDecoder.java
+++ b/src/main/java/org/apache/log4j/xml/XMLDecoder.java
@@ -378,9 +378,11 @@
         }
 
         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 @@
       } 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);