You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ca...@apache.org on 2006/01/24 01:10:35 UTC

svn commit: r371727 - /logging/log4j/trunk/src/java/org/apache/log4j/spi/ThrowableInformation.java

Author: carnold
Date: Mon Jan 23 16:10:33 2006
New Revision: 371727

URL: http://svn.apache.org/viewcvs?rev=371727&view=rev
Log:
Bug 35452: Restored o.a.l.spi.ThrowableInformation.getThrowable

Modified:
    logging/log4j/trunk/src/java/org/apache/log4j/spi/ThrowableInformation.java

Modified: logging/log4j/trunk/src/java/org/apache/log4j/spi/ThrowableInformation.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/spi/ThrowableInformation.java?rev=371727&r1=371726&r2=371727&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/spi/ThrowableInformation.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/spi/ThrowableInformation.java Mon Jan 23 16:10:33 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999,2004 The Apache Software Foundation.
+ * Copyright 1999,2006 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -34,18 +34,17 @@
  * subsequent elements correspond the stack trace with the top most entry of the
  * stack corresponding to the second entry of the 'rep' array that is rep[1].
  *
- * Note that ThrowableInformation does not store the throwable it represents.
- *
  * @author Ceki Gülcü
  *
  */
 public class ThrowableInformation implements java.io.Serializable {
   static final long serialVersionUID = -4748765566864322735L;
 
-  //private transient Throwable throwable;
+  private transient Throwable throwable = null;
   private String[] rep;
 
-  public ThrowableInformation(Throwable throwable) {
+  public ThrowableInformation(final Throwable throwable) {
+    this.throwable = throwable;
     VectorWriter vw = new VectorWriter();
     extractStringRep(throwable, vw);
     rep = vw.toStringArray();
@@ -55,9 +54,14 @@
     this.rep = rep;
   }
 
-  // public Throwable getThrowable() {
-  // return throwable;
-  //}
+    /**
+     * Gets throwable.
+     * @return throwable, may be null.
+     * @deprecated
+     */
+  public Throwable getThrowable() {
+     return throwable;
+  }
 
   public void extractStringRep(Throwable t, VectorWriter vw) {
     t.printStackTrace(vw);



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org