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:24:36 UTC

[commons-vfs] 03/05: Fix Checkstyle FileTabCharacter: File contains tab characters.

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 975af34b77887e10952c31e14e8c95cfbaf8cd21
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Nov 27 16:19:24 2021 -0500

    Fix Checkstyle FileTabCharacter: File contains tab characters.
---
 .../org/apache/commons/vfs2/provider/HostFileNameParser.java  |  4 ++--
 .../org/apache/commons/vfs2/provider/jar/JarFileObject.java   | 10 +++++-----
 .../java/org/apache/commons/vfs2/util/DefaultCryptor.java     | 11 ++++-------
 3 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/HostFileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/HostFileNameParser.java
index e602cc3..d76270a 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/HostFileNameParser.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/HostFileNameParser.java
@@ -236,9 +236,9 @@ public class HostFileNameParser extends AbstractFileNameParser {
 
         final FileSystemManager fsm;
         if (context != null) {
-        	fsm = context.getFileSystemManager();
+            fsm = context.getFileSystemManager();
         } else {
-        	fsm = VFS.getManager();
+            fsm = VFS.getManager();
         }
 
         // Extract the scheme
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/jar/JarFileObject.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/jar/JarFileObject.java
index 5d03b06..2cdb6cb 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/jar/JarFileObject.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/jar/JarFileObject.java
@@ -41,13 +41,13 @@ public class JarFileObject extends ZipFileObject {
     private Attributes attributes;
 
     protected JarFileObject(final AbstractFileName name, final ZipEntry entry, final JarFileSystem fs,
-            final boolean zipExists) throws FileSystemException {
+        final boolean zipExists) throws FileSystemException {
         super(name, entry, fs, zipExists);
         if (entry != null) {
-			// For Java 9 and up: Force the certificates to be read and cached now. This avoids an
-			// IllegalStateException in java.util.jar.JarFile.isMultiRelease() when it tries
-			// to read the certificates and the file is closed.
-        	((JarEntry) entry).getCertificates();
+            // For Java 9 and up: Force the certificates to be read and cached now. This avoids an
+            // IllegalStateException in java.util.jar.JarFile.isMultiRelease() when it tries
+            // to read the certificates and the file is closed.
+            ((JarEntry) entry).getCertificates();
         }
         this.fs = fs;
 
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/DefaultCryptor.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/DefaultCryptor.java
index 7036b61..c1c25ff 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/DefaultCryptor.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/DefaultCryptor.java
@@ -102,21 +102,18 @@ public class DefaultCryptor implements Cryptor {
         final char[] chars = str.toCharArray();
         final int length = chars.length / 2;
         final byte[] decoded = new byte[length];
-        if (length * 2 != chars.length)
-        {
-        	throw new IllegalArgumentException("The given string must have even number of hex chars.");
+        if (length * 2 != chars.length) {
+            throw new IllegalArgumentException("The given string must have even number of hex chars.");
         }
         int index = 0;
         for (int i = 0; i < length; i++) {
             final int id1 = indexOf(HEX_CHARS, chars[index++]);
             if (id1 == INDEX_NOT_FOUND) {
-                throw new IllegalArgumentException(
-                        "Character " + chars[index-1] + " at position " + (index-1) + " is not a valid hexidecimal character");
+                throw new IllegalArgumentException("Character " + chars[index - 1] + " at position " + (index - 1) + " is not a valid hexidecimal character");
             }
             final int id2 = indexOf(HEX_CHARS, chars[index++]);
             if (id2 == INDEX_NOT_FOUND) {
-                throw new IllegalArgumentException(
-                        "Character " + chars[index-1] + " at position " + (index-1) + " is not a valid hexidecimal character");
+                throw new IllegalArgumentException("Character " + chars[index - 1] + " at position " + (index - 1) + " is not a valid hexidecimal character");
             }
             decoded[i] = (byte) ((id1 << BITS_IN_HALF_BYTE) | id2);
         }