[jbossws-commits] JBossWS SVN: r9263 - common/branches/jbossws-common-1.0.0.GA_CP/src/main/java/org/jboss/wsf/common.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Mon Feb 9 07:23:17 EST 2009


Author: darran.lofthouse at jboss.com
Date: 2009-02-09 07:23:17 -0500 (Mon, 09 Feb 2009)
New Revision: 9263

Modified:
   common/branches/jbossws-common-1.0.0.GA_CP/src/main/java/org/jboss/wsf/common/DOMUtils.java
Log:
[JBPAPP-1687] Each request results to an open file descriptor.

Modified: common/branches/jbossws-common-1.0.0.GA_CP/src/main/java/org/jboss/wsf/common/DOMUtils.java
===================================================================
--- common/branches/jbossws-common-1.0.0.GA_CP/src/main/java/org/jboss/wsf/common/DOMUtils.java	2009-02-09 11:04:10 UTC (rev 9262)
+++ common/branches/jbossws-common-1.0.0.GA_CP/src/main/java/org/jboss/wsf/common/DOMUtils.java	2009-02-09 12:23:17 UTC (rev 9263)
@@ -169,6 +169,10 @@
       {
          throw new IOException(e.toString());
       }
+      finally
+      {
+         xmlStream.close();
+      }
    }
 
    /** Parse the given input source and return the root Element
@@ -185,6 +189,19 @@
       {
          throw new IOException(e.toString());
       }
+      finally
+      {
+         InputStream is = source.getByteStream();
+         if (is != null)
+         {
+            is.close();
+         }
+         Reader r = source.getCharacterStream();
+         if (r != null)
+         {
+            r.close();
+         }
+      }
    }
 
    /** Create an Element for a given name




More information about the jbossws-commits mailing list