commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject svn commit: r179523 - in /jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs: Resources.properties provider/AbstractFileObject.java
Date Thu, 02 Jun 2005 06:23:11 GMT
Author: imario
Date: Wed Jun  1 23:23:10 2005
New Revision: 179523

URL: http://svn.apache.org/viewcvs?rev=179523&view=rev
Log:
Wrong error-message if destination file already exists in moveTo operation.

Reported By: Manco <megustasf -at- yahoo.com>

Modified:
    jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/Resources.properties
    jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java

Modified: jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/Resources.properties
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/Resources.properties?rev=179523&r1=179522&r2=179523&view=diff
==============================================================================
--- jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/Resources.properties
(original)
+++ jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/Resources.properties
Wed Jun  1 23:23:10 2005
@@ -23,7 +23,7 @@
 vfs.provider/rename-read-only.error=Could not rename "{0}" because it is read-only.
 vfs.provider/rename-dest-exists.error=Destination "{0}" already existent.
 vfs.provider/delete.error=Could not delete "{0}".
-vfs.provider/rename.error=Could not rename "{0}".
+vfs.provider/rename.error=Could not rename "{0}" to "{1}".
 vfs.provider/create-folder-mismatched-type.error=Could not create folder "{0}" because it
already exists and is a file.
 vfs.provider/create-folder-read-only.error=Could not create folder "{0}" because its parent
folder is read-only.
 vfs.provider/create-folder.error=Could not create folder "{0}".

Modified: jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java?rev=179523&r1=179522&r2=179523&view=diff
==============================================================================
--- jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java
(original)
+++ jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java
Wed Jun  1 23:23:10 2005
@@ -582,7 +582,7 @@
             return null;
         }
 
-        FileName names[] = new FileName[objects.length];
+        FileName[] names = new FileName[objects.length];
         for (int iterObjects = 0; iterObjects < objects.length; iterObjects++)
         {
             names[iterObjects] = objects[iterObjects].getName();
@@ -598,7 +598,7 @@
             return null;
         }
 
-        FileObject objects[] = new FileObject[children.length];
+        FileObject[] objects = new FileObject[children.length];
         for (int iterChildren = 0; iterChildren < children.length; iterChildren++)
         {
             objects[iterChildren] = resolveFile(children[iterChildren]);
@@ -885,11 +885,11 @@
     {
         if (!isWriteable())
         {
-            throw new FileSystemException("vfs.provider/rename-read-only.error", name);
+            throw new FileSystemException("vfs.provider/rename-read-only.error", getName());
         }
         if (destFile.getType() != FileType.IMAGINARY)
         {
-            throw new FileSystemException("vfs.provider/rename-dest-exists.error", name);
+            throw new FileSystemException("vfs.provider/rename-dest-exists.error", destFile.getName());
         }
 
         if (canRenameTo(destFile))
@@ -908,7 +908,11 @@
             }
             catch (final Exception exc)
             {
-                throw new FileSystemException("vfs.provider/rename.error", new Object[]{name},
exc);
+                throw new FileSystemException("vfs.provider/rename.error", new Object[]
+                {
+                    getName(),
+                    destFile.getName()
+                }, exc);
             }
         }
         else



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message