You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2013/01/15 19:43:30 UTC

svn commit: r1433576 - /webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java

Author: veithen
Date: Tue Jan 15 18:43:30 2013
New Revision: 1433576

URL: http://svn.apache.org/viewvc?rev=1433576&view=rev
Log:
Quick fix for a regression in Axis2.

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

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java?rev=1433576&r1=1433575&r2=1433576&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java Tue Jan 15 18:43:30 2013
@@ -264,6 +264,14 @@ class SwitchingWrapper extends AbstractX
         } else {
             if ((currentEvent == START_ELEMENT)
                     || (currentEvent == END_ELEMENT)) {
+                // START quick & dirty hack
+                if (node instanceof OMSourcedElement) {
+                    // TODO: Need to force expansion to solve an issue in Axis2 where the returned QName is incorrect.
+                    //       Note that in previous versions of SwitchingWrapper, the sourced element was always expanded
+                    //       at this point (because SwitchingWrapper was looking 2 nodes ahead).
+                    ((OMElement)node).getFirstOMChild();
+                }
+                // END quick & dirty hack
                 return ((OMElement)node).getQName();
             } else {
                 throw new IllegalStateException();