Author: ggregory
Date: Mon May 12 16:20:51 2014
New Revision: 1594022

URL: http://svn.apache.org/r1594022
Log:
Rename getCause() to getCauseProxy(). The goal is to make a clear distinction 
between an exception object that is a proxy vs. not. Working toward new XML and 
JSON Serialization and Deserialization.

Modified:
    
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java

Modified: 
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java?rev=1594022&r1=1594021&r2=1594022&view=diff
==============================================================================
--- 
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java
 (original)
+++ 
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java
 Mon May 12 16:20:51 2014
@@ -125,7 +125,7 @@ public class ThrowableProxy implements S
         return throwable;
     }
 
-    public ThrowableProxy getCause() {
+    public ThrowableProxy getCauseProxy() {
         return causeProxy;
     }
 
@@ -202,7 +202,7 @@ public class ThrowableProxy implements S
      */
     @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
     public void formatWrapper(final StringBuilder sb, final ThrowableProxy 
cause, final List<String> packages) {
-        final Throwable caused = cause.getCause() != null ? 
cause.getCause().getThrowable() : null;
+        final Throwable caused = cause.getCauseProxy() != null ? 
cause.getCauseProxy().getThrowable() : null;
         if (caused != null) {
             formatWrapper(sb, cause.causeProxy);
             sb.append("Wrapped by: ");
@@ -260,7 +260,7 @@ public class ThrowableProxy implements S
         sb.append("Caused by: ").append(cause).append(EOL);
         formatElements(sb, cause.commonElementCount, 
cause.getThrowable().getStackTrace(), cause.callerPackageData,
             packages);
-        if (cause.getCause() != null) {
+        if (cause.getCauseProxy() != null) {
             formatCause(sb, cause.causeProxy, packages);
         }
     }


Reply via email to