8000 IO-462 IOExceptionWithCause no longer needed · raboof/commons-io@5a62c00 · GitHub
Skip to content

Commit 5a62c00

Browse files
committed
IO-462 IOExceptionWithCause no longer needed
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@1642799 13f79535-47bb-0310-9956-ffa450edef68
1 parent 00f2cbe commit 5a62c00

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

src/main/java/org/apache/commons/io/FileSystemUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ long parseBytes(final String freeSpace, final String path) throws IOException {
444444
return bytes;
445445

446446
} catch (final NumberFormatException ex) {
447-
throw new IOExceptionWithCause(
447+
throw new IOException(
448448
"Command line '" + DF + "' did not return numeric data as expected " +
449449
"for path '" + path + "'- check path is valid", ex);
450450
}
@@ -512,7 +512,7 @@ List<String> performCommand(final String[] cmdAttribs, final int max, final long
512512
return lines;
513513

514514
} catch (final InterruptedException ex) {
515-
throw new IOExceptionWithCause(
515+
throw new IOException(
516516
"Command line threw an InterruptedException " +
517517
"for command " + Arrays.asList(cmdAttribs) + " timeout=" + timeout, ex);
518518
} finally {

src/main/java/org/apache/commons/io/TaggedIOException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
* @since 2.0
2828
*/
29-
public class TaggedIOException extends IOExceptionWithCause {
29+
public class TaggedIOException extends IOException {
3030

3131
/**
3232
* Generated serial version UID.

src/test/java/org/apache/commons/io/IOExceptionWithCauseTestCase.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
package org.apache.commons.io;
1919

20+
import java.io.IOException;
21+
2022
import junit.framework.TestCase;
2123

2224
/**
@@ -31,7 +33,7 @@ public class IOExceptionWithCauseTestCase extends TestCase {
3133
*/
3234
public void testIOExceptionStringThrowable() {
3335
final Throwable cause = new IllegalArgumentException("cause");
34-
final IOExceptionWithCause exception = new IOExceptionWithCause("message", cause);
36+
final IOException exception = new IOException("message", cause);
3537
this.validate(exception, cause, "message");
3638
}
3739

@@ -40,7 +42,7 @@ public void testIOExceptionStringThrowable() {
4042
*/
4143
public void testIOExceptionThrowable() {
4244
final Throwable cause = new IllegalArgumentException("cause");
43-
final IOExceptionWithCause exception = new IOExceptionWithCause(cause);
45+
final IOException exception = new IOException(cause);
4446
this.validate(exception, cause, "java.lang.IllegalArgumentException: cause");
4547
}
4648

0 commit comments

Comments
 (0)