[jboss-cvs] JBossAS SVN: r68956 - projects/ejb3/trunk/ejb3-installer/src/main/java/org/jboss/ejb3/installer.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Jan 14 16:20:52 EST 2008


Author: ALRubinger
Date: 2008-01-14 16:20:51 -0500 (Mon, 14 Jan 2008)
New Revision: 68956

Modified:
   projects/ejb3/trunk/ejb3-installer/src/main/java/org/jboss/ejb3/installer/Installer.java
Log:
Ensure Streams are closed

Modified: projects/ejb3/trunk/ejb3-installer/src/main/java/org/jboss/ejb3/installer/Installer.java
===================================================================
--- projects/ejb3/trunk/ejb3-installer/src/main/java/org/jboss/ejb3/installer/Installer.java	2008-01-14 18:25:52 UTC (rev 68955)
+++ projects/ejb3/trunk/ejb3-installer/src/main/java/org/jboss/ejb3/installer/Installer.java	2008-01-14 21:20:51 UTC (rev 68956)
@@ -387,6 +387,19 @@
       catch (IOException ioe)
       {
          throw new RuntimeException(ioe);
+      } 
+      finally 
+      {
+         // Close the Streams
+         try 
+         {
+            in.close();
+            out.close();
+         } 
+         catch (IOException ioe) 
+         {
+            // Ignore
+         }
       }
 
       // Log
@@ -436,8 +449,15 @@
       }
 
       // Remove
-      System.out.println(file.getAbsolutePath() + " Removed.");
-      file.delete();
+      boolean removed = file.delete();
+      if(removed)
+      {
+           System.out.println(file.getAbsolutePath() + " Removed.");
+      }
+      else
+      {
+           System.out.println("Unable to remove " + file.getAbsolutePath());
+      }
 
    }
 




More information about the jboss-cvs-commits mailing list