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 2021/11/27 15:59:21 UTC

[commons-vfs] branch master updated (fba04f3 -> bca592a)

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 fba04f3  Fix Checkstyle MissingJavadocMethod: Missing a Javadoc comment.
     new 48fb296  Fix Checkstyle MagicNumber.
     new 23d4b54  Better concurrency.
     new bca592a  Fix Checkstyle RedundantModifier: Redundant 'public' modifier.

The 3 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:
 .../java/org/apache/commons/vfs2/cache/DefaultFilesCache.java  | 10 ++++++----
 .../main/java/org/apache/commons/vfs2/cache/LRUFilesCache.java |  2 +-
 .../apache/commons/vfs2/impl/DefaultVfsComponentContext.java   |  2 +-
 .../org/apache/commons/vfs2/impl/PrivilegedFileReplicator.java |  2 +-
 .../src/main/java/org/apache/commons/vfs2/impl/Resource.java   |  2 +-
 .../org/apache/commons/vfs2/provider/AbstractFileObject.java   |  2 +-
 .../org/apache/commons/vfs2/provider/AbstractFileSystem.java   |  2 +-
 .../org/apache/commons/vfs2/provider/DefaultFileContent.java   |  2 +-
 .../org/apache/commons/vfs2/provider/DefaultURLConnection.java |  2 +-
 .../org/apache/commons/vfs2/provider/DelegateFileObject.java   |  2 +-
 .../org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java |  5 +++--
 .../org/apache/commons/vfs2/provider/ftp/FtpFileObject.java    |  7 ++++---
 .../org/apache/commons/vfs2/provider/http/HttpFileObject.java  |  5 ++---
 .../http4/MonitoredHttpResponseContentInputStream.java         |  4 ++--
 .../http5/MonitoredHttpResponseContentInputStream.java         |  4 ++--
 .../apache/commons/vfs2/provider/local/LocalFileSystem.java    |  2 +-
 .../java/org/apache/commons/vfs2/provider/ram/RamFileData.java |  2 +-
 .../org/apache/commons/vfs2/provider/sftp/SftpFileObject.java  |  6 +++---
 .../java/org/apache/commons/vfs2/filter/NotFileFilterTest.java |  2 +-
 .../vfs2/provider/sftp/SftpPermissionExceptionTestCase.java    |  4 ++--
 20 files changed, 36 insertions(+), 33 deletions(-)

[commons-vfs] 02/03: Better concurrency.

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 23d4b54c3125a4a1d23cd919837f6d8a646196f7
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Nov 27 10:55:33 2021 -0500

    Better concurrency.
---
 .../main/java/org/apache/commons/vfs2/cache/DefaultFilesCache.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/DefaultFilesCache.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/DefaultFilesCache.java
index 94cb6c4..70439b2 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/DefaultFilesCache.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/DefaultFilesCache.java
@@ -87,8 +87,8 @@ public class DefaultFilesCache extends AbstractFilesCache {
         ConcurrentMap<FileName, FileObject> files = fileSystemCache.get(filesystem);
         // we loop to make sure we never return null even when concurrent clean is called
         while (files == null) {
-            fileSystemCache.putIfAbsent(filesystem, new ConcurrentHashMap<>(INITIAL_CAPACITY, LOAD_FACTOR, Math.max(2, Runtime.getRuntime().availableProcessors()) / 2));
-            files = fileSystemCache.get(filesystem);
+            files = fileSystemCache.computeIfAbsent(filesystem,
+                k -> new ConcurrentHashMap<>(INITIAL_CAPACITY, LOAD_FACTOR, Math.max(2, Runtime.getRuntime().availableProcessors()) / 2));
         }
 
         return files;

[commons-vfs] 01/03: Fix Checkstyle MagicNumber.

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 48fb2965f7b616ceb69ab2fd7b693e294ca080f0
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Nov 27 10:40:19 2021 -0500

    Fix Checkstyle MagicNumber.
---
 .../java/org/apache/commons/vfs2/cache/DefaultFilesCache.java     | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/DefaultFilesCache.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/DefaultFilesCache.java
index fed6618..94cb6c4 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/DefaultFilesCache.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/DefaultFilesCache.java
@@ -44,9 +44,11 @@ import org.apache.commons.vfs2.FileSystem;
  */
 public class DefaultFilesCache extends AbstractFilesCache {
 
+    private static final float LOAD_FACTOR = 0.75f;
+    private static final int INITIAL_CAPACITY = 200;
+
     /** The FileSystem cache. Keeps one Map for each FileSystem. */
-    private final ConcurrentMap<FileSystem, ConcurrentMap<FileName, FileObject>> fileSystemCache = new ConcurrentHashMap<>(
-            10);
+    private final ConcurrentMap<FileSystem, ConcurrentMap<FileName, FileObject>> fileSystemCache = new ConcurrentHashMap<>(10);
 
     @Override
     public void putFile(final FileObject file) {
@@ -85,7 +87,7 @@ public class DefaultFilesCache extends AbstractFilesCache {
         ConcurrentMap<FileName, FileObject> files = fileSystemCache.get(filesystem);
         // we loop to make sure we never return null even when concurrent clean is called
         while (files == null) {
-            fileSystemCache.putIfAbsent(filesystem, new ConcurrentHashMap<>(200, 0.75f, 8));
+            fileSystemCache.putIfAbsent(filesystem, new ConcurrentHashMap<>(INITIAL_CAPACITY, LOAD_FACTOR, Math.max(2, Runtime.getRuntime().availableProcessors()) / 2));
             files = fileSystemCache.get(filesystem);
         }
 

[commons-vfs] 03/03: Fix Checkstyle RedundantModifier: Redundant 'public' modifier.

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 bca592a56acda1ce9c29ee8057e0ed4abd6a9aca
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Nov 27 10:59:17 2021 -0500

    Fix Checkstyle RedundantModifier: Redundant 'public' modifier.
---
 .../src/main/java/org/apache/commons/vfs2/cache/LRUFilesCache.java | 2 +-
 .../org/apache/commons/vfs2/impl/DefaultVfsComponentContext.java   | 2 +-
 .../org/apache/commons/vfs2/impl/PrivilegedFileReplicator.java     | 2 +-
 .../src/main/java/org/apache/commons/vfs2/impl/Resource.java       | 2 +-
 .../java/org/apache/commons/vfs2/provider/AbstractFileObject.java  | 2 +-
 .../java/org/apache/commons/vfs2/provider/AbstractFileSystem.java  | 2 +-
 .../java/org/apache/commons/vfs2/provider/DefaultFileContent.java  | 2 +-
 .../org/apache/commons/vfs2/provider/DefaultURLConnection.java     | 2 +-
 .../java/org/apache/commons/vfs2/provider/DelegateFileObject.java  | 2 +-
 .../org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java     | 5 +++--
 .../java/org/apache/commons/vfs2/provider/ftp/FtpFileObject.java   | 7 ++++---
 .../java/org/apache/commons/vfs2/provider/http/HttpFileObject.java | 5 ++---
 .../provider/http4/MonitoredHttpResponseContentInputStream.java    | 4 ++--
 .../provider/http5/MonitoredHttpResponseContentInputStream.java    | 4 ++--
 .../org/apache/commons/vfs2/provider/local/LocalFileSystem.java    | 2 +-
 .../java/org/apache/commons/vfs2/provider/ram/RamFileData.java     | 2 +-
 .../java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java | 6 +++---
 .../java/org/apache/commons/vfs2/filter/NotFileFilterTest.java     | 2 +-
 .../vfs2/provider/sftp/SftpPermissionExceptionTestCase.java        | 4 ++--
 19 files changed, 30 insertions(+), 29 deletions(-)

diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/LRUFilesCache.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/LRUFilesCache.java
index eecaefc..f0aaa6c 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/LRUFilesCache.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/LRUFilesCache.java
@@ -70,7 +70,7 @@ public class LRUFilesCache extends AbstractFilesCache {
         /** The FileSystem */
         private final FileSystem filesystem;
 
-        public MyLRUMap(final FileSystem filesystem, final int size) {
+        MyLRUMap(final FileSystem filesystem, final int size) {
             super(size, true);
             this.filesystem = filesystem;
         }
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultVfsComponentContext.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultVfsComponentContext.java
index c93a64d..9b3534e 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultVfsComponentContext.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultVfsComponentContext.java
@@ -33,7 +33,7 @@ import org.apache.commons.vfs2.provider.VfsComponentContext;
 final class DefaultVfsComponentContext implements VfsComponentContext {
     private final DefaultFileSystemManager manager;
 
-    public DefaultVfsComponentContext(final DefaultFileSystemManager manager) {
+    DefaultVfsComponentContext(final DefaultFileSystemManager manager) {
         this.manager = manager;
     }
 
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/PrivilegedFileReplicator.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/PrivilegedFileReplicator.java
index 12a377e..dc6af8e 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/PrivilegedFileReplicator.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/PrivilegedFileReplicator.java
@@ -141,7 +141,7 @@ public class PrivilegedFileReplicator implements FileReplicator, VfsComponent {
         private final FileObject srcFile;
         private final FileSelector selector;
 
-        public ReplicateAction(final FileObject srcFile, final FileSelector selector) {
+        ReplicateAction(final FileObject srcFile, final FileSelector selector) {
             this.srcFile = srcFile;
             this.selector = selector;
         }
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/Resource.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/Resource.java
index f8daf0e..9979d2f 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/Resource.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/Resource.java
@@ -42,7 +42,7 @@ final class Resource {
      * @param root The code source FileObject.
      * @param resource The resource of the FileObject.
      */
-    public Resource(final String name, final FileObject root, final FileObject resource) throws FileSystemException {
+    Resource(final String name, final FileObject root, final FileObject resource) throws FileSystemException {
         this.root = root;
         this.resource = resource;
         packageFolder = resource.getParent();
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
index 8fb231c..2a8ceb2 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
@@ -136,7 +136,7 @@ public abstract class AbstractFileObject<AFS extends AbstractFileSystem> impleme
 
     /**
      * Constructs a new instance.
-     * 
+     *
      * @param fileName the file name.
      * @param fileSystem the file system.
      */
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 4d14c5f..6262dac 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
@@ -105,7 +105,7 @@ public abstract class AbstractFileSystem extends AbstractVfsComponent implements
      * Constructs a new instance.
      *
      * @param rootFileName The root file name of this file system.
-     * @param parentLayer The parent layer of this file system. 
+     * @param parentLayer The parent layer of this file system.
      * @param fileSystemOptions Options to build this file system.
      */
     protected AbstractFileSystem(final FileName rootFileName, final FileObject parentLayer, final FileSystemOptions fileSystemOptions) {
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
index 7332f66..cdb32c8 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
@@ -74,7 +74,7 @@ public final class DefaultFileContent implements FileContent {
     /**
      * Constructs a new instance.
      *
-     * @param fileObject The file object. 
+     * @param fileObject The file object.
      * @param fileContentInfoFactory The info factory.
      */
     public DefaultFileContent(final AbstractFileObject fileObject, final FileContentInfoFactory fileContentInfoFactory) {
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/DefaultURLConnection.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/DefaultURLConnection.java
index 557848c..b8f4965 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/DefaultURLConnection.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/DefaultURLConnection.java
@@ -34,7 +34,7 @@ public final class DefaultURLConnection extends URLConnection {
 
     /**
      * Constructs a new instance.
-     * 
+     *
      * @param url The URL to connect.
      * @param fileContent The URL fileContent.
      */
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/DelegateFileObject.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/DelegateFileObject.java
index 7619da3..5a818c5 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/DelegateFileObject.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/DelegateFileObject.java
@@ -46,7 +46,7 @@ import org.apache.commons.vfs2.util.WeakRefFileListener;
  * @param <AFS> A subclass of AbstractFileSystem.
  */
 public class DelegateFileObject<AFS extends AbstractFileSystem> extends AbstractFileObject<AFS> implements FileListener {
-    
+
     private FileObject file;
     private final Set<String> children = new HashSet<>();
     private boolean ignoreEvent;
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java
index 4328d45..ba06238 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java
@@ -119,8 +119,9 @@ public final class FtpClientFactory {
                         public void flush() {
                             final StringBuffer buffer = getBuffer();
                             String message = buffer.toString();
-                            if (message.toUpperCase().startsWith("PASS ") && message.length() > 5) {
-                                message = "PASS ***";
+                            final String prefix = "PASS ";
+                            if (message.toUpperCase().startsWith(prefix) && message.length() > prefix.length()) {
+                                message = prefix + "***";
                             }
                             log.debug(message);
                             buffer.setLength(0);
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 d771d2c..c79d0b9 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
@@ -59,12 +59,12 @@ public class FtpFileObject extends AbstractFileObject<FtpFileSystem> {
     class FtpInputStream extends MonitorInputStream {
         private final FtpClient client;
 
-        public FtpInputStream(final FtpClient client, final InputStream in) {
+        FtpInputStream(final FtpClient client, final InputStream in) {
             super(in);
             this.client = client;
         }
 
-        public FtpInputStream(final FtpClient client, final InputStream in, final int bufferSize) {
+        FtpInputStream(final FtpClient client, final InputStream in, final int bufferSize) {
             super(in, bufferSize);
             this.client = client;
         }
@@ -104,7 +104,7 @@ public class FtpFileObject extends AbstractFileObject<FtpFileSystem> {
     private class FtpOutputStream extends MonitorOutputStream {
         private final FtpClient client;
 
-        public FtpOutputStream(final FtpClient client, final OutputStream outstr) {
+        FtpOutputStream(final FtpClient client, final OutputStream outstr) {
             super(outstr);
             this.client = client;
         }
@@ -126,6 +126,7 @@ public class FtpFileObject extends AbstractFileObject<FtpFileSystem> {
             }
         }
     }
+
     private static final long DEFAULT_TIMESTAMP = 0L;
     private static final Map<String, FTPFile> EMPTY_FTP_FILE_MAP = Collections
             .unmodifiableMap(new TreeMap<>());
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java
index 0bbf6fe..45fe6c0 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java
@@ -56,12 +56,12 @@ public class HttpFileObject<FS extends HttpFileSystem> extends AbstractFileObjec
     static class HttpInputStream extends MonitorInputStream {
         private final GetMethod method;
 
-        public HttpInputStream(final GetMethod method) throws IOException {
+        HttpInputStream(final GetMethod method) throws IOException {
             super(method.getResponseBodyAsStream());
             this.method = method;
         }
 
-        public HttpInputStream(final GetMethod method, final int bufferSize) throws IOException {
+        HttpInputStream(final GetMethod method, final int bufferSize) throws IOException {
             super(method.getResponseBodyAsStream(), bufferSize);
             this.method = method;
         }
@@ -78,7 +78,6 @@ public class HttpFileObject<FS extends HttpFileSystem> extends AbstractFileObjec
     private final String urlCharset;
     private final String userAgent;
     private final boolean followRedirect;
-
     private HeadMethod method;
 
     protected HttpFileObject(final AbstractFileName name, final FS fileSystem) {
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/MonitoredHttpResponseContentInputStream.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/MonitoredHttpResponseContentInputStream.java
index d8f6b37..f22d31c 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/MonitoredHttpResponseContentInputStream.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/MonitoredHttpResponseContentInputStream.java
@@ -29,12 +29,12 @@ final class MonitoredHttpResponseContentInputStream extends MonitorInputStream {
 
     private final HttpResponse httpResponse;
 
-    public MonitoredHttpResponseContentInputStream(final HttpResponse httpResponse) throws IOException {
+    MonitoredHttpResponseContentInputStream(final HttpResponse httpResponse) throws IOException {
         super(httpResponse.getEntity().getContent());
         this.httpResponse = httpResponse;
     }
 
-    public MonitoredHttpResponseContentInputStream(final HttpResponse httpResponse, final int bufferSize) throws IOException {
+    MonitoredHttpResponseContentInputStream(final HttpResponse httpResponse, final int bufferSize) throws IOException {
         super(httpResponse.getEntity().getContent(), bufferSize);
         this.httpResponse = httpResponse;
     }
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5/MonitoredHttpResponseContentInputStream.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5/MonitoredHttpResponseContentInputStream.java
index 0140b7d..a26aec3 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5/MonitoredHttpResponseContentInputStream.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5/MonitoredHttpResponseContentInputStream.java
@@ -29,12 +29,12 @@ final class MonitoredHttpResponseContentInputStream extends MonitorInputStream {
 
     private final ClassicHttpResponse httpResponse;
 
-    public MonitoredHttpResponseContentInputStream(final ClassicHttpResponse httpResponse) throws IOException {
+    MonitoredHttpResponseContentInputStream(final ClassicHttpResponse httpResponse) throws IOException {
         super(httpResponse.getEntity().getContent());
         this.httpResponse = httpResponse;
     }
 
-    public MonitoredHttpResponseContentInputStream(final ClassicHttpResponse httpResponse, final int bufferSize) throws IOException {
+    MonitoredHttpResponseContentInputStream(final ClassicHttpResponse httpResponse, final int bufferSize) throws IOException {
         super(httpResponse.getEntity().getContent(), bufferSize);
         this.httpResponse = httpResponse;
     }
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/LocalFileSystem.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/LocalFileSystem.java
index 06a10a0..30bb512 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/LocalFileSystem.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/LocalFileSystem.java
@@ -41,7 +41,7 @@ public class LocalFileSystem extends AbstractFileSystem {
      * Constructs a new instance.
      *
      * @param rootFileName The root file name of this file system.
-     * @param rootFile The root of this file system. 
+     * @param rootFile The root of this file system.
      * @param fileSystemOptions Options to build this file system.
      */
     public LocalFileSystem(final FileName rootFileName, final String rootFile, final FileSystemOptions fileSystemOptions) {
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileData.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileData.java
index fccbfbd..e2f9ed8 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileData.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileData.java
@@ -66,7 +66,7 @@ class RamFileData implements Serializable {
      *
      * @param name The file name.
      */
-    public RamFileData(final FileName name) {
+    RamFileData(final FileName name) {
         this.children = Collections.synchronizedCollection(new ArrayList<>());
         this.clear();
         if (name == null) {
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
index c38e6cd..56efc83 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
@@ -55,12 +55,12 @@ public class SftpFileObject extends AbstractFileObject<SftpFileSystem> {
     private class SftpInputStream extends MonitorInputStream {
         private final ChannelSftp channel;
 
-        public SftpInputStream(final ChannelSftp channel, final InputStream in) {
+        SftpInputStream(final ChannelSftp channel, final InputStream in) {
             super(in);
             this.channel = channel;
         }
 
-        public SftpInputStream(final ChannelSftp channel, final InputStream in, final int bufferSize) {
+        SftpInputStream(final ChannelSftp channel, final InputStream in, final int bufferSize) {
             super(in, bufferSize);
             this.channel = channel;
         }
@@ -80,7 +80,7 @@ public class SftpFileObject extends AbstractFileObject<SftpFileSystem> {
     private class SftpOutputStream extends MonitorOutputStream {
         private final ChannelSftp channel;
 
-        public SftpOutputStream(final ChannelSftp channel, final OutputStream out) {
+        SftpOutputStream(final ChannelSftp channel, final OutputStream out) {
             super(out);
             this.channel = channel;
         }
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/filter/NotFileFilterTest.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/filter/NotFileFilterTest.java
index 985807d..e2d913e 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/filter/NotFileFilterTest.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/filter/NotFileFilterTest.java
@@ -37,7 +37,7 @@ public class NotFileFilterTest extends BaseFilterTest {
 
         Assert.assertFalse(new NotFileFilter(TrueFileFilter.INSTANCE).accept(any));
         Assert.assertFalse(new NotFileFilter(TrueFileFilter.TRUE).accept(any));
-        
+
         Assert.assertTrue(new NotFileFilter(FalseFileFilter.INSTANCE).accept(any));
         Assert.assertTrue(new NotFileFilter(FalseFileFilter.FALSE).accept(any));
 
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/SftpPermissionExceptionTestCase.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/SftpPermissionExceptionTestCase.java
index e7bed24..46b88bf 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/SftpPermissionExceptionTestCase.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/SftpPermissionExceptionTestCase.java
@@ -69,7 +69,7 @@ public class SftpPermissionExceptionTestCase extends AbstractSftpProviderTestCas
 
 
         // try to create local file
-        String fileName = "filecopy.txt";
+        final String fileName = "filecopy.txt";
         FileObject fileObjectCopy = scratchFolder.resolveFile(fileName);
         fileObjectCopy.setWritable(false, false);
         fileObjectCopy.copyFrom(localFileObject, Selectors.SELECT_SELF);
@@ -88,7 +88,7 @@ public class SftpPermissionExceptionTestCase extends AbstractSftpProviderTestCas
         }
 
         // try to get created channel number.
-        int channelId = Server.getActiveSessions().get(0).registerChannel(new ChannelSession());
+        final int channelId = Server.getActiveSessions().get(0).registerChannel(new ChannelSession());
         Assert.assertTrue("create too many sftp channel more", channelId<30);
 
         // try to set the local file to writable