Skip to content
Snippets Groups Projects
Commit 6e29350a authored by brinn's avatar brinn
Browse files

change: define WrappedIOException.getCause() to return an IOException

SVN: 7902
parent 9007a1b9
No related branches found
No related tags found
No related merge requests found
...@@ -94,17 +94,6 @@ public class CheckedExceptionTunnel extends RuntimeException ...@@ -94,17 +94,6 @@ public class CheckedExceptionTunnel extends RuntimeException
return new CheckedExceptionTunnel(exception); return new CheckedExceptionTunnel(exception);
} }
/**
* Returns the original exception before being wrapped for an {@link WrappedIOException}.
*/
public final static IOException unwrapIfNecessary(final WrappedIOException exception)
{
assert exception != null : "Exception not specified.";
// We are sure that the wrapped exception is an 'IOException'.
return (IOException) exception.getCause();
}
/** /**
* Returns the original exception before being wrapped, if the exception has been wrapped, or * Returns the original exception before being wrapped, if the exception has been wrapped, or
* <var>exception</var> otherwise. * <var>exception</var> otherwise.
......
...@@ -39,4 +39,10 @@ public class WrappedIOException extends CheckedExceptionTunnel ...@@ -39,4 +39,10 @@ public class WrappedIOException extends CheckedExceptionTunnel
assert checkedException != null; assert checkedException != null;
} }
@Override
public IOException getCause()
{
return (IOException) super.getCause();
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment