ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1735195 - /webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAPHeaderBlockMapper.java
Date Wed, 16 Mar 2016 07:59:16 GMT
Author: veithen
Date: Wed Mar 16 07:59:16 2016
New Revision: 1735195

URL: http://svn.apache.org/viewvc?rev=1735195&view=rev
Log:
Only convert to SOAPHeaderBlock if necessary.

Modified:
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAPHeaderBlockMapper.java

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAPHeaderBlockMapper.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAPHeaderBlockMapper.java?rev=1735195&r1=1735194&r2=1735195&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAPHeaderBlockMapper.java
(original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAPHeaderBlockMapper.java
Wed Mar 16 07:59:16 2016
@@ -32,10 +32,14 @@ public final class SOAPHeaderBlockMapper
     
     @Override
     public SOAPHeaderBlock map(AxiomElement element) {
-        try {
-            return element.corePromote(((AxiomSOAPHeader)element.coreGetParent()).getSOAPHelper().getHeaderBlockClass(),
AxiomSemantics.INSTANCE);
-        } catch (CoreModelException ex) {
-            throw AxiomSemantics.INSTANCE.toUncheckedException(ex);
+        if (element instanceof SOAPHeaderBlock) {
+            return (SOAPHeaderBlock)element;
+        } else {
+            try {
+                return element.corePromote(((AxiomSOAPHeader)element.coreGetParent()).getSOAPHelper().getHeaderBlockClass(),
AxiomSemantics.INSTANCE);
+            } catch (CoreModelException ex) {
+                throw AxiomSemantics.INSTANCE.toUncheckedException(ex);
+            }
         }
     }
 }



Mime
View raw message