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 2015/06/04 22:31:05 UTC
svn commit: r1683629 - in /webservices/axiom/trunk:
aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/
implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/
implementations/axiom-dom/src/main/java/org/apache/axio...
Author: veithen
Date: Thu Jun 4 20:31:04 2015
New Revision: 1683629
URL: http://svn.apache.org/r1683629
Log:
Clean up code originally introduced by AXIOM-392.
Modified:
webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj
webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultImpl.java
webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultImpl.java
webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultImpl.java
webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultImpl.java
Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj?rev=1683629&r1=1683628&r2=1683629&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj Thu Jun 4 20:31:04 2015
@@ -231,11 +231,11 @@ public aspect AxiomElementSupport {
coreSetNextSibling(null);
}
- public static void insertChild(OMElement parent, Class[] sequence, int pos, OMNode newChild) {
+ public void AxiomElement.insertChild(Class[] sequence, int pos, OMNode newChild) {
if (!sequence[pos].isInstance(newChild)) {
throw new IllegalArgumentException();
}
- OMNode child = parent.getFirstOMChild();
+ OMNode child = getFirstOMChild();
while (child != null) {
if (child instanceof OMElement) {
if (child == newChild) {
@@ -266,7 +266,7 @@ public aspect AxiomElementSupport {
child = child.getNextOMSibling();
}
// Else, add the new child at the end
- parent.addChild(newChild);
+ addChild(newChild);
}
public final OMNamespace AxiomElement.handleNamespace(String namespaceURI, String prefix) {
Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultImpl.java?rev=1683629&r1=1683628&r2=1683629&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultImpl.java (original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultImpl.java Thu Jun 4 20:31:04 2015
@@ -24,7 +24,6 @@ import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
import org.apache.axiom.om.OMXMLParserWrapper;
-import org.apache.axiom.om.impl.common.AxiomElementSupport;
import org.apache.axiom.om.impl.dom.ParentNode;
import org.apache.axiom.soap.SOAP11Constants;
import org.apache.axiom.soap.SOAPBody;
@@ -74,7 +73,7 @@ public class SOAP11FaultImpl extends SOA
"Expecting SOAP 1.1 implementation of SOAP Fault Code. " +
"But received some other implementation");
}
- AxiomElementSupport.insertChild(this, sequence, 0, soapFaultCode);
+ insertChild(sequence, 0, soapFaultCode);
}
public void setReason(SOAPFaultReason reason) throws SOAPProcessingException {
@@ -83,7 +82,7 @@ public class SOAP11FaultImpl extends SOA
"Expecting SOAP 1.1 implementation of SOAP Fault Reason. " +
"But received some other implementation");
}
- AxiomElementSupport.insertChild(this, sequence, 1, reason);
+ insertChild(sequence, 1, reason);
}
public void setNode(SOAPFaultNode node) throws SOAPProcessingException {
@@ -96,7 +95,7 @@ public class SOAP11FaultImpl extends SOA
"Expecting SOAP 1.1 implementation of SOAP Fault Role. " +
"But received some other implementation");
}
- AxiomElementSupport.insertChild(this, sequence, 2, role);
+ insertChild(sequence, 2, role);
}
protected void checkParent(OMElement parent) throws SOAPProcessingException {
@@ -113,7 +112,7 @@ public class SOAP11FaultImpl extends SOA
"Expecting SOAP 1.1 implementation of SOAP Fault Detail. " +
"But received some other implementation");
}
- AxiomElementSupport.insertChild(this, sequence, 3, detail);
+ insertChild(sequence, 3, detail);
}
public SOAPFaultRole getRole() {
Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultImpl.java?rev=1683629&r1=1683628&r2=1683629&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultImpl.java (original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultImpl.java Thu Jun 4 20:31:04 2015
@@ -24,7 +24,6 @@ import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
import org.apache.axiom.om.OMXMLParserWrapper;
-import org.apache.axiom.om.impl.common.AxiomElementSupport;
import org.apache.axiom.om.impl.dom.ParentNode;
import org.apache.axiom.soap.SOAPBody;
import org.apache.axiom.soap.SOAPFactory;
@@ -74,7 +73,7 @@ public class SOAP12FaultImpl extends SOA
"Expecting SOAP 1.2 implementation of SOAP Fault Code. " +
"But received some other implementation");
}
- AxiomElementSupport.insertChild(this, sequence, 0, soapFaultCode);
+ insertChild(sequence, 0, soapFaultCode);
}
@@ -83,7 +82,7 @@ public class SOAP12FaultImpl extends SOA
throw new SOAPProcessingException(
"Expecting SOAP 1.2 implementation of SOAP Fault Reason. But received some other implementation");
}
- AxiomElementSupport.insertChild(this, sequence, 1, reason);
+ insertChild(sequence, 1, reason);
}
public void setNode(SOAPFaultNode node) throws SOAPProcessingException {
@@ -91,7 +90,7 @@ public class SOAP12FaultImpl extends SOA
throw new SOAPProcessingException(
"Expecting SOAP 1.2 implementation of SOAP Fault Node. But received some other implementation");
}
- AxiomElementSupport.insertChild(this, sequence, 2, node);
+ insertChild(sequence, 2, node);
}
public void setRole(SOAPFaultRole role) throws SOAPProcessingException {
@@ -99,7 +98,7 @@ public class SOAP12FaultImpl extends SOA
throw new SOAPProcessingException(
"Expecting SOAP 1.2 implementation of SOAP Fault Role. But received some other implementation");
}
- AxiomElementSupport.insertChild(this, sequence, 3, role);
+ insertChild(sequence, 3, role);
}
public void setDetail(SOAPFaultDetail detail) throws SOAPProcessingException {
@@ -107,7 +106,7 @@ public class SOAP12FaultImpl extends SOA
throw new SOAPProcessingException(
"Expecting SOAP 1.2 implementation of SOAP Fault Detail. But received some other implementation");
}
- AxiomElementSupport.insertChild(this, sequence, 4, detail);
+ insertChild(sequence, 4, detail);
}
protected void checkParent(OMElement parent) throws SOAPProcessingException {
Modified: webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultImpl.java?rev=1683629&r1=1683628&r2=1683629&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultImpl.java (original)
+++ webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultImpl.java Thu Jun 4 20:31:04 2015
@@ -21,7 +21,6 @@ package org.apache.axiom.soap.impl.llom.
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMXMLParserWrapper;
-import org.apache.axiom.om.impl.common.AxiomElementSupport;
import org.apache.axiom.soap.SOAP11Constants;
import org.apache.axiom.soap.SOAPBody;
import org.apache.axiom.soap.SOAPFactory;
@@ -74,7 +73,7 @@ public class SOAP11FaultImpl extends SOA
throw new SOAPProcessingException(
"Expecting SOAP11FaultCodeImpl, got " + soapFaultCode.getClass());
}
- AxiomElementSupport.insertChild(this, sequence, 0, soapFaultCode);
+ insertChild(sequence, 0, soapFaultCode);
}
public void setReason(SOAPFaultReason reason) throws SOAPProcessingException {
@@ -82,7 +81,7 @@ public class SOAP11FaultImpl extends SOA
throw new SOAPProcessingException(
"Expecting SOAP11FaultReasonImpl, got " + reason.getClass());
}
- AxiomElementSupport.insertChild(this, sequence, 1, reason);
+ insertChild(sequence, 1, reason);
}
public void setNode(SOAPFaultNode node) throws SOAPProcessingException {
@@ -94,7 +93,7 @@ public class SOAP11FaultImpl extends SOA
throw new SOAPProcessingException(
"Expecting SOAP11FaultRoleImpl, got " + role.getClass());
}
- AxiomElementSupport.insertChild(this, sequence, 2, role);
+ insertChild(sequence, 2, role);
}
protected void checkParent(OMElement parent) throws SOAPProcessingException {
@@ -109,7 +108,7 @@ public class SOAP11FaultImpl extends SOA
throw new SOAPProcessingException(
"Expecting SOAP11FaultDetailImpl, got " + detail.getClass());
}
- AxiomElementSupport.insertChild(this, sequence, 3, detail);
+ insertChild(sequence, 3, detail);
}
public SOAPFaultCode getCode() {
Modified: webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultImpl.java?rev=1683629&r1=1683628&r2=1683629&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultImpl.java (original)
+++ webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultImpl.java Thu Jun 4 20:31:04 2015
@@ -21,7 +21,6 @@ package org.apache.axiom.soap.impl.llom.
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMXMLParserWrapper;
-import org.apache.axiom.om.impl.common.AxiomElementSupport;
import org.apache.axiom.soap.SOAPBody;
import org.apache.axiom.soap.SOAPFactory;
import org.apache.axiom.soap.SOAPFault;
@@ -73,7 +72,7 @@ public class SOAP12FaultImpl extends SOA
throw new SOAPProcessingException(
"Expecting SOAP12FaultCodeImpl, got " + soapFaultCode.getClass());
}
- AxiomElementSupport.insertChild(this, sequence, 0, soapFaultCode);
+ insertChild(sequence, 0, soapFaultCode);
}
@@ -82,7 +81,7 @@ public class SOAP12FaultImpl extends SOA
throw new SOAPProcessingException(
"Expecting SOAP12FaultReasonImpl, got " + reason.getClass());
}
- AxiomElementSupport.insertChild(this, sequence, 1, reason);
+ insertChild(sequence, 1, reason);
}
public void setNode(SOAPFaultNode node) throws SOAPProcessingException {
@@ -90,7 +89,7 @@ public class SOAP12FaultImpl extends SOA
throw new SOAPProcessingException(
"Expecting SOAP12FaultNodeImpl, got " + node.getClass());
}
- AxiomElementSupport.insertChild(this, sequence, 2, node);
+ insertChild(sequence, 2, node);
}
public void setRole(SOAPFaultRole role) throws SOAPProcessingException {
@@ -98,7 +97,7 @@ public class SOAP12FaultImpl extends SOA
throw new SOAPProcessingException(
"Expecting SOAP12FaultRoleImpl, got " + role.getClass());
}
- AxiomElementSupport.insertChild(this, sequence, 3, role);
+ insertChild(sequence, 3, role);
}
public void setDetail(SOAPFaultDetail detail) throws SOAPProcessingException {
@@ -106,7 +105,7 @@ public class SOAP12FaultImpl extends SOA
throw new SOAPProcessingException(
"Expecting SOAP12FaultDetailImpl, got " + detail.getClass());
}
- AxiomElementSupport.insertChild(this, sequence, 4, detail);
+ insertChild(sequence, 4, detail);
}
protected void checkParent(OMElement parent) throws SOAPProcessingException {