You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mb...@apache.org on 2008/04/03 00:45:00 UTC

svn commit: r644095 - /commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/example/lines/Lines.java

Author: mbenson
Date: Wed Apr  2 15:45:00 2008
New Revision: 644095

URL: http://svn.apache.org/viewvc?rev=644095&view=rev
Log:
exception field wasn't used; use it

Modified:
    commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/example/lines/Lines.java

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/example/lines/Lines.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/example/lines/Lines.java?rev=644095&r1=644094&r2=644095&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/example/lines/Lines.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/example/lines/Lines.java Wed Apr  2 15:45:00 2008
@@ -74,10 +74,17 @@
     private BufferedReader in = null;
     
     private class TunneledException extends RuntimeException {
-        TunneledException(Exception e) {
-            super(e.toString());
-            exception = e;
-        }        
         private Exception exception = null;
+        TunneledException(Exception exception) {
+            super(exception.toString());
+            this.exception = exception;
+        }
+        //this is an override if compiled against Java >= 1.4, but just another method on 1.3
+        /**
+         * Get the cause of this TunneledException
+         */
+        public Throwable getCause() {
+            return exception;
+        }
     }
 }