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 a9e41247 Camel-case names a9e41247 is described below commit a9e41247b88e79547d8cc5d92f39a371c2e2a879 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Thu Oct 19 10:01:24 2023 -0400 Camel-case names --- .../commons/vfs2/auth/StaticUserAuthenticator.java | 20 ++++++++++---------- .../commons/vfs2/impl/DefaultFileReplicator.java | 4 ++-- .../apache/commons/vfs2/impl/VirtualFileName.java | 2 +- .../vfs2/provider/local/GenericFileNameParser.java | 4 ++-- .../apache/commons/vfs2/filter/BaseFilterTest.java | 8 ++++---- .../provider/ftp/FtpProviderUserDirTestCase.java | 2 +- .../vfs2/provider/ram/CustomRamProviderTest.java | 4 ++-- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/auth/StaticUserAuthenticator.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/auth/StaticUserAuthenticator.java index e0862d8d..6ceccb81 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/auth/StaticUserAuthenticator.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/auth/StaticUserAuthenticator.java @@ -32,7 +32,7 @@ public class StaticUserAuthenticator implements UserAuthenticator, Comparable<St private static final Log LOG = LogFactory.getLog(StaticUserAuthenticator.class); /** The user name */ - private final String username; + private final String userName; /** The password */ private final String password; @@ -44,11 +44,11 @@ public class StaticUserAuthenticator implements UserAuthenticator, Comparable<St * Constructs a new instance. * * @param domain The user domain. - * @param username The user name. + * @param userName The user name. * @param password The user password. */ - public StaticUserAuthenticator(final String domain, final String username, final String password) { - this.username = username; + public StaticUserAuthenticator(final String domain, final String userName, final String password) { + this.userName = userName; this.password = password; this.domain = domain; } @@ -76,7 +76,7 @@ public class StaticUserAuthenticator implements UserAuthenticator, Comparable<St @Override public int compareTo(final StaticUserAuthenticator other) { int result = compareStringOrNull(domain, other.domain); - result = result == 0 ? compareStringOrNull(username, other.username) : result; + result = result == 0 ? compareStringOrNull(userName, other.userName) : result; result = result == 0 ? compareStringOrNull(password, other.password) : result; return result; @@ -102,7 +102,7 @@ public class StaticUserAuthenticator implements UserAuthenticator, Comparable<St } final StaticUserAuthenticator other = (StaticUserAuthenticator) obj; - return Objects.equals(domain, other.domain) && Objects.equals(username, other.username) + return Objects.equals(domain, other.domain) && Objects.equals(userName, other.userName) && Objects.equals(password, other.password); } @@ -117,7 +117,7 @@ public class StaticUserAuthenticator implements UserAuthenticator, Comparable<St int result = 1; result = prime * result + (domain == null ? 0 : domain.hashCode()); result = prime * result + (password == null ? 0 : password.hashCode()); - result = prime * result + (username == null ? 0 : username.hashCode()); + result = prime * result + (userName == null ? 0 : userName.hashCode()); return result; } @@ -129,7 +129,7 @@ public class StaticUserAuthenticator implements UserAuthenticator, Comparable<St if (type == UserAuthenticationData.DOMAIN) { data.setData(UserAuthenticationData.DOMAIN, UserAuthenticatorUtils.toChar(domain)); } else if (type == UserAuthenticationData.USERNAME) { - data.setData(UserAuthenticationData.USERNAME, UserAuthenticatorUtils.toChar(username)); + data.setData(UserAuthenticationData.USERNAME, UserAuthenticatorUtils.toChar(userName)); } else if (type == UserAuthenticationData.PASSWORD) { data.setData(UserAuthenticationData.PASSWORD, UserAuthenticatorUtils.toChar(password)); } else if (LOG.isDebugEnabled()) { @@ -152,8 +152,8 @@ public class StaticUserAuthenticator implements UserAuthenticator, Comparable<St if (domain != null) { buffer.append(domain).append('\\'); } - if (username != null) { - buffer.append(username); + if (userName != null) { + buffer.append(userName); } else { buffer.append("(null)"); } diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileReplicator.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileReplicator.java index 6ebab481..6ea226f5 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileReplicator.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileReplicator.java @@ -143,8 +143,8 @@ public class DefaultFileReplicator extends AbstractVfsComponent implements FileR // ima...@apache.org: BUG34976 get rid of maybe reserved and dangerous characters // e.g. to allow replication of http://hostname.org/fileservlet?file=abc.txt - final String safeBasename = UriParser.encode(baseName, TMP_RESERVED_CHARS).replace('%', '_'); - return "tmp_" + getFilecount() + "_" + safeBasename; + final String safeBaseName = UriParser.encode(baseName, TMP_RESERVED_CHARS).replace('%', '_'); + return "tmp_" + getFilecount() + "_" + safeBaseName; } /** diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/VirtualFileName.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/VirtualFileName.java index 338f8871..63f65907 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/VirtualFileName.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/VirtualFileName.java @@ -21,7 +21,7 @@ import org.apache.commons.vfs2.FileType; import org.apache.commons.vfs2.provider.AbstractFileName; /** - * A simple Filename to hold the scheme for to be created virtual file system. + * A simple file name to hold the scheme for to be created virtual file system. */ public class VirtualFileName extends AbstractFileName { diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/GenericFileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/GenericFileNameParser.java index f47d1780..7405a925 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/GenericFileNameParser.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/GenericFileNameParser.java @@ -38,8 +38,8 @@ public class GenericFileNameParser extends LocalFileNameParser { } /* - * ... this is why need this: here the rootFilename can only be "/" (see above) put this "/" is also in the - * pathname so its of no value for the LocalFileName instance + * ... this is why need this: here the rootFileName can only be "/" (see above) put this "/" is also in the + * path name so its of no value for the LocalFileName instance */ @Override protected FileName createFileName(final String scheme, final String rootFile, final String path, diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/filter/BaseFilterTest.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/filter/BaseFilterTest.java index e2f7e68c..d2a42955 100644 --- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/filter/BaseFilterTest.java +++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/filter/BaseFilterTest.java @@ -75,7 +75,7 @@ public abstract class BaseFilterTest { * values into account. * * @param path Path - Can be {@code null} or an empty string. - * @param fileName Filename - Cannot be {@code null}. + * @param fileName File name - Cannot be {@code null}. * @param separator Separator for directories - Can be {@code null} or an * empty string. * @@ -103,11 +103,11 @@ public abstract class BaseFilterTest { if (trimmedPath.isEmpty()) { return fileName; } - final String trimmedFilename = fileName.trim(); + final String trimmedFileName = fileName.trim(); if (trimmedPath.endsWith(separator)) { - return trimmedPath + trimmedFilename; + return trimmedPath + trimmedFileName; } - return trimmedPath + separator + trimmedFilename; + return trimmedPath + separator + trimmedFileName; } /** diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ftp/FtpProviderUserDirTestCase.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ftp/FtpProviderUserDirTestCase.java index 66bcc2a8..24550eb6 100644 --- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ftp/FtpProviderUserDirTestCase.java +++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ftp/FtpProviderUserDirTestCase.java @@ -55,7 +55,7 @@ public class FtpProviderUserDirTestCase extends FtpProviderTestCase { FileUtils.deleteDirectory(rootDir); // noinspection ResultOfMethodCallIgnored rootDir.mkdir(); - FileUtils.copyDirectory(testDir, initialDir, pathname -> !pathname.getPath().contains(rootDir.getName())); + FileUtils.copyDirectory(testDir, initialDir, pathName -> !pathName.getPath().contains(rootDir.getName())); return new NativeFileSystemFactory() { @Override diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ram/CustomRamProviderTest.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ram/CustomRamProviderTest.java index d4367ab6..54c215b0 100644 --- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ram/CustomRamProviderTest.java +++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ram/CustomRamProviderTest.java @@ -95,10 +95,10 @@ public class CustomRamProviderTest { } /** Create directory structure for {@link #testSpecialName()} and {@link #testSchemePrefix()} */ - private FileObject prepareSpecialFile(final String dirname, final String testFileName) throws FileSystemException + private FileObject prepareSpecialFile(final String dirName, final String testFileName) throws FileSystemException { // set up a folder containing a file name with special characters: - final FileObject dir = manager.resolveFile("ram:" + dirname); + final FileObject dir = manager.resolveFile("ram:" + dirName); dir.createFolder(); // construct the absolute name to make sure the relative name is not miss-interpreted // ("./" + UriParser.encode(testFileName, ENC) would also work)