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 43c4585 Javadoc: Use "file name" instead of "filename". 43c4585 is described below commit 43c4585bc87ac1140663e219dfe48061229c37ac Author: Gary Gregory <gardgreg...@gmail.com> AuthorDate: Thu May 30 15:55:14 2019 -0400 Javadoc: Use "file name" instead of "filename". Camel case vars "filename" to "fileName". --- .../java/org/apache/commons/vfs2/FileObject.java | 2 +- .../org/apache/commons/vfs2/FileSystemManager.java | 6 ++-- .../java/org/apache/commons/vfs2/FilesCache.java | 4 +-- .../apache/commons/vfs2/PatternFileSelector.java | 2 +- .../commons/vfs2/cache/FileSystemAndNameKey.java | 2 +- .../apache/commons/vfs2/filter/AgeFileFilter.java | 2 +- .../org/apache/commons/vfs2/filter/IOCase.java | 6 ++-- .../apache/commons/vfs2/filter/NameFileFilter.java | 6 ++-- .../commons/vfs2/filter/PrefixFileFilter.java | 8 +++--- .../commons/vfs2/filter/RegexFileFilter.java | 4 +-- .../apache/commons/vfs2/filter/SizeFileFilter.java | 2 +- .../commons/vfs2/filter/SuffixFileFilter.java | 8 +++--- .../commons/vfs2/filter/WildcardFileFilter.java | 30 ++++++++++---------- .../vfs2/impl/DefaultFileSystemManager.java | 6 ++-- .../vfs2/impl/FileContentInfoFilenameFactory.java | 2 +- .../org/apache/commons/vfs2/impl/FileTypeMap.java | 2 +- .../commons/vfs2/provider/AbstractFileName.java | 2 +- .../vfs2/provider/AbstractFileNameParser.java | 2 +- .../commons/vfs2/provider/AbstractFileObject.java | 4 +-- .../commons/vfs2/provider/FileNameParser.java | 4 +-- .../commons/vfs2/provider/GenericURLFileName.java | 2 +- .../vfs2/provider/LayeredFileNameParser.java | 2 +- .../apache/commons/vfs2/provider/URLFileName.java | 2 +- .../compressed/CompressedFileFileObject.java | 2 +- .../commons/vfs2/provider/ftp/FtpFileObject.java | 2 +- .../vfs2/provider/url/UrlFileNameParser.java | 12 ++++---- .../apache/commons/vfs2/filter/BaseFilterTest.java | 32 +++++++++++----------- .../commons/vfs2/provider/local/test/UrlTests.java | 2 +- 28 files changed, 80 insertions(+), 80 deletions(-) diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileObject.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileObject.java index d6ea685..a6480b2 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileObject.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileObject.java @@ -373,7 +373,7 @@ public interface FileObject extends Comparable<FileObject>, Iterable<FileObject> * If the destFile exists, it is deleted first. * </p> * - * @param destFile the New filename. + * @param destFile the New file name. * @throws FileSystemException If this file is read-only, or if the source file does not exist, or on error copying * the file. */ diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileSystemManager.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileSystemManager.java index 5f9d773..ce10c5d 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileSystemManager.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileSystemManager.java @@ -297,7 +297,7 @@ public interface FileSystemManager { * Resolves a name, relative to this file name. Equivalent to calling * {@code resolveName( path, NameScope.FILE_SYSTEM )}. * - * @param root the base filename + * @param root the base file name * @param name The name to resolve. * @return A {@link FileName} object representing the resolved file name. * @throws FileSystemException If the name is invalid. @@ -308,7 +308,7 @@ public interface FileSystemManager { * Resolves a name, relative to the "root" file name. Refer to {@link NameScope} for a description of how names are * resolved. * - * @param root the base filename + * @param root the base file name * @param name The name to resolve. * @param scope The {@link NameScope} to use when resolving the name. * @return A {@link FileName} object representing the resolved file name. @@ -317,7 +317,7 @@ public interface FileSystemManager { FileName resolveName(FileName root, String name, NameScope scope) throws FileSystemException; /** - * Resolves the uri to a filename. + * Resolves the uri to a file name. * * @param uri The uri to resolve. * @return A FileName that matches the uri. diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/FilesCache.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/FilesCache.java index 3ab742d..e01b8d8 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/FilesCache.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/FilesCache.java @@ -61,14 +61,14 @@ public interface FilesCache { * Removes a file from cache. * * @param fileSystem file system - * @param name filename + * @param name file name */ void removeFile(final FileSystem fileSystem, final FileName name); /** * If the cache uses timestamps it could use this method to handle updates of them. * - * @param file filename + * @param file file name */ // public void touchFile(final FileObject file); } diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/PatternFileSelector.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/PatternFileSelector.java index ea288f9..43a3ca9 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/PatternFileSelector.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/PatternFileSelector.java @@ -24,7 +24,7 @@ import java.util.regex.Pattern; * <p> * The regular expression specified in one of the constructors is * {@linkplain Matcher#matches() matched} against {@link FileName#getPath()} - * of all candidate files. If you want to match only against the base filename, + * of all candidate files. If you want to match only against the base file name, * make sure to prefix the pattern with {@code ".*\\/"}. * </p> * 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 99ce7d7..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 @@ -22,7 +22,7 @@ import org.apache.commons.vfs2.FileSystem; /** * Key for various cache implementations. * <p> - * It compares the fileSystem (by hashCode) and the filename. + * It compares the fileSystem (by hashCode) and the file name. * </p> */ class FileSystemAndNameKey implements Comparable<FileSystemAndNameKey> { diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/AgeFileFilter.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/AgeFileFilter.java index aed9efd..368b5ca 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/AgeFileFilter.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/AgeFileFilter.java @@ -170,7 +170,7 @@ public class AgeFileFilter implements FileFilter, Serializable { * * @param fileInfo the File to check * - * @return true if the filename matches + * @return true if the file name matches * @throws FileSystemException Thrown for file system errors. */ @Override diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/IOCase.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/IOCase.java index 744f11c..e0f9314 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/IOCase.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/IOCase.java @@ -26,12 +26,12 @@ import java.io.File; * </p> * <p> * This class captures that difference, providing an enumeration to control how - * filename comparisons should be performed. It also provides methods that use + * file name comparisons should be performed. It also provides methods that use * the enumeration to perform comparisons. * </p> * <p> * Wherever possible, you should use the <code>check</code> methods in this - * class to compare filenames. + * class to compare file names. * </p> * * @author This code was originally ported from Apache Commons IO File Filter @@ -52,7 +52,7 @@ public enum IOCase { /** * The constant for case sensitivity determined by the current operating system. - * Windows is case-insensitive when comparing filenames, Unix is case-sensitive. + * Windows is case-insensitive when comparing file names, Unix is case-sensitive. * <p> * <strong>Note:</strong> This only caters for Windows and Unix. Other operating * systems (e.g. OSX and OpenVMS) are treated as case sensitive if they use the diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/NameFileFilter.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/NameFileFilter.java index 92f7e3b..29d6a4a 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/NameFileFilter.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/NameFileFilter.java @@ -25,7 +25,7 @@ import org.apache.commons.vfs2.FileFilter; import org.apache.commons.vfs2.FileSelectInfo; /** - * Filters filenames for a certain name. + * Filters file names for a certain name. * <p> * For example, to print all files and directories in the current directory * whose name is <code>Test</code>: @@ -109,11 +109,11 @@ public class NameFileFilter implements FileFilter, Serializable { } /** - * Checks to see if the filename matches. + * Checks to see if the file name matches. * * @param fileInfo the File to check * - * @return true if the filename matches + * @return true if the file name matches */ @Override public boolean accept(final FileSelectInfo fileInfo) { diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/PrefixFileFilter.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/PrefixFileFilter.java index 89bdf76..8cedf85 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/PrefixFileFilter.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/PrefixFileFilter.java @@ -25,7 +25,7 @@ import org.apache.commons.vfs2.FileFilter; import org.apache.commons.vfs2.FileSelectInfo; /** - * Filters filenames for a certain prefix. + * Filters file names for a certain prefix. * <p> * For example, to print all files and directories in the current directory * whose name starts with a <code>.</code>: @@ -51,7 +51,7 @@ public class PrefixFileFilter implements FileFilter, Serializable { /** Whether the comparison is case sensitive. */ private final IOCase caseSensitivity; - /** The filename prefixes to search for. */ + /** The file name prefixes to search for. */ private final List<String> prefixes; /** @@ -108,11 +108,11 @@ public class PrefixFileFilter implements FileFilter, Serializable { } /** - * Checks to see if the filename starts with the prefix. + * Checks to see if the file name starts with the prefix. * * @param fileInfo the File to check * - * @return true if the filename starts with one of our prefixes + * @return true if the file name starts with one of our prefixes */ @Override public boolean accept(final FileSelectInfo fileInfo) { diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/RegexFileFilter.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/RegexFileFilter.java index 086955f..b652a38 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/RegexFileFilter.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/RegexFileFilter.java @@ -53,7 +53,7 @@ public class RegexFileFilter implements FileFilter, Serializable { /** Exception message when no pattern is given in the constructor. */ public static final String PATTERN_IS_MISSING = "Pattern is missing"; - /** The regular expression pattern that will be used to match filenames. */ + /** The regular expression pattern that will be used to match file names. */ private final Pattern pattern; /** @@ -115,7 +115,7 @@ public class RegexFileFilter implements FileFilter, Serializable { } /** - * Checks to see if the filename matches one of the regular expressions. + * Checks to see if the file name matches one of the regular expressions. * * @param fileInfo the File to check * diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/SizeFileFilter.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/SizeFileFilter.java index 36da137..aa587bd 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/SizeFileFilter.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/SizeFileFilter.java @@ -95,7 +95,7 @@ public class SizeFileFilter implements FileFilter, Serializable { * * @param fileInfo the File to check * - * @return true if the filename matches + * @return true if the file name matches * @throws FileSystemException Thrown for file system errors. */ @Override diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/SuffixFileFilter.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/SuffixFileFilter.java index 4b6c918..fbb2eb6 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/SuffixFileFilter.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/SuffixFileFilter.java @@ -25,7 +25,7 @@ import org.apache.commons.vfs2.FileFilter; import org.apache.commons.vfs2.FileSelectInfo; /** - * Filters files based on the suffix (what the filename ends with). This is used + * Filters files based on the suffix (what the file name ends with). This is used * in retrieving all the files of a particular type. * <p> * For example, to retrieve and print all <code>*.java</code> files in the @@ -52,7 +52,7 @@ public class SuffixFileFilter implements FileFilter, Serializable { /** Whether the comparison is case sensitive. */ private final IOCase caseSensitivity; - /** The filename suffixes to search for. */ + /** The file name suffixes to search for. */ private final List<String> suffixes; /** @@ -106,11 +106,11 @@ public class SuffixFileFilter implements FileFilter, Serializable { } /** - * Checks to see if the filename ends with the suffix. + * Checks to see if the file name ends with the suffix. * * @param fileInfo the File to check * - * @return true if the filename ends with one of our suffixes + * @return true if the file name ends with one of our suffixes */ @Override public boolean accept(final FileSelectInfo fileInfo) { diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/WildcardFileFilter.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/WildcardFileFilter.java index eb54025..16f5dd5 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/WildcardFileFilter.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/WildcardFileFilter.java @@ -62,7 +62,7 @@ public class WildcardFileFilter implements FileFilter, Serializable { /** Whether the comparison is case sensitive. */ private final IOCase caseSensitivity; - /** The wildcards that will be used to match filenames. */ + /** The wildcards that will be used to match file names. */ private final List<String> wildcards; /** @@ -119,11 +119,11 @@ public class WildcardFileFilter implements FileFilter, Serializable { } /** - * Checks to see if the filename matches one of the wildcards. + * Checks to see if the file name matches one of the wildcards. * * @param fileInfo the file to check * - * @return true if the filename matches one of the wildcards + * @return true if the file name matches one of the wildcards */ @Override public boolean accept(final FileSelectInfo fileInfo) { @@ -202,7 +202,7 @@ public class WildcardFileFilter implements FileFilter, Serializable { // CHECKSTYLE:ON /** - * Checks a filename to see if it matches the specified wildcard matcher + * Checks a file name to see if it matches the specified wildcard matcher * allowing control over case-sensitivity. * <p> * The wildcard matcher uses the characters '?' and '*' to represent a single or @@ -210,19 +210,19 @@ public class WildcardFileFilter implements FileFilter, Serializable { * work properly at present in match strings. * </p> * - * @param filename the filename to match on + * @param fileName the file name to match on * @param wildcardMatcher the wildcard string to match against * @param caseSensitivity what case sensitivity rule to use, null means * case-sensitive * - * @return true if the filename matches the wilcard string + * @return true if the file name matches the wilcard string */ // CHECKSTYLE:OFF TODO xxx Cyclomatic complexity of 19 should be refactored - static boolean wildcardMatch(final String filename, final String wildcardMatcher, IOCase caseSensitivity) { - if (filename == null && wildcardMatcher == null) { + static boolean wildcardMatch(final String fileName, final String wildcardMatcher, IOCase caseSensitivity) { + if (fileName == null && wildcardMatcher == null) { return true; } - if (filename == null || wildcardMatcher == null) { + if (fileName == null || wildcardMatcher == null) { return false; } if (caseSensitivity == null) { @@ -249,7 +249,7 @@ public class WildcardFileFilter implements FileFilter, Serializable { if (wcs[wcsIdx].equals("?")) { // ? so move to next text char textIdx++; - if (textIdx > filename.length()) { + if (textIdx > fileName.length()) { break; } anyChars = false; @@ -258,25 +258,25 @@ public class WildcardFileFilter implements FileFilter, Serializable { // set any chars status anyChars = true; if (wcsIdx == wcs.length - 1) { - textIdx = filename.length(); + textIdx = fileName.length(); } } else { // matching text token if (anyChars) { // any chars then try to locate text token - textIdx = caseSensitivity.checkIndexOf(filename, textIdx, wcs[wcsIdx]); + textIdx = caseSensitivity.checkIndexOf(fileName, textIdx, wcs[wcsIdx]); if (textIdx == -1) { // token not found break; } - final int repeat = caseSensitivity.checkIndexOf(filename, textIdx + 1, wcs[wcsIdx]); + final int repeat = caseSensitivity.checkIndexOf(fileName, textIdx + 1, wcs[wcsIdx]); if (repeat >= 0) { backtrack.push(new int[] { wcsIdx, repeat }); } } else { // matching from current position - if (!caseSensitivity.checkRegionMatches(filename, textIdx, wcs[wcsIdx])) { + if (!caseSensitivity.checkRegionMatches(fileName, textIdx, wcs[wcsIdx])) { // couldnt match token break; } @@ -292,7 +292,7 @@ public class WildcardFileFilter implements FileFilter, Serializable { } // full match - if (wcsIdx == wcs.length && textIdx == filename.length()) { + if (wcsIdx == wcs.length && textIdx == fileName.length()) { return true; } 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 d67b6ac..43be06c 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 @@ -221,7 +221,7 @@ public class DefaultFileSystemManager implements FileSystemManager, AutoCloseabl } /** - * Adds an filename extension mapping. + * Adds an file name extension mapping. * * @param extension The file name extension. * @param scheme The scheme to use for files with this extension. @@ -753,7 +753,7 @@ public class DefaultFileSystemManager implements FileSystemManager, AutoCloseabl /** * Resolves a name, relative to the root. * - * @param base the base filename + * @param base the base file name * @param name the name * @param scope the {@link NameScope} * @return The FileName of the file. @@ -825,7 +825,7 @@ public class DefaultFileSystemManager implements FileSystemManager, AutoCloseabl } /** - * Resolve the uri to a filename. + * Resolve the uri to a file name. * * @param uri The URI to resolve. * @return The FileName of the file. 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 2a4bbab..afe38ba 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 @@ -26,7 +26,7 @@ import org.apache.commons.vfs2.FileContentInfoFactory; /** * The FileContentInfoFilenameFactory. * <p> - * Uses the filename extension to determine the content-type. The content-encoding is not resolved. + * Uses the file name extension to determine the content-type. The content-encoding is not resolved. */ public class FileContentInfoFilenameFactory implements FileContentInfoFactory { @Override diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/FileTypeMap.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/FileTypeMap.java index f28aa68..881cd9b 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/FileTypeMap.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/FileTypeMap.java @@ -39,7 +39,7 @@ class FileTypeMap { } /** - * Adds a filename extension mapping. + * Adds a file name extension mapping. */ public void addExtension(final String extension, final String scheme) { extensionMap.put(extension, scheme); diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java index daf42ae..5b14bd6 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java @@ -91,7 +91,7 @@ public abstract class AbstractFileName implements FileName { /** * Implement Comparable. * - * @param obj another abstract filename + * @param obj another abstract file name * @return negative number if less than, 0 if equal, positive if greater than. */ @Override diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileNameParser.java index f009eca..115ec51 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileNameParser.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileNameParser.java @@ -17,7 +17,7 @@ package org.apache.commons.vfs2.provider; /** - * Provides methods to parse a filename into a {@link org.apache.commons.vfs2.FileName}. + * Provides methods to parse a file name into a {@link org.apache.commons.vfs2.FileName}. */ public abstract class AbstractFileNameParser implements FileNameParser { 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 5e5cd1e..acd3b65 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 @@ -174,9 +174,9 @@ public abstract class AbstractFileObject<AFS extends AbstractFileSystem> impleme } /** - * Queries the object if a simple rename to the filename of {@code newfile} is possible. + * Queries the object if a simple rename to the file name of {@code newfile} is possible. * - * @param newfile the new filename + * @param newfile the new file name * @return true if rename is possible */ @Override diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/FileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/FileNameParser.java index 60fdb49..1b71f08 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/FileNameParser.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/FileNameParser.java @@ -20,7 +20,7 @@ import org.apache.commons.vfs2.FileName; import org.apache.commons.vfs2.FileSystemException; /** - * Provides methods to parse a filename into a {@link org.apache.commons.vfs2.FileName}. + * Provides methods to parse a file name into a {@link org.apache.commons.vfs2.FileName}. */ public interface FileNameParser { @@ -33,7 +33,7 @@ public interface FileNameParser { boolean encodeCharacter(char ch); /** - * Parses a String into a filename. + * Parses a String into a file name. * * @param context The component context. * @param base The base FileName. diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/GenericURLFileName.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/GenericURLFileName.java index 218520c..7216aaa 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/GenericURLFileName.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/GenericURLFileName.java @@ -42,7 +42,7 @@ public class GenericURLFileName extends GenericFileName { /** * Gets the query string. * - * @return the query string part of the filename + * @return the query string part of the file name */ public String getQueryString() { return queryString; diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/LayeredFileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/LayeredFileNameParser.java index acde79b..416198e 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/LayeredFileNameParser.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/LayeredFileNameParser.java @@ -55,7 +55,7 @@ public class LayeredFileNameParser extends AbstractFileNameParser { * * @param context The component context. * @param base The base FileName. - * @param filename The target file name. + * @param file name The target file name. * @return The constructed FileName. * @throws FileSystemException if an error occurs. */ diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/URLFileName.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/URLFileName.java index b669b53..14954a1 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/URLFileName.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/URLFileName.java @@ -43,7 +43,7 @@ public class URLFileName extends GenericFileName { /** * Gets the query string. * - * @return the query string part of the filename + * @return the query string part of the file name */ public String getQueryString() { return queryString; diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/compressed/CompressedFileFileObject.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/compressed/CompressedFileFileObject.java index ee2044a..4bad8e7 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/compressed/CompressedFileFileObject.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/compressed/CompressedFileFileObject.java @@ -27,7 +27,7 @@ import org.apache.commons.vfs2.provider.AbstractFileObject; * A compressed file. * * <p> - * Such a file only has one child (the compressed filename with stripped last extension) + * Such a file only has one child (the compressed file name with stripped last extension) * </p> * * @param <FS> A CompressedFileFileSystem 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 9e89fb2..09336f8 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 @@ -83,7 +83,7 @@ public class FtpFileObject extends AbstractFileObject<FtpFileSystem> { /** * Called by child file objects, to locate their ftp file info. * - * @param name the filename in its native form ie. without uri stuff (%nn) + * @param name the file name in its native form ie. without uri stuff (%nn) * @param flush recreate children cache */ private FTPFile getChildFile(final String name, final boolean flush) throws IOException { diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/url/UrlFileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/url/UrlFileNameParser.java index d43180c..34ecdd7 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/url/UrlFileNameParser.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/url/UrlFileNameParser.java @@ -72,22 +72,22 @@ public class UrlFileNameParser extends AbstractFileNameParser { * {@code http://host/path}, {@code file:/path/to/file}, {@code file:///path/to/file}. * </p> * - * @param base The filename is relative to this base. - * @param filename The filename. - * @return true if filename contains two slashes or base was URLFileName. + * @param base The file name is relative to this base. + * @param fileName The file name. + * @return true if file name contains two slashes or base was URLFileName. */ - protected boolean isUrlBased(final FileName base, final String filename) { + protected boolean isUrlBased(final FileName base, final String fileName) { if (base instanceof URLFileName) { return true; } - return countSlashes(filename) == 2; + return countSlashes(fileName) == 2; } /** * This method counts the slashes after the scheme. * - * @param filename The file name. + * @param file name The file name. * @return number of slashes */ protected int countSlashes(final String filename) { 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 fee5642..900940f 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 @@ -97,20 +97,20 @@ public abstract class BaseFilterTest { * Asserts that the array contains the given file names. * * @param files Array to check. - * @param filenames File names to find. + * @param file names File names to find. */ - protected void assertContains(final FileObject[] files, final String... filenames) { - for (final String filename : filenames) { - if (!find(files, filename)) { - fail("File '" + filename + "' not found in: " + Arrays.asList(files)); + protected void assertContains(final FileObject[] files, final String... fileNames) { + for (final String fileName : fileNames) { + if (!find(files, fileName)) { + fail("File '" + fileName + "' not found in: " + Arrays.asList(files)); } } } - private boolean find(final FileObject[] files, final String filename) { + private boolean find(final FileObject[] files, final String fileName) { for (final FileObject file : files) { final String name = file.getName().getBaseName(); - if (name.equals(filename)) { + if (name.equals(fileName)) { return true; } } @@ -268,22 +268,22 @@ public abstract class BaseFilterTest { } /** - * Concatenate a path and a filename taking <code>null</code> and empty string + * Concatenate a path and a file name taking <code>null</code> and empty string * values into account. * * @param path Path - Can be <code>null</code> or an empty string. - * @param filename Filename - Cannot be <code>null</code>. + * @param fileName Filename - Cannot be <code>null</code>. * @param separator Separator for directories - Can be <code>null</code> or an * empty string. * - * @return Path and filename divided by the separator. + * @return Path and file name divided by the separator. */ - public static String concatPathAndFilename(final String path, final String filename, final String separator) { + public static String concatPathAndFilename(final String path, final String fileName, final String separator) { - if (filename == null) { + if (fileName == null) { throw new IllegalArgumentException("filename cannot be null"); } - if (filename.trim().length() == 0) { + if (fileName.trim().length() == 0) { throw new IllegalArgumentException("filename cannot be empty"); } if (separator == null) { @@ -294,13 +294,13 @@ public abstract class BaseFilterTest { } if (path == null) { - return filename; + return fileName; } final String trimmedPath = path.trim(); if (trimmedPath.length() == 0) { - return filename; + return fileName; } - final String trimmedFilename = filename.trim(); + final String trimmedFilename = fileName.trim(); if (trimmedPath.endsWith(separator)) { return trimmedPath + trimmedFilename; } diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/local/test/UrlTests.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/local/test/UrlTests.java index 634da1c..378e7d9 100644 --- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/local/test/UrlTests.java +++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/local/test/UrlTests.java @@ -29,7 +29,7 @@ import org.apache.commons.vfs2.test.AbstractProviderTestCase; */ public class UrlTests extends AbstractProviderTestCase { /** - * Tests FindFiles with a filename that has a hash sign in it. + * Tests FindFiles with a file name that has a hash sign in it. */ public void testHashFindFiles() throws Exception { final FileSystemManager fsManager = VFS.getManager();