commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ozeigerm...@apache.org
Subject svn commit: r350000 - in /jakarta/commons/proper/transaction/trunk: RELEASE-NOTES.txt src/java/org/apache/commons/transaction/util/FileHelper.java
Date Wed, 30 Nov 2005 17:36:58 GMT
Author: ozeigermann
Date: Wed Nov 30 09:36:48 2005
New Revision: 350000

URL: http://svn.apache.org/viewcvs?rev=350000&view=rev
Log:
Better error reporting in FileHelper#copyRec when destination file could not be created

Modified:
    jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt
    jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/FileHelper.java

Modified: jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt?rev=350000&r1=349999&r2=350000&view=diff
==============================================================================
--- jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt (original)
+++ jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt Wed Nov 30 09:36:48 2005
@@ -23,6 +23,7 @@
 
 ENHANCEMENTS FROM 1.1
 ---------------------
+- Better error reporting in FileHelper when destination directories (moveRec) or files (copyRec)
could not be created
 
 BUGFIXES FROM 1.1
 -----------------
@@ -30,7 +31,6 @@
 - Fixed bug reported by Niklas Gustavsson on http://www.mail-archive.com/commons-dev@jakarta.apache.org/msg69441.html.
   Failed deletion of a file now throws an exception and enters an error state upon commit.
 - Reduced likelyhood of clash between internally generated and external tx id in generatedUniqueTxId
-- Better error reporting in FileHelper#moveRec when destination directories could not be
created
 
 KNOWN ISSUES
 ------------

Modified: jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/FileHelper.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/FileHelper.java?rev=350000&r1=349999&r2=350000&view=diff
==============================================================================
--- jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/FileHelper.java
(original)
+++ jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/FileHelper.java
Wed Nov 30 09:36:48 2005
@@ -188,7 +188,9 @@
             if (!target.isDirectory()) {
                 if (!target.exists()) {
                     target.getParentFile().mkdirs();
-                    target.createNewFile();
+                    if (target.createNewFile()) {
+                        throw new IOException("Could not create target file: " + target);
+                    }
                 }
                 copy(source, target, sharedBuffer);
             }



---------------------------------------------------------------------
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