ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1734616 - in /webservices/axiom/trunk: aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/ axiom-api/src/main/java/org/apache/axiom/om/ src/site/markdown/release-notes/
Date Fri, 11 Mar 2016 18:50:10 GMT
Author: veithen
Date: Fri Mar 11 18:50:10 2016
New Revision: 1734616

URL: http://svn.apache.org/viewvc?rev=1734616&view=rev
Log:
Building a node before detaching it is no longer necessary with the new builder design.

Modified:
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreChildNodeSupport.aj
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreElementSupport.aj
    webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMNode.java
    webservices/axiom/trunk/src/site/markdown/release-notes/1.3.0.md

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreChildNodeSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreChildNodeSupport.aj?rev=1734616&r1=1734615&r2=1734616&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreChildNodeSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreChildNodeSupport.aj
Fri Mar 11 18:50:10 2016
@@ -205,8 +205,6 @@ public aspect CoreChildNodeSupport {
         fragmentContent.lastChild = null;
     }
     
-    void CoreChildNode.beforeDetach() {}
-    
     public final void CoreChildNode.coreDetach(Semantics semantics) {
         internalDetach(semantics, null);
     }
@@ -214,7 +212,6 @@ public aspect CoreChildNodeSupport {
     final void CoreChildNode.internalDetach(Semantics semantics, CoreParentNode newParent)
{
         CoreParentNode parent = coreGetParent();
         if (parent != null) {
-            beforeDetach();
             if (previousSibling == null) {
                 parent.getContent(true).firstChild = nextSibling;
             } else {
@@ -243,7 +240,6 @@ public aspect CoreChildNodeSupport {
         CoreParentNode parent = coreGetParent();
         if (parent != null) {
             newNode.internalDetach(null, parent);
-            beforeDetach();
             if (previousSibling == null) {
                 parent.getContent(true).firstChild = newNode;
             } else {

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreElementSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreElementSupport.aj?rev=1734616&r1=1734615&r2=1734616&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreElementSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreElementSupport.aj
Fri Mar 11 18:50:10 2016
@@ -27,7 +27,6 @@ import org.apache.axiom.core.CoreElement
 import org.apache.axiom.core.CoreModelException;
 import org.apache.axiom.core.CoreNamespaceDeclaration;
 import org.apache.axiom.core.CoreNode;
-import org.apache.axiom.core.CoreParentNode;
 import org.apache.axiom.core.Mapper;
 import org.apache.axiom.core.Semantics;
 import org.apache.axiom.core.impl.AttributeIterator;
@@ -35,12 +34,6 @@ import org.apache.axiom.core.impl.Attrib
 public aspect CoreElementSupport {
     private CoreAttribute CoreElement.firstAttribute;
 
-    final void CoreElement.beforeDetach() {
-        if (getState() == CoreParentNode.INCOMPLETE && coreGetBuilder() == coreGetParent().coreGetBuilder())
{
-            build();
-        }
-    }
-    
     public final CoreAttribute CoreElement.coreGetFirstAttribute() {
         forceExpand();
         return firstAttribute;

Modified: webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMNode.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMNode.java?rev=1734616&r1=1734615&r2=1734616&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMNode.java (original)
+++ webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMNode.java Fri Mar
11 18:50:10 2016
@@ -112,16 +112,11 @@ public interface OMNode extends OMSerial
     /**
      * Removes a node (and all of its children) from its containing parent.
      * <p>
-     * Removes a node from its parent. Partially complete nodes will be completed before
they are
-     * detached from the model. A node cannot be detached until its next sibling has been
identified,
-     * so that the next sibling and parent can be updated appropriately. Please note that
this will not
+     * Removes a node from its parent. Please note that this will not
      * handle the namespaces. For example, if there you have used a namespace within the
detaching node
      * and which is defined outside the detaching node, user has to handle it manually. </p>
      *
      * @return The detached node. This is always the instance on which this method is invoked.
-     * 
-     * @throws OMException If a node is not complete, the detach can trigger further parsing,
which may
-     *                     cause an exception.
      */
     // TODO: LLOM's OMNodeImpl triggers an exception if the node doesn't have a parent. This
is not specified here.
     OMNode detach() throws OMException;

Modified: webservices/axiom/trunk/src/site/markdown/release-notes/1.3.0.md
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/src/site/markdown/release-notes/1.3.0.md?rev=1734616&r1=1734615&r2=1734616&view=diff
==============================================================================
--- webservices/axiom/trunk/src/site/markdown/release-notes/1.3.0.md (original)
+++ webservices/axiom/trunk/src/site/markdown/release-notes/1.3.0.md Fri Mar 11 18:50:10 2016
@@ -43,6 +43,9 @@ Changes in this release
     should use the `OMXMLBuilderFactory` API to create builders. Code written for
     Axiom 1.2.x that uses that API remains compatible with Axiom 1.3.x.
 
+*   The `detach` method no longer causes the node to be built. This change was
+    made possible by the new builder design.
+
 *   Several methods have been removed from the `OMXMLParserWrapper` interface.
     This includes formerly deprecated methods as well as methods that would
     allow manipulation of the state of the underlying parser.



Mime
View raw message