You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/06/23 20:27:09 UTC
[commons-vfs] 02/15: [ftp] Throw a specialized RuntimeException instead of RuntimeException
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git
commit da7c04b9e669f4edf4c50fea0821bdbe55ddceb9
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 23 16:24:14 2023 -0400
[ftp] Throw a specialized RuntimeException instead of
RuntimeException
---
.../main/java/org/apache/commons/vfs2/provider/ftp/FtpFileObject.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileObject.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileObject.java
index 47f51890..fa81274f 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileObject.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileObject.java
@@ -20,6 +20,7 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.io.UncheckedIOException;
import java.time.Instant;
import java.util.Calendar;
import java.util.Collections;
@@ -596,7 +597,7 @@ public class FtpFileObject extends AbstractFileObject<FtpFileSystem> {
try {
childMap.remove(UriParser.decode(child.getBaseName()));
} catch (final FileSystemException e) {
- throw new RuntimeException(e.getMessage());
+ throw new UncheckedIOException(e);
}
} else {
// if child was added we have to rescan the children