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 2020/09/11 00:18:13 UTC

[commons-vfs] branch master updated: Remove unused exceptions in tests. Clean up compiler warnings.

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


The following commit(s) were added to refs/heads/master by this push:
     new 3b8bd95  Remove unused exceptions in tests. Clean up compiler warnings.
3b8bd95 is described below

commit 3b8bd953bff31a8ea00eeb103cd2bd4b83c8870c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Sep 10 20:18:06 2020 -0400

    Remove unused exceptions in tests. Clean up compiler warnings.
---
 .../vfs2/provider/ftp/test/MultipleConnectionTestCase.java   | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ftp/test/MultipleConnectionTestCase.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ftp/test/MultipleConnectionTestCase.java
index 36a0d58..c590e99 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ftp/test/MultipleConnectionTestCase.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ftp/test/MultipleConnectionTestCase.java
@@ -37,7 +37,7 @@ public class MultipleConnectionTestCase {
     }
 
     @AfterClass
-    public static void tearDownClass() throws MalformedURLException, FtpException {
+    public static void tearDownClass() {
         FtpProviderTestCase.tearDownClass();
     }
 
@@ -46,7 +46,7 @@ public class MultipleConnectionTestCase {
     }
 
     @Test
-    public void testConnectRoot() throws SocketException, IOException {
+    public void testConnectRoot() throws IOException {
         resolveRoot();
         resolveRoot();
     }
@@ -60,12 +60,8 @@ public class MultipleConnectionTestCase {
             client1.connect(hostname, FtpProviderTestCase.getSocketPort());
             client2.connect(hostname, FtpProviderTestCase.getSocketPort());
         } finally {
-            if (client1 != null) {
-                client1.disconnect();
-            }
-            if (client2 != null) {
-                client2.disconnect();
-            }
+            client1.disconnect();
+            client2.disconnect();
         }
     }
 }