Clean up some deprecated code
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 16 Apr 2009 14:57:40 +0000 (14:57 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 16 Apr 2009 14:57:40 +0000 (14:57 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@765658 13f79535-47bb-0310-9956-ffa450edef68

java/javax/servlet/jsp/el/ELException.java
java/org/apache/jasper/runtime/PageContextImpl.java

index 1b36f43..4989165 100644 (file)
@@ -25,13 +25,7 @@ package javax.servlet.jsp.el;
  * @deprecated
  */
 public class ELException extends Exception {
-    // -------------------------------------
-    // Member variables
-    // -------------------------------------
 
-    private Throwable mRootCause;
-
-    // -------------------------------------
     /**
      * Creates an ELException with no detail message.
      **/
@@ -39,7 +33,6 @@ public class ELException extends Exception {
         super();
     }
 
-    // -------------------------------------
     /**
      * Creates an ELException with the provided detail message.
      * 
@@ -50,7 +43,6 @@ public class ELException extends Exception {
         super(pMessage);
     }
 
-    // -------------------------------------
     /**
      * Creates an ELException with the given root cause.
      * 
@@ -58,8 +50,7 @@ public class ELException extends Exception {
      *            the originating cause of this exception
      **/
     public ELException(Throwable pRootCause) {
-        super(pRootCause.getLocalizedMessage());
-        mRootCause = pRootCause;
+        super(pRootCause);
     }
 
     // -------------------------------------
@@ -72,8 +63,7 @@ public class ELException extends Exception {
      *            the originating cause of this exception
      **/
     public ELException(String pMessage, Throwable pRootCause) {
-        super(pMessage);
-        mRootCause = pRootCause;
+        super(pMessage, pRootCause);
     }
 
     // -------------------------------------
@@ -83,6 +73,6 @@ public class ELException extends Exception {
      * @return the root cause of this exception
      */
     public Throwable getRootCause() {
-        return mRootCause;
+        return getCause();
     }
 }
index 67e8fb3..5a9d03d 100644 (file)
@@ -845,9 +845,9 @@ public class PageContextImpl extends PageContext {
 
                        Throwable rootCause = null;
                        if (t instanceof JspException) {
-                               rootCause = ((JspException) t).getRootCause();
+                               rootCause = ((JspException) t).getCause();
                        } else if (t instanceof ELException) {
-                               rootCause = ((ELException) t).getRootCause();
+                               rootCause = ((ELException) t).getCause();
                        }
 
                        if (rootCause != null) {