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:10 UTC

[commons-vfs] 03/15: [hdfs] 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 18add71266c289bac70b8e06df22205581d07842
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 23 16:24:31 2023 -0400

    [hdfs] Throw a specialized RuntimeException instead of
    RuntimeException
---
 .../java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystem.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystem.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystem.java
index e141e92c..c4df7c0b 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystem.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystem.java
@@ -18,6 +18,7 @@ package org.apache.commons.vfs2.provider.hdfs;
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.UncheckedIOException;
 import java.io.UnsupportedEncodingException;
 import java.net.URL;
 import java.net.URLDecoder;
@@ -76,7 +77,7 @@ public class HdfsFileSystem extends AbstractFileSystem {
                 fs.close();
             }
         } catch (final IOException e) {
-            throw new RuntimeException("Error closing HDFS client", e);
+            throw new UncheckedIOException("Error closing HDFS client", e);
         }
         super.close();
     }