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:31:30 UTC

[commons-vfs] branch master updated (3b8bd95 -> 9ec6f59)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git.


    from 3b8bd95  Remove unused exceptions in tests. Clean up compiler warnings.
     new d53db44  No need to nest.
     new 3442f0f  Organize imports.
     new b2397b1  Use final.
     new 9ec6f59  Use varargs.

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../commons/vfs2/cache/FileSystemAndNameKey.java   |  2 --
 .../vfs2/impl/DefaultFileSystemManager.java        |  2 +-
 .../vfs2/impl/FileContentInfoFilenameFactory.java  |  3 +--
 .../commons/vfs2/provider/AbstractFileSystem.java  |  3 +--
 .../vfs2/provider/CompositeFileProvider.java       |  4 ++--
 .../http4/Http4FileSystemConfigBuilder.java        |  1 +
 .../http5/Http5FileSystemConfigBuilder.java        |  1 +
 .../provider/sftp/SftpFileSystemConfigBuilder.java |  2 --
 .../util/DelegatingFileSystemOptionsBuilder.java   |  4 ++--
 .../apache/commons/vfs2/util/FileObjectUtils.java  |  1 +
 .../vfs2/impl/test/DefaultFileMonitorTest.java     |  2 --
 .../ftp/test/MultipleConnectionTestCase.java       |  1 -
 .../http/test/GetContentInfoFunctionalTest.java    |  6 +++---
 .../http4/test/Http4GetContentInfoTest.java        |  6 +++---
 .../http5/test/Http5GetContentInfoTest.java        |  6 +++---
 .../http5s/test/Http5sGetContentInfoTest.java      |  4 ++--
 .../LocalFileRandomAccessContentTestCase.java      | 12 +++++------
 .../test/RamFileRandomAccessContentTestCase.java   | 10 ++++-----
 .../sftp/test/SftpMultiThreadWriteTests.java       | 24 +++++++++++-----------
 .../SftpProviderClosedExecChannelTestCase.java     |  7 ++++++-
 .../tar/test/CreateFileSystemTestCase.java         | 14 ++++++-------
 .../provider/tar/test/TarFileObjectTestCase.java   |  6 +++---
 .../vfs2/test/AbstractProviderTestCase.java        | 19 +++++++++--------
 .../commons/vfs2/test/ProviderWriteTests.java      |  2 --
 24 files changed, 70 insertions(+), 72 deletions(-)


[commons-vfs] 01/04: No need to nest.

Posted by gg...@apache.org.
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 d53db44db134805ad932cae58ce5b50d74e0b738
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Sep 10 20:20:21 2020 -0400

    No need to nest.
---
 .../org/apache/commons/vfs2/impl/FileContentInfoFilenameFactory.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/FileContentInfoFilenameFactory.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/FileContentInfoFilenameFactory.java
index 2888ff6..52d660f 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/FileContentInfoFilenameFactory.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/FileContentInfoFilenameFactory.java
@@ -45,8 +45,7 @@ public class FileContentInfoFilenameFactory implements FileContentInfoFactory {
         // optimize object creation for common case
         if (contentType == null) {
             return NULL_INFO;
-        } else {
-            return new DefaultFileContentInfo(contentType, null);
         }
+        return new DefaultFileContentInfo(contentType, null);
     }
 }


[commons-vfs] 03/04: Use final.

Posted by gg...@apache.org.
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 b2397b1a2b365b515a5130ba7e33e546f5b84733
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Sep 10 20:20:57 2020 -0400

    Use final.
---
 .../vfs2/provider/http5s/test/Http5sGetContentInfoTest.java  |  2 +-
 .../provider/local/LocalFileRandomAccessContentTestCase.java |  4 ++--
 .../ram/test/RamFileRandomAccessContentTestCase.java         |  2 +-
 .../vfs2/provider/sftp/test/SftpMultiThreadWriteTests.java   | 12 ++++++------
 .../vfs2/provider/tar/test/CreateFileSystemTestCase.java     |  8 ++++----
 .../vfs2/provider/tar/test/TarFileObjectTestCase.java        |  2 +-
 6 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http5s/test/Http5sGetContentInfoTest.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http5s/test/Http5sGetContentInfoTest.java
index 6c354a2..c72889f 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http5s/test/Http5sGetContentInfoTest.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http5s/test/Http5sGetContentInfoTest.java
@@ -74,7 +74,7 @@ public class Http5sGetContentInfoTest extends TestCase {
         final FileObject fo = fsManager.resolveFile(uri, getOptionsWithSSL());
         final FileContent content = fo.getContent();
         try(InputStream is = content.getInputStream()){
-            String text = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8)).lines().collect(Collectors.joining("\n"));
+            final String text = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8)).lines().collect(Collectors.joining("\n"));
             assertNotNull(text);
         }
     }
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/local/LocalFileRandomAccessContentTestCase.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/local/LocalFileRandomAccessContentTestCase.java
index 93205fa..4190bf2 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/local/LocalFileRandomAccessContentTestCase.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/local/LocalFileRandomAccessContentTestCase.java
@@ -37,12 +37,12 @@ public class LocalFileRandomAccessContentTestCase {
     @Test
     public void testInputStreamRead0xff() throws IOException {
         // open test file,this file has only one byte data 0xff
-        File file = new File("src/test/resources/test-data/0xff_file.txt");
+        final File file = new File("src/test/resources/test-data/0xff_file.txt");
 
         // read test data,first data should be 0xFF instead of -1. Will read -1 finally (EOF)
         try (InputStream in = new LocalFileRandomAccessContent(file, RandomAccessMode.READ).getInputStream()) {
             // read first data
-            int read = in.read();
+            final int read = in.read();
             Assert.assertNotEquals(EOF, read);
             Assert.assertEquals(0xFF, read);
 
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ram/test/RamFileRandomAccessContentTestCase.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ram/test/RamFileRandomAccessContentTestCase.java
index bf43a89..13953c9 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ram/test/RamFileRandomAccessContentTestCase.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ram/test/RamFileRandomAccessContentTestCase.java
@@ -50,7 +50,7 @@ public class RamFileRandomAccessContentTestCase {
         // read test data,first data should be 0xFF instead of -1. Will read -1 finally (EOF)
         try (InputStream in = new RamFileRandomAccessContent((RamFileObject) file, RandomAccessMode.READ).getInputStream()) {
             // read first data
-            int read = in.read();
+            final int read = in.read();
             Assert.assertNotEquals(EOF, read);
             Assert.assertEquals(0xFF, read);
 
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpMultiThreadWriteTests.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpMultiThreadWriteTests.java
index c2caf57..e8db381 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpMultiThreadWriteTests.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpMultiThreadWriteTests.java
@@ -64,11 +64,11 @@ public class SftpMultiThreadWriteTests extends AbstractProviderTestCase {
     public void testParallelCopyFromLocalFileSystem() throws Exception {
         final File localFile = new File("src/test/resources/test-data/test.zip");
 
-        FileObject localFileObject = VFS.getManager().toFileObject(localFile);
+        final FileObject localFileObject = VFS.getManager().toFileObject(localFile);
 
         final FileObject scratchFolder = createScratchFolder();
 
-        List<Callable<Boolean>> tasks = new ArrayList<>();
+        final List<Callable<Boolean>> tasks = new ArrayList<>();
         for (int i = 0; i < 100; i++) {
             final String fileName = "file" + i + "copy.txt";
             tasks.add(() -> {
@@ -77,20 +77,20 @@ public class SftpMultiThreadWriteTests extends AbstractProviderTestCase {
 
                     assertFalse(fileCopy.exists());
                     fileCopy.copyFrom(localFileObject, Selectors.SELECT_SELF);
-                } catch (Throwable e) {
+                } catch (final Throwable e) {
                     return false;
                 }
                 return true;
             });
         }
 
-        ExecutorService service = Executors.newFixedThreadPool(10);
+        final ExecutorService service = Executors.newFixedThreadPool(10);
         try {
-            List<Future<Boolean>> futures = service.invokeAll(tasks);
+            final List<Future<Boolean>> futures = service.invokeAll(tasks);
             assertTrue(futures.stream().allMatch(fut -> {
                 try {
                     return fut.get(5, TimeUnit.SECONDS);
-                } catch (Exception e) {
+                } catch (final Exception e) {
                     return false;
                 }
             }));
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/tar/test/CreateFileSystemTestCase.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/tar/test/CreateFileSystemTestCase.java
index cc867bd..71a7728 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/tar/test/CreateFileSystemTestCase.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/tar/test/CreateFileSystemTestCase.java
@@ -36,7 +36,7 @@ public class CreateFileSystemTestCase {
     private FileObject createFileSystem(final String testFilePath) throws IOException {
 
         final File testFile = new File(testFilePath);
-        FileSystemManager manager = VFS.getManager();
+        final FileSystemManager manager = VFS.getManager();
 
         // create fileSystem and return fileObject
         try (FileObject localFileObject = manager.resolveFile(testFile.getAbsolutePath())) {
@@ -47,7 +47,7 @@ public class CreateFileSystemTestCase {
     @Test
     public void testTarFile() throws IOException {
 
-        String testFilePath = "src/test/resources/test-data/test.tar";
+        final String testFilePath = "src/test/resources/test-data/test.tar";
         try (FileObject fileObject = createFileSystem(testFilePath)) {
             Assert.assertTrue(fileObject instanceof TarFileObject);
         }
@@ -56,7 +56,7 @@ public class CreateFileSystemTestCase {
     @Test
     public void testTgzFile() throws IOException {
 
-        String testFilePath = "src/test/resources/test-data/test.tgz";
+        final String testFilePath = "src/test/resources/test-data/test.tgz";
         try (FileObject fileObject = createFileSystem(testFilePath)) {
             Assert.assertTrue(fileObject instanceof TarFileObject);
         }
@@ -65,7 +65,7 @@ public class CreateFileSystemTestCase {
     @Test
     public void testTbz2File() throws IOException {
 
-        String testFilePath = "src/test/resources/test-data/test.tbz2";
+        final String testFilePath = "src/test/resources/test-data/test.tbz2";
         try (FileObject fileObject = createFileSystem(testFilePath)) {
             Assert.assertTrue(fileObject instanceof TarFileObject);
         }
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/tar/test/TarFileObjectTestCase.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/tar/test/TarFileObjectTestCase.java
index ad1840e..ab9c02f 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/tar/test/TarFileObjectTestCase.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/tar/test/TarFileObjectTestCase.java
@@ -55,7 +55,7 @@ public class TarFileObjectTestCase {
         testReadSpecialNameFileInFile("src/test/resources/test-data/special_fileName.tbz2", "tbz2");
     }
 
-    private void testReadSpecialNameFileInFile(String testFilePath, String scheme) throws FileSystemException {
+    private void testReadSpecialNameFileInFile(final String testFilePath, final String scheme) throws FileSystemException {
 
         final File testFile = new File(testFilePath);
         final String[] fileNames = {"file.txt", "file^.txt", "file~.txt", "file?.txt", "file@.txt", "file$.txt",


[commons-vfs] 04/04: Use varargs.

Posted by gg...@apache.org.
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 9ec6f59ceb282371405d16cb1da76f64162b9e30
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Sep 10 20:31:22 2020 -0400

    Use varargs.
---
 .../java/org/apache/commons/vfs2/impl/DefaultFileSystemManager.java   | 2 +-
 .../java/org/apache/commons/vfs2/provider/AbstractFileSystem.java     | 3 +--
 .../apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilder.java  | 4 ++--
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemManager.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemManager.java
index 28ed9f4..a93d7c9 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemManager.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemManager.java
@@ -345,7 +345,7 @@ public class DefaultFileSystemManager implements FileSystemManager {
         }
 
         try {
-            fileObjectDecoratorConst = fileObjectDecorator.getConstructor(new Class[] { FileObject.class });
+            fileObjectDecoratorConst = fileObjectDecorator.getConstructor(FileObject.class);
         } catch (final NoSuchMethodException e) {
             throw new FileSystemException("vfs.impl/invalid-decorator.error", fileObjectDecorator.getName(), e);
         }
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java
index 65dbd31..3762523 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java
@@ -347,8 +347,7 @@ public abstract class AbstractFileSystem extends AbstractVfsComponent implements
 
         if (getFileSystemManager().getFileObjectDecoratorConst() != null) {
             try {
-                file = (FileObject) getFileSystemManager().getFileObjectDecoratorConst()
-                        .newInstance(new Object[] { file });
+                file = (FileObject) getFileSystemManager().getFileObjectDecoratorConst().newInstance(file);
             } catch (final InstantiationException e) {
                 throw new FileSystemException("vfs.impl/invalid-decorator.error",
                         getFileSystemManager().getFileObjectDecorator().getName(), e);
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilder.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilder.java
index e716c09..5d04b4d 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilder.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilder.java
@@ -263,7 +263,7 @@ public class DelegatingFileSystemOptionsBuilder {
             for (int iterValues = 0; iterValues < ctx.values.length; iterValues++) {
                 try {
                     Array.set(convertedValues, iterValues,
-                            valueConstructor.newInstance(new Object[] { ctx.values[iterValues] }));
+                            valueConstructor.newInstance(ctx.values[iterValues]));
                 } catch (final InstantiationException e) {
                     throw new FileSystemException(e);
                 } catch (final IllegalAccessException e) {
@@ -292,7 +292,7 @@ public class DelegatingFileSystemOptionsBuilder {
             for (int iterValues = 0; iterValues < ctx.values.length; iterValues++) {
                 try {
                     Array.set(convertedValues, iterValues,
-                            valueFactory.invoke(null, new Object[] { ctx.values[iterValues] }));
+                            valueFactory.invoke(null, ctx.values[iterValues]));
                 } catch (final IllegalAccessException e) {
                     throw new FileSystemException(e);
                 } catch (final InvocationTargetException e) {


[commons-vfs] 02/04: Organize imports.

Posted by gg...@apache.org.
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 3442f0f2654f046ecc1bed91bd9b32f62dbf84e1
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Sep 10 20:20:35 2020 -0400

    Organize imports.
---
 .../commons/vfs2/cache/FileSystemAndNameKey.java      |  2 --
 .../commons/vfs2/provider/CompositeFileProvider.java  |  4 ++--
 .../provider/http4/Http4FileSystemConfigBuilder.java  |  1 +
 .../provider/http5/Http5FileSystemConfigBuilder.java  |  1 +
 .../provider/sftp/SftpFileSystemConfigBuilder.java    |  2 --
 .../org/apache/commons/vfs2/util/FileObjectUtils.java |  1 +
 .../vfs2/impl/test/DefaultFileMonitorTest.java        |  2 --
 .../provider/ftp/test/MultipleConnectionTestCase.java |  1 -
 .../http/test/GetContentInfoFunctionalTest.java       |  6 +++---
 .../provider/http4/test/Http4GetContentInfoTest.java  |  6 +++---
 .../provider/http5/test/Http5GetContentInfoTest.java  |  6 +++---
 .../http5s/test/Http5sGetContentInfoTest.java         |  2 +-
 .../local/LocalFileRandomAccessContentTestCase.java   |  8 ++++----
 .../ram/test/RamFileRandomAccessContentTestCase.java  |  8 ++++----
 .../provider/sftp/test/SftpMultiThreadWriteTests.java | 12 ++++++------
 .../test/SftpProviderClosedExecChannelTestCase.java   |  7 ++++++-
 .../provider/tar/test/CreateFileSystemTestCase.java   |  6 +++---
 .../vfs2/provider/tar/test/TarFileObjectTestCase.java |  4 ++--
 .../commons/vfs2/test/AbstractProviderTestCase.java   | 19 ++++++++++---------
 .../apache/commons/vfs2/test/ProviderWriteTests.java  |  2 --
 20 files changed, 50 insertions(+), 50 deletions(-)

diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/FileSystemAndNameKey.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/FileSystemAndNameKey.java
index 2d13134..e7d1c57 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/FileSystemAndNameKey.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/FileSystemAndNameKey.java
@@ -19,8 +19,6 @@ package org.apache.commons.vfs2.cache;
 import org.apache.commons.vfs2.FileName;
 import org.apache.commons.vfs2.FileSystem;
 
-import java.util.Comparator;
-
 /**
  * Key for various cache implementations.
  * <p>
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/CompositeFileProvider.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/CompositeFileProvider.java
index 9db2cd2..50425e5 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/CompositeFileProvider.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/CompositeFileProvider.java
@@ -16,12 +16,12 @@
  */
 package org.apache.commons.vfs2.provider;
 
+import java.util.Arrays;
+
 import org.apache.commons.vfs2.FileObject;
 import org.apache.commons.vfs2.FileSystemException;
 import org.apache.commons.vfs2.FileSystemOptions;
 
-import java.util.Arrays;
-
 /**
  * Description.
  */
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileSystemConfigBuilder.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileSystemConfigBuilder.java
index ecac9ba..26d97c1 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileSystemConfigBuilder.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileSystemConfigBuilder.java
@@ -17,6 +17,7 @@
 package org.apache.commons.vfs2.provider.http4;
 
 import java.security.KeyStore;
+
 import org.apache.commons.vfs2.FileSystem;
 import org.apache.commons.vfs2.FileSystemConfigBuilder;
 import org.apache.commons.vfs2.FileSystemOptions;
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5/Http5FileSystemConfigBuilder.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5/Http5FileSystemConfigBuilder.java
index b3f07af..9f5a41a 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5/Http5FileSystemConfigBuilder.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5/Http5FileSystemConfigBuilder.java
@@ -17,6 +17,7 @@
 package org.apache.commons.vfs2.provider.http5;
 
 import java.security.KeyStore;
+
 import org.apache.commons.vfs2.FileSystem;
 import org.apache.commons.vfs2.FileSystemConfigBuilder;
 import org.apache.commons.vfs2.FileSystemOptions;
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
index 8c4da17..a55082e 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
@@ -18,9 +18,7 @@ package org.apache.commons.vfs2.provider.sftp;
 
 import java.io.File;
 import java.io.Serializable;
-import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.List;
 
 import org.apache.commons.vfs2.FileSystem;
 import org.apache.commons.vfs2.FileSystemConfigBuilder;
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java
index fb2328f..3fc7be1 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java
@@ -21,6 +21,7 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.nio.charset.Charset;
 import java.util.Properties;
+
 import org.apache.commons.vfs2.FileContent;
 import org.apache.commons.vfs2.FileObject;
 import org.apache.commons.vfs2.FileSystemException;
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/impl/test/DefaultFileMonitorTest.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/impl/test/DefaultFileMonitorTest.java
index d60ef7c..dafc699 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/impl/test/DefaultFileMonitorTest.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/impl/test/DefaultFileMonitorTest.java
@@ -30,8 +30,6 @@ import org.apache.commons.vfs2.VFS;
 import org.apache.commons.vfs2.impl.DefaultFileMonitor;
 import org.junit.Ignore;
 
-import junit.framework.Assert;
-
 /**
  * Test to verify DefaultFileMonitor
  */
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 c590e99..53dd942 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
@@ -17,7 +17,6 @@
 package org.apache.commons.vfs2.provider.ftp.test;
 
 import java.io.IOException;
-import java.net.MalformedURLException;
 import java.net.SocketException;
 
 import org.apache.commons.net.ftp.FTPClient;
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http/test/GetContentInfoFunctionalTest.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http/test/GetContentInfoFunctionalTest.java
index 26a2ec3..d293f19 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http/test/GetContentInfoFunctionalTest.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http/test/GetContentInfoFunctionalTest.java
@@ -16,6 +16,9 @@
  */
 package org.apache.commons.vfs2.provider.http.test;
 
+import java.net.MalformedURLException;
+import java.net.URL;
+
 import org.apache.commons.vfs2.FileContent;
 import org.apache.commons.vfs2.FileObject;
 import org.apache.commons.vfs2.FileSystemException;
@@ -26,9 +29,6 @@ import org.apache.commons.vfs2.provider.http.HttpFileSystemConfigBuilder;
 import org.junit.Assert;
 import org.junit.Test;
 
-import java.net.MalformedURLException;
-import java.net.URL;
-
 /**
  * Tests VFS-427 NPE on HttpFileObject.getContent().getContentInfo()
  *
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http4/test/Http4GetContentInfoTest.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http4/test/Http4GetContentInfoTest.java
index 64781af..62ad342 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http4/test/Http4GetContentInfoTest.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http4/test/Http4GetContentInfoTest.java
@@ -16,6 +16,9 @@
  */
 package org.apache.commons.vfs2.provider.http4.test;
 
+import java.net.MalformedURLException;
+import java.net.URL;
+
 import org.apache.commons.vfs2.FileContent;
 import org.apache.commons.vfs2.FileObject;
 import org.apache.commons.vfs2.FileSystemException;
@@ -28,9 +31,6 @@ import org.junit.Test;
 
 import junit.framework.TestCase;
 
-import java.net.MalformedURLException;
-import java.net.URL;
-
 /**
  * Tests VFS-427 NPE on Http4FileObject.getContent().getContentInfo().
  */
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http5/test/Http5GetContentInfoTest.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http5/test/Http5GetContentInfoTest.java
index 25bc39e..c54e003 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http5/test/Http5GetContentInfoTest.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http5/test/Http5GetContentInfoTest.java
@@ -16,6 +16,9 @@
  */
 package org.apache.commons.vfs2.provider.http5.test;
 
+import java.net.MalformedURLException;
+import java.net.URL;
+
 import org.apache.commons.vfs2.FileContent;
 import org.apache.commons.vfs2.FileObject;
 import org.apache.commons.vfs2.FileSystemException;
@@ -28,9 +31,6 @@ import org.junit.Test;
 
 import junit.framework.TestCase;
 
-import java.net.MalformedURLException;
-import java.net.URL;
-
 /**
  * Tests VFS-427 NPE on Http5FileObject.getContent().getContentInfo().
  */
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http5s/test/Http5sGetContentInfoTest.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http5s/test/Http5sGetContentInfoTest.java
index 68de945..6c354a2 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http5s/test/Http5sGetContentInfoTest.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http5s/test/Http5sGetContentInfoTest.java
@@ -22,9 +22,9 @@ import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.net.MalformedURLException;
 import java.net.URL;
-
 import java.nio.charset.StandardCharsets;
 import java.util.stream.Collectors;
+
 import org.apache.commons.vfs2.FileContent;
 import org.apache.commons.vfs2.FileObject;
 import org.apache.commons.vfs2.FileSystemException;
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/local/LocalFileRandomAccessContentTestCase.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/local/LocalFileRandomAccessContentTestCase.java
index 7e703ac..93205fa 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/local/LocalFileRandomAccessContentTestCase.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/local/LocalFileRandomAccessContentTestCase.java
@@ -16,14 +16,14 @@
  */
 package org.apache.commons.vfs2.provider.local;
 
-import org.apache.commons.vfs2.util.RandomAccessMode;
-import org.junit.Assert;
-import org.junit.Test;
-
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 
+import org.apache.commons.vfs2.util.RandomAccessMode;
+import org.junit.Assert;
+import org.junit.Test;
+
 /**
  * @since 2.7.0
  */
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ram/test/RamFileRandomAccessContentTestCase.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ram/test/RamFileRandomAccessContentTestCase.java
index 4f235d1..bf43a89 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ram/test/RamFileRandomAccessContentTestCase.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ram/test/RamFileRandomAccessContentTestCase.java
@@ -16,6 +16,10 @@
  */
 package org.apache.commons.vfs2.provider.ram.test;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
 import org.apache.commons.vfs2.FileObject;
 import org.apache.commons.vfs2.VFS;
 import org.apache.commons.vfs2.provider.ram.RamFileObject;
@@ -24,10 +28,6 @@ import org.apache.commons.vfs2.util.RandomAccessMode;
 import org.junit.Assert;
 import org.junit.Test;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
 /**
  * @since 2.7.0
  */
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpMultiThreadWriteTests.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpMultiThreadWriteTests.java
index 86cb4d0..c2caf57 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpMultiThreadWriteTests.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpMultiThreadWriteTests.java
@@ -16,12 +16,6 @@
  */
 package org.apache.commons.vfs2.provider.sftp.test;
 
-import org.apache.commons.vfs2.Capability;
-import org.apache.commons.vfs2.FileObject;
-import org.apache.commons.vfs2.Selectors;
-import org.apache.commons.vfs2.VFS;
-import org.apache.commons.vfs2.test.AbstractProviderTestCase;
-
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
@@ -31,6 +25,12 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.commons.vfs2.Capability;
+import org.apache.commons.vfs2.FileObject;
+import org.apache.commons.vfs2.Selectors;
+import org.apache.commons.vfs2.VFS;
+import org.apache.commons.vfs2.test.AbstractProviderTestCase;
+
 /**
  * MultiThread tests for writing with SFTP provider.
  */
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpProviderClosedExecChannelTestCase.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpProviderClosedExecChannelTestCase.java
index b6e21f3..4fecc61 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpProviderClosedExecChannelTestCase.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpProviderClosedExecChannelTestCase.java
@@ -16,7 +16,12 @@
  */
 package org.apache.commons.vfs2.provider.sftp.test;
 
-import org.apache.commons.vfs2.test.*;
+import org.apache.commons.vfs2.test.NamingTests;
+import org.apache.commons.vfs2.test.PermissionsTests;
+import org.apache.commons.vfs2.test.ProviderDeleteTests;
+import org.apache.commons.vfs2.test.ProviderReadTests;
+import org.apache.commons.vfs2.test.ProviderRenameTests;
+import org.apache.commons.vfs2.test.ProviderWriteTests;
 
 import junit.framework.Test;
 
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/tar/test/CreateFileSystemTestCase.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/tar/test/CreateFileSystemTestCase.java
index 19ebfee..cc867bd 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/tar/test/CreateFileSystemTestCase.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/tar/test/CreateFileSystemTestCase.java
@@ -16,6 +16,9 @@
  */
 package org.apache.commons.vfs2.provider.tar.test;
 
+import java.io.File;
+import java.io.IOException;
+
 import org.apache.commons.vfs2.FileObject;
 import org.apache.commons.vfs2.FileSystemManager;
 import org.apache.commons.vfs2.VFS;
@@ -23,9 +26,6 @@ import org.apache.commons.vfs2.provider.tar.TarFileObject;
 import org.junit.Assert;
 import org.junit.Test;
 
-import java.io.File;
-import java.io.IOException;
-
 /**
  * test use DefaultFileSystemManager.createFileSystem method to create tar,tgz,tbz2 file system
  *
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/tar/test/TarFileObjectTestCase.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/tar/test/TarFileObjectTestCase.java
index 9072160..ad1840e 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/tar/test/TarFileObjectTestCase.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/tar/test/TarFileObjectTestCase.java
@@ -16,6 +16,8 @@
  */
 package org.apache.commons.vfs2.provider.tar.test;
 
+import java.io.File;
+
 import org.apache.commons.vfs2.FileObject;
 import org.apache.commons.vfs2.FileSystemException;
 import org.apache.commons.vfs2.FileSystemManager;
@@ -23,8 +25,6 @@ import org.apache.commons.vfs2.VFS;
 import org.junit.Assert;
 import org.junit.Test;
 
-import java.io.File;
-
 
 public class TarFileObjectTestCase {
 
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/AbstractProviderTestCase.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/AbstractProviderTestCase.java
index 927ca39..5a0923e 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/AbstractProviderTestCase.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/AbstractProviderTestCase.java
@@ -16,8 +16,14 @@
  */
 package org.apache.commons.vfs2.test;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
+import static org.junit.Assert.assertArrayEquals;
+
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.URLConnection;
+
 import org.apache.commons.AbstractVfsTestCase;
 import org.apache.commons.vfs2.Capability;
 import org.apache.commons.vfs2.FileContent;
@@ -31,13 +37,8 @@ import org.apache.commons.vfs2.provider.AbstractFileSystem;
 import org.apache.commons.vfs2.provider.local.DefaultLocalFileProvider;
 import org.junit.Assert;
 
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.URLConnection;
-
-import static org.junit.Assert.assertArrayEquals;
+import junit.framework.Test;
+import junit.framework.TestCase;
 
 /**
  * File system test cases, which verifies the structure and naming functionality.
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/ProviderWriteTests.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/ProviderWriteTests.java
index 8ec3e03..9691c85 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/ProviderWriteTests.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/ProviderWriteTests.java
@@ -32,8 +32,6 @@ import org.apache.commons.vfs2.FileType;
 import org.apache.commons.vfs2.Selectors;
 import org.junit.Assert;
 
-import static junit.framework.TestCase.assertFalse;
-
 /**
  * File system test that check that a file system can be modified.
  */