commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r644095 - /commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/example/lines/Lines.java
Date Wed, 02 Apr 2008 22:45:00 GMT
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;
+        }
     }
 }



Mime
View raw message