commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1367265 - in /commons/proper/vfs/trunk: core/src/main/java/org/apache/commons/vfs2/FileSystemException.java src/changes/changes.xml
Date Mon, 30 Jul 2012 20:21:12 GMT
Author: ggregory
Date: Mon Jul 30 20:21:12 2012
New Revision: 1367265

URL: http://svn.apache.org/viewvc?rev=1367265&view=rev
Log:
[VFS-434] FileSystemException should reuse IOException's chained exception.

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemException.java
    commons/proper/vfs/trunk/src/changes/changes.xml

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemException.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemException.java?rev=1367265&r1=1367264&r2=1367265&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemException.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemException.java
Mon Jul 30 20:21:12 2012
@@ -40,16 +40,6 @@ public class FileSystemException
     private static final Pattern PASSWORD_PATTERN = Pattern.compile(":(?:[^/]+)@");
 
     /**
-     * The Throwable that caused this exception to be thrown.
-     */
-    private final Throwable throwable;
-
-    /**
-     * The message code.
-     */
-    private final String code;
-
-    /**
      * array of complementary info (context).
      */
     private final String[] info;
@@ -138,7 +128,7 @@ public class FileSystemException
                                final Throwable throwable,
                                final Object... info)
     {
-        super(code);
+        super(code, throwable);
 
         if (info == null)
         {
@@ -160,8 +150,6 @@ public class FileSystemException
                 this.info[i] = value;
             }
         }
-        this.code = code;
-        this.throwable = throwable;
     }
 
     /**
@@ -185,17 +173,6 @@ public class FileSystemException
     }
 
     /**
-     * Retrieve root cause of the exception.
-     *
-     * @return the root cause
-     */
-    @Override
-    public final Throwable getCause()
-    {
-        return throwable;
-    }
-
-    /**
      * Retrieve error code of the exception.
      * Could be used as key for internationalization.
      *
@@ -203,7 +180,7 @@ public class FileSystemException
      */
     public String getCode()
     {
-        return code;
+        return super.getMessage();
     }
 
     /**

Modified: commons/proper/vfs/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/src/changes/changes.xml?rev=1367265&r1=1367264&r2=1367265&view=diff
==============================================================================
--- commons/proper/vfs/trunk/src/changes/changes.xml (original)
+++ commons/proper/vfs/trunk/src/changes/changes.xml Mon Jul 30 20:21:12 2012
@@ -23,6 +23,9 @@
 
   <body>
     <release version="2.1" date="TBD" description="New features and bug fix release.">
+      <action issue="VFS-434" dev="ggregory" type="add" due-to="ggregory">
+        FileSystemException should reuse IOException's chained exception.
+      </action>
       <action issue="VFS-433" dev="ggregory" type="add" due-to="ggregory">
         Message "vfs.provider.webdav/propfind.error" is not defined.
       </action>



Mime
View raw message