cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r740886 - /cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/reference/RemoteReferenceResolver.java
Date Wed, 04 Feb 2009 21:10:50 GMT
Author: dkulp
Date: Wed Feb  4 21:10:50 2009
New Revision: 740886

URL: http://svn.apache.org/viewvc?rev=740886&view=rev
Log:
Make sure the streams from remote policies are closed

Modified:
    cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/reference/RemoteReferenceResolver.java

Modified: cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/reference/RemoteReferenceResolver.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/reference/RemoteReferenceResolver.java?rev=740886&r1=740885&r2=740886&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/reference/RemoteReferenceResolver.java
(original)
+++ cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/reference/RemoteReferenceResolver.java
Wed Feb  4 21:10:50 2009
@@ -47,8 +47,8 @@
     public Policy resolveReference(String uri) {
         int pos = uri.indexOf('#');
         String documentURI = uri.substring(0, pos);
-        
-        InputSource is = new ExtendedURIResolver().resolve(documentURI, baseURI);
+        ExtendedURIResolver resolver = new ExtendedURIResolver();
+        InputSource is = resolver.resolve(documentURI, baseURI);
         if (null == is) {
             return null;
         }
@@ -57,6 +57,8 @@
             doc = DOMUtils.readXml(is.getByteStream());
         } catch (Exception ex) {
             throw new PolicyException(ex);
+        } finally {
+            resolver.close();
         }
         String id = uri.substring(pos + 1);
         for (Element elem : PolicyConstants



Mime
View raw message