Author: darran.lofthouse(a)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
Show replies by date