You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2011/11/01 16:22:59 UTC
svn commit: r1196051 -
/commons/proper/net/trunk/src/main/java/org/apache/commons/net/io/CopyStreamException.java
Author: sebb
Date: Tue Nov 1 15:22:59 2011
New Revision: 1196051
URL: http://svn.apache.org/viewvc?rev=1196051&view=rev
Log:
No need to save exception locally
Modified:
commons/proper/net/trunk/src/main/java/org/apache/commons/net/io/CopyStreamException.java
Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/io/CopyStreamException.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/io/CopyStreamException.java?rev=1196051&r1=1196050&r2=1196051&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/io/CopyStreamException.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/io/CopyStreamException.java Tue Nov 1 15:22:59 2011
@@ -32,7 +32,6 @@ public class CopyStreamException extends
private static final long serialVersionUID = -2602899129433221532L;
private final long totalBytesTransferred;
- private final IOException ioException;
/**
* Creates a new CopyStreamException instance.
@@ -46,8 +45,8 @@ public class CopyStreamException extends
IOException exception)
{
super(message);
+ initCause(exception); // merge this into super() call once we need 1.6+
totalBytesTransferred = bytesTransferred;
- ioException = exception;
}
/**
@@ -67,6 +66,6 @@ public class CopyStreamException extends
*/
public IOException getIOException()
{
- return ioException;
+ return (IOException) getCause(); // cast is OK because it was initialised with an IOException
}
}