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 c8883a86 Camel-case parameter and internal names
c8883a86 is described below

commit c8883a86b0c95da6b6e455b178a1be78ebcdab9e
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Oct 19 08:41:29 2023 -0400

    Camel-case parameter and internal names
    
    Spelling
---
 .../org/apache/commons/vfs2/provider/mime/MimeFileObject.java     | 8 ++++----
 .../org/apache/commons/vfs2/provider/smb/SmbFileNameParser.java   | 6 +++---
 .../java/org/apache/commons/vfs2/provider/AbstractFileObject.java | 2 +-
 .../apache/commons/vfs2/provider/res/ResourceFileNameParser.java  | 2 +-
 .../apache/commons/vfs2/provider/ram/CustomRamProviderTest.java   | 2 +-
 .../test/java/org/apache/commons/vfs2/util/NHttpFileServer.java   | 8 ++++----
 6 files changed, 14 insertions(+), 14 deletions(-)

diff --git 
a/commons-vfs2-sandbox/src/main/java/org/apache/commons/vfs2/provider/mime/MimeFileObject.java
 
b/commons-vfs2-sandbox/src/main/java/org/apache/commons/vfs2/provider/mime/MimeFileObject.java
index f4d07207..d221099f 100644
--- 
a/commons-vfs2-sandbox/src/main/java/org/apache/commons/vfs2/provider/mime/MimeFileObject.java
+++ 
b/commons-vfs2-sandbox/src/main/java/org/apache/commons/vfs2/provider/mime/MimeFileObject.java
@@ -142,14 +142,14 @@ public class MimeFileObject extends 
AbstractFileObject<MimeFileSystem> implement
                 for (int i = 0; i < multipart.getCount(); i++) {
                     final Part part = multipart.getBodyPart(i);
 
-                    String filename = UriParser.encode(part.getFileName());
-                    if (filename == null) {
-                        filename = MimeFileSystem.NULL_BP_NAME + i;
+                    String fileName = UriParser.encode(part.getFileName());
+                    if (fileName == null) {
+                        fileName = MimeFileSystem.NULL_BP_NAME + i;
                     }
 
                     final MimeFileObject fo = (MimeFileObject) FileObjectUtils
                             
.getAbstractFileObject(getFileSystem().resolveFile(getFileSystem().getFileSystemManager()
-                                    .resolveName(getName(), filename, 
NameScope.CHILD)));
+                                    .resolveName(getName(), fileName, 
NameScope.CHILD)));
                     fo.setPart(part);
                     vfs.add(fo);
                 }
diff --git 
a/commons-vfs2-sandbox/src/main/java/org/apache/commons/vfs2/provider/smb/SmbFileNameParser.java
 
b/commons-vfs2-sandbox/src/main/java/org/apache/commons/vfs2/provider/smb/SmbFileNameParser.java
index 877b1646..278ca3cf 100644
--- 
a/commons-vfs2-sandbox/src/main/java/org/apache/commons/vfs2/provider/smb/SmbFileNameParser.java
+++ 
b/commons-vfs2-sandbox/src/main/java/org/apache/commons/vfs2/provider/smb/SmbFileNameParser.java
@@ -49,12 +49,12 @@ public class SmbFileNameParser extends URLFileNameParser {
     }
 
     @Override
-    public FileName parseUri(final VfsComponentContext context, final FileName 
base, final String filename)
+    public FileName parseUri(final VfsComponentContext context, final FileName 
base, final String fileName)
             throws FileSystemException {
         final StringBuilder name = new StringBuilder();
 
         // Extract the scheme and authority parts
-        final Authority auth = extractToPath(context, filename, name);
+        final Authority auth = extractToPath(context, fileName, name);
 
         // extract domain
         String username = auth.getUserName();
@@ -70,7 +70,7 @@ public class SmbFileNameParser extends URLFileNameParser {
         // Extract the share
         final String share = UriParser.extractFirstElement(name);
         if (share == null || share.isEmpty()) {
-            throw new 
FileSystemException("vfs.provider.smb/missing-share-name.error", filename);
+            throw new 
FileSystemException("vfs.provider.smb/missing-share-name.error", fileName);
         }
 
         // Normalise the path. Do this after extracting the share name,
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 0acdd0d7..06ad528e 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
@@ -1119,7 +1119,7 @@ public abstract class AbstractFileObject<AFS extends 
AbstractFileSystem> impleme
                 // Create file objects for the children
                 final FileName[] cache = new FileName[files.length];
                 for (int i = 0; i < files.length; i++) {
-                    final String file = "./" + files[i]; // VFS-741: assume 
scheme prefix is filename only
+                    final String file = "./" + files[i]; // VFS-741: assume 
scheme prefix is file name only
                     cache[i] = 
fileSystem.getFileSystemManager().resolveName(fileName, file, NameScope.CHILD);
                 }
                 // VFS-285: only assign the children file names after all of 
them have been
diff --git 
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/res/ResourceFileNameParser.java
 
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/res/ResourceFileNameParser.java
index 512216b1..4d112001 100644
--- 
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/res/ResourceFileNameParser.java
+++ 
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/res/ResourceFileNameParser.java
@@ -23,7 +23,7 @@ import org.apache.commons.vfs2.FileType;
 import org.apache.commons.vfs2.provider.local.GenericFileNameParser;
 
 /**
- * Slightly modified filename parser for resource URIs.
+ * Slightly modified file name parser for resource URIs.
  */
 public class ResourceFileNameParser extends GenericFileNameParser {
 
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 497e4a86..d4367ab6 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
@@ -97,7 +97,7 @@ public class CustomRamProviderTest {
     /** Create directory structure for {@link #testSpecialName()} and {@link 
#testSchemePrefix()} */
     private FileObject prepareSpecialFile(final String dirname, final String 
testFileName) throws FileSystemException
     {
-        // set up a folder containing a filename with special characters:
+        // set up a folder containing a file name with special characters:
         final FileObject dir = manager.resolveFile("ram:" + dirname);
         dir.createFolder();
         // construct the absolute name to make sure the relative name is not 
miss-interpreted
diff --git 
a/commons-vfs2/src/test/java/org/apache/commons/vfs2/util/NHttpFileServer.java 
b/commons-vfs2/src/test/java/org/apache/commons/vfs2/util/NHttpFileServer.java
index 245967a7..fd0ac335 100644
--- 
a/commons-vfs2/src/test/java/org/apache/commons/vfs2/util/NHttpFileServer.java
+++ 
b/commons-vfs2/src/test/java/org/apache/commons/vfs2/util/NHttpFileServer.java
@@ -126,15 +126,15 @@ public final class NHttpFileServer {
             } else {
 
                 ContentType contentType;
-                final String filename = 
file.getName().toLowerCase(Locale.ROOT);
+                final String fileName = 
file.getName().toLowerCase(Locale.ROOT);
 // The following causes a failure on Linux and macOS in HttpProviderTestCase:
 // org.apache.commons.vfs2.FileSystemException: GET method failed for 
"http://localhost:37637/read-tests/file1.txt"; range "10" with HTTP status 200.
 //                at 
org.apache.commons.vfs2.provider.http.HttpRandomAccessContent.getDataInputStream(HttpRandomAccessContent.java:80)
-//                if (filename.endsWith(".txt")) {
+//                if (fileName.endsWith(".txt")) {
 //                    contentType = ContentType.TEXT_PLAIN;
-//                } else if (filename.endsWith(".html") || 
filename.endsWith(".htm") || file.isDirectory()) {
+//                } else if (fileName.endsWith(".html") || 
fileName.endsWith(".htm") || file.isDirectory()) {
 //                    contentType = ContentType.TEXT_HTML;
-//                } else if (filename.endsWith(".xml")) {
+//                } else if (fileName.endsWith(".xml")) {
 //                    contentType = ContentType.TEXT_XML;
 //                } else {
 //                    contentType = ContentType.DEFAULT_BINARY;

Reply via email to