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

[commons-vfs] 04/15: [http4] 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 dc7019b52d536f24a8ec796566147ee0a654cc9f
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 23 16:24:42 2023 -0400

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

diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileSystem.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileSystem.java
index 85aa472b..188ddb69 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileSystem.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileSystem.java
@@ -17,6 +17,7 @@
 package org.apache.commons.vfs2.provider.http4;
 
 import java.io.IOException;
+import java.io.UncheckedIOException;
 import java.net.URI;
 import java.util.Collection;
 
@@ -91,7 +92,7 @@ public class Http4FileSystem extends AbstractFileSystem {
             try {
                 ((CloseableHttpClient) httpClient).close();
             } catch (final IOException e) {
-                throw new RuntimeException("Error closing HttpClient", e);
+                throw new UncheckedIOException("Error closing HttpClient", e);
             }
         }
     }