ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1482515 - /webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/factory/AbstractOMMetaFactory.java
Date Tue, 14 May 2013 18:39:30 GMT
Author: veithen
Date: Tue May 14 18:39:30 2013
New Revision: 1482515

URL: http://svn.apache.org/r1482515
Log:
Enable auto-close for builders created from byte or character streams.

Modified:
    webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/factory/AbstractOMMetaFactory.java

Modified: webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/factory/AbstractOMMetaFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/factory/AbstractOMMetaFactory.java?rev=1482515&r1=1482514&r2=1482515&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/factory/AbstractOMMetaFactory.java
(original)
+++ webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/factory/AbstractOMMetaFactory.java
Tue May 14 18:39:30 2013
@@ -92,7 +92,9 @@ public abstract class AbstractOMMetaFact
     }
 
     public OMXMLParserWrapper createOMBuilder(OMFactory omFactory, StAXParserConfiguration
configuration, InputSource is) {
-        return new StAXOMBuilder(omFactory, createXMLStreamReader(configuration, is));
+        StAXOMBuilder builder = new StAXOMBuilder(omFactory, createXMLStreamReader(configuration,
is));
+        builder.setAutoClose(true);
+        return builder;
     }
     
     public OMXMLParserWrapper createOMBuilder(OMFactory omFactory, Source source) {
@@ -123,6 +125,7 @@ public abstract class AbstractOMMetaFact
             OMFactory omFactory, InputSource rootPart, MimePartProvider mimePartProvider)
{
         XOPAwareStAXOMBuilder builder = new XOPAwareStAXOMBuilder(omFactory, createXMLStreamReader(
                 configuration, rootPart), mimePartProvider);
+        builder.setAutoClose(true);
         return builder;
     }
 
@@ -131,12 +134,16 @@ public abstract class AbstractOMMetaFact
     }
 
     public SOAPModelBuilder createSOAPModelBuilder(StAXParserConfiguration configuration,
InputSource is) {
-        return new StAXSOAPModelBuilder(this, createXMLStreamReader(configuration, is));
+        StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(this, createXMLStreamReader(configuration,
is));
+        builder.setAutoClose(true);
+        return builder;
     }
 
     public SOAPModelBuilder createSOAPModelBuilder(StAXParserConfiguration configuration,
             SOAPFactory soapFactory, InputSource rootPart, MimePartProvider mimePartProvider)
{
-        return new MTOMStAXSOAPModelBuilder(soapFactory, createXMLStreamReader(
+        MTOMStAXSOAPModelBuilder builder = new MTOMStAXSOAPModelBuilder(soapFactory, createXMLStreamReader(
                 configuration, rootPart), mimePartProvider);
+        builder.setAutoClose(true);
+        return builder;
     }
 }



Mime
View raw message