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 21:55:58 UTC

[commons-vfs] 02/03: Fix Checkstyle LeftCurly.

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 b0b088e29ca3e8477451b27aae7c52de9bacbeaa
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Nov 27 16:29:41 2021 -0500

    Fix Checkstyle LeftCurly.
---
 .../java/org/apache/commons/vfs2/provider/AbstractFileObject.java  | 4 ++--
 .../java/org/apache/commons/vfs2/provider/DefaultFileContent.java  | 7 +++----
 .../main/java/org/apache/commons/vfs2/tasks/AbstractSyncTask.java  | 5 +----
 3 files changed, 6 insertions(+), 10 deletions(-)

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 2a8ceb2..06ed144 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
@@ -1285,8 +1285,8 @@ public abstract class AbstractFileObject<AFS extends AbstractFileSystem> impleme
      */
     @Override
     public FileObject getParent() throws FileSystemException {
-        if (this.compareTo(fileSystem.getRoot()) == 0) // equals is not implemented :-/
-        {
+        // equals is not implemented :-/
+        if (this.compareTo(fileSystem.getRoot()) == 0) {
             if (fileSystem.getParentLayer() == null) {
                 // Root file has no parent
                 return null;
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 cdb32c8..3f43f2b 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
@@ -497,8 +497,8 @@ public final class DefaultFileContent implements FileContent {
 
     private InputStream buildInputStream(final int bufferSize) throws FileSystemException {
         /*
-         * if (getThreadData().getState() == STATE_WRITING || getThreadData().getState() == STATE_RANDOM_ACCESS) { throw
-         * new FileSystemException("vfs.provider/read-in-use.error", file); }
+         * if (getThreadData().getState() == STATE_WRITING || getThreadData().getState() == STATE_RANDOM_ACCESS) { throw new
+         * FileSystemException("vfs.provider/read-in-use.error", file); }
          */
         // Get the raw input stream
         // @formatter:off
@@ -515,8 +515,7 @@ public final class DefaultFileContent implements FileContent {
         if (inputStream instanceof BufferedInputStream) {
             // Don't double buffer.
             wrappedInputStream = new RawFileContentInputStream(fileObject, inputStream);
-        } else
-        {
+        } else {
             // @formatter:off
             wrappedInputStream = bufferSize == 0
                     ? new FileContentInputStream(fileObject, inputStream)
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/tasks/AbstractSyncTask.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/tasks/AbstractSyncTask.java
index 3ac3663..a979a58 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/tasks/AbstractSyncTask.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/tasks/AbstractSyncTask.java
@@ -294,10 +294,7 @@ public abstract class AbstractSyncTask extends VfsTask {
     /**
      * Handles a single file, checking for collisions where more than one source file maps to the same destination file.
      */
-    private void handleFile(final Set<FileObject> destFiles, final FileObject srcFile, final FileObject destFile)
-            throws Exception
-
-    {
+    private void handleFile(final Set<FileObject> destFiles, final FileObject srcFile, final FileObject destFile) throws Exception {
         // Check for duplicate source files
         if (destFiles.contains(destFile)) {
             final String message = Messages.getString("vfs.tasks/sync.duplicate-source-files.warn", destFile);