[izpack-changes] r1756 - izpack-src/trunk/src/lib/com/izforge/izpack/util

noreply at berlios.de noreply at berlios.de
Tue Feb 20 17:40:09 CET 2007


Author: bartzkau
Date: 2007-02-20 17:40:09 +0100 (Tue, 20 Feb 2007)
New Revision: 1756

Modified:
   izpack-src/trunk/src/lib/com/izforge/izpack/util/FileExecutor.java
Log:
Bug with too many open file handles at calling chmod for every file fixed.


Modified: izpack-src/trunk/src/lib/com/izforge/izpack/util/FileExecutor.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/util/FileExecutor.java	2007-02-20 15:59:18 UTC (rev 1755)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/util/FileExecutor.java	2007-02-20 16:40:09 UTC (rev 1756)
@@ -210,7 +210,6 @@
             stopThread(t2, errMonitor);
             output[0] = "";
             output[1] = e.getMessage() + "\n";
-            process.destroy();
         }
         catch (IOException e)
         {
@@ -218,6 +217,13 @@
             output[0] = "";
             output[1] = e.getMessage() + "\n";
         }
+        finally 
+        {
+        	// cleans up always resources like file handles etc.
+        	// else many calls (like chmods for every file) can produce
+        	// too much open handles.
+            if (process != null) process.destroy();
+        }
         return exitStatus;
     }
 




More information about the izpack-changes mailing list