You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by gr...@apache.org on 2005/01/24 23:16:31 UTC

svn commit: r126321 - /lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/workflow/impl/History.java

Author: gregor
Date: Mon Jan 24 14:16:29 2005
New Revision: 126321

URL: http://svn.apache.org/viewcvs?view=rev&rev=126321
Log:
Fixed code that tried to delete a file that was still referenced in an open file stream. This fixes http://issues.apache.org/bugzilla/show_bug.cgi?id=31986 
Modified:
   lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/workflow/impl/History.java

Modified: lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/workflow/impl/History.java
Url: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/workflow/impl/History.java?view=diff&rev=126321&p1=lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/workflow/impl/History.java&r1=126320&p2=lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/workflow/impl/History.java&r2=126321
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/workflow/impl/History.java	(original)
+++ lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/workflow/impl/History.java	Mon Jan 24 14:16:29 2005
@@ -385,6 +385,8 @@
             destinationChannel = destinationStream.getChannel();
 
             destinationChannel.transferFrom(sourceChannel, 0, sourceChannel.size());
+            sourceStream.close();
+            destinationStream.close();
             File directory = historyFile.getParentFile();
             boolean deleted = historyFile.delete();
             if (!deleted) {

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org