ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1733779 - /webservices/axiom/branches/stax-stream/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementSupport.aj
Date Sun, 06 Mar 2016 00:43:26 GMT
Author: veithen
Date: Sun Mar  6 00:43:26 2016
New Revision: 1733779

URL: http://svn.apache.org/viewvc?rev=1733779&view=rev
Log:
Some tweaks to make Axis2 happy.

Modified:
    webservices/axiom/branches/stax-stream/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementSupport.aj

Modified: webservices/axiom/branches/stax-stream/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/stax-stream/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementSupport.aj?rev=1733779&r1=1733778&r2=1733779&view=diff
==============================================================================
--- webservices/axiom/branches/stax-stream/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementSupport.aj
(original)
+++ webservices/axiom/branches/stax-stream/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementSupport.aj
Sun Mar  6 00:43:26 2016
@@ -404,19 +404,31 @@ public aspect AxiomSourcedElementSupport
     }
 
     public final XmlInput AxiomSourcedElement.getXmlInput(boolean cache, boolean incremental)
throws StreamException {
-        if (isExpanded() || (cache && OMDataSourceUtil.isDestructiveWrite(dataSource)))
{
+        if (isExpanded()) {
             return null;
         }
-        if (OMDataSourceUtil.isPullDataSource(dataSource) || (incremental && !OMDataSourceUtil.isPushDataSource(dataSource)))
{
+        boolean pull;
+        if (OMDataSourceUtil.isPullDataSource(dataSource)) {
+            pull = true;
+        } else if (OMDataSourceUtil.isPushDataSource(dataSource)) {
+            if (incremental) {
+                return null;
+            }
+            pull = false;
+        } else {
+            pull = incremental;
+        }
+        if (cache && (pull && OMDataSourceUtil.isDestructiveRead(dataSource)
|| !pull && OMDataSourceUtil.isDestructiveWrite(dataSource))) {
+            return null;
+        }
+        if (pull) {
             try {
                 return new StAXPullInput(dataSource.getReader());
             } catch (XMLStreamException ex) {
                 throw new StreamException(ex);
             }
-        } else if (!incremental) {
-            return new PushOMDataSourceInput(this, dataSource);
         } else {
-            return null;
+            return new PushOMDataSourceInput(this, dataSource);
         }
     }
 



Mime
View raw message