ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1484236 - /webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerHelper.java
Date Sun, 19 May 2013 07:00:24 GMT
Author: veithen
Date: Sun May 19 07:00:24 2013
New Revision: 1484236

URL: http://svn.apache.org/r1484236
Log:
Simplified some code in OMContainerHelper#getXMLStreamReader.

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

Modified: webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerHelper.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerHelper.java?rev=1484236&r1=1484235&r2=1484236&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerHelper.java
(original)
+++ webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerHelper.java
Sun May 19 07:00:24 2013
@@ -58,19 +58,10 @@ public final class OMContainerHelper {
             }
         }
         
-        // The om tree was built by hand and is already complete
-        OMXMLStreamReader reader;
-        boolean done = container.isComplete();
-        // TODO: review & clean up
-        if ((builder == null) && done) {
-            reader = new OMXMLStreamReaderExAdapter(new PullSerializer(null, container, cache,
configuration.isPreserveNamespaceContext()));
-        } else {
-            if (builder != null && builder.isCompleted() && !cache &&
!done) {
-                throw new UnsupportedOperationException(
-                "The parser is already consumed!");
-            }
-            reader = new OMXMLStreamReaderExAdapter(new PullSerializer(builder, container,
cache, configuration.isPreserveNamespaceContext()));
+        if (builder != null && builder.isCompleted() && !cache &&
!container.isComplete()) {
+            throw new UnsupportedOperationException("The parser is already consumed!");
         }
+        OMXMLStreamReader reader = new OMXMLStreamReaderExAdapter(new PullSerializer(builder,
container, cache, configuration.isPreserveNamespaceContext()));
         
         if (configuration.isNamespaceURIInterning()) {
             reader = new NamespaceURIInterningXMLStreamReaderWrapper(reader);



Mime
View raw message