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 85204f559ab2d2b961b28f624a08c71b5276d5f8
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Mar 11 09:10:52 2021 -0500

    Javadoc and inline single use local var.
---
 .../apache/commons/vfs2/impl/FileContentInfoFilenameFactory.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

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 52d660f..31d55e2 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
@@ -27,10 +27,11 @@ import org.apache.commons.vfs2.FileContentInfoFactory;
  * The FileContentInfoFilenameFactory.
  * <p>
  * Uses the file name extension to determine the content-type. The 
content-encoding is not resolved.
+ * </p>
  */
 public class FileContentInfoFilenameFactory implements FileContentInfoFactory {
 
-    private static final FileContentInfo NULL_INFO = new 
DefaultFileContentInfo(null, null);
+    private static final FileContentInfo NULL_INSTANCE = new 
DefaultFileContentInfo(null, null);
 
     @Override
     public FileContentInfo create(final FileContent fileContent) {
@@ -38,13 +39,12 @@ public class FileContentInfoFilenameFactory implements 
FileContentInfoFactory {
 
         final String name = fileContent.getFile().getName().getBaseName();
         if (name != null) {
-            final FileNameMap fileNameMap = URLConnection.getFileNameMap();
-            contentType = fileNameMap.getContentTypeFor(name);
+            contentType = 
URLConnection.getFileNameMap().getContentTypeFor(name);
         }
 
         // optimize object creation for common case
         if (contentType == null) {
-            return NULL_INFO;
+            return NULL_INSTANCE;
         }
         return new DefaultFileContentInfo(contentType, null);
     }

Reply via email to