commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1339256 - in /commons/proper/vfs/trunk: core/src/main/java/org/apache/commons/vfs2/provider/compressed/CompressedFileFileObject.java src/changes/changes.xml
Date Wed, 16 May 2012 16:34:19 GMT
Author: ggregory
Date: Wed May 16 16:34:18 2012
New Revision: 1339256

URL: http://svn.apache.org/viewvc?rev=1339256&view=rev
Log:
[VFS-408] CompressedFileFileObject Exception thrown when container file has no extension.

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/compressed/CompressedFileFileObject.java
    commons/proper/vfs/trunk/src/changes/changes.xml

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/compressed/CompressedFileFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/compressed/CompressedFileFileObject.java?rev=1339256&r1=1339255&r2=1339256&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/compressed/CompressedFileFileObject.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/compressed/CompressedFileFileObject.java
Wed May 16 16:34:18 2012
@@ -40,12 +40,11 @@ public abstract class CompressedFileFile
         // todo, add getBaseName(String) to FileName
         String basename = container.getName().getBaseName();
         int pos = basename.lastIndexOf('.');
-        basename = basename.substring(0, pos);
-
-        children = new String[]
+        if (pos > 0)
         {
-            basename
-        };
+            basename = basename.substring(0, pos);
+        }
+        children = new String[] { basename };
     }
 
     /**

Modified: commons/proper/vfs/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/src/changes/changes.xml?rev=1339256&r1=1339255&r2=1339256&view=diff
==============================================================================
--- commons/proper/vfs/trunk/src/changes/changes.xml (original)
+++ commons/proper/vfs/trunk/src/changes/changes.xml Wed May 16 16:34:18 2012
@@ -23,6 +23,9 @@
 
   <body>
     <release version="2.1" date="TBD" description="">
+      <action issue="VFS-408" dev="ggregory" type="update" due-to="anilm2@yahoo.com">
+        CompressedFileFileObject Exception thrown when container file has no extension.
+      </action>
       <action issue="VFS-400" dev="ggregory" type="add">
         Add a FileSelector based on regular expressions.
       </action>



Mime
View raw message