abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1438904 - in /abdera/java/trunk: core/src/main/java/org/apache/abdera/model/ parser/src/main/java/org/apache/abdera/parser/stax/
Date Sat, 26 Jan 2013 15:35:47 GMT
Author: veithen
Date: Sat Jan 26 15:35:47 2013
New Revision: 1438904

URL: http://svn.apache.org/viewvc?rev=1438904&view=rev
Log:
Removed unnecessary call to internal Axiom method corrupting the object model.

Modified:
    abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java
    abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ElementWrapper.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java

Modified: abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java?rev=1438904&r1=1438903&r2=1438904&view=diff
==============================================================================
--- abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java (original)
+++ abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java Sat Jan 26 15:35:47
2013
@@ -41,9 +41,8 @@ public interface Element extends Base, I
     <T extends Base> T getParentElement();
 
     /**
-     * Set this Element's parent element
-     * 
-     * @param parent The parent element
+     * @deprecated This method will cause corruption of the object model because the parent
of an
+     *             element cannot be set without adding that element as a child.
      */
     <T extends Element> T setParentElement(Element parent);
 

Modified: abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ElementWrapper.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ElementWrapper.java?rev=1438904&r1=1438903&r2=1438904&view=diff
==============================================================================
--- abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ElementWrapper.java (original)
+++ abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ElementWrapper.java Sat Jan
26 15:35:47 2013
@@ -190,6 +190,7 @@ public abstract class ElementWrapper imp
         return (T)this;
     }
 
+    @SuppressWarnings("deprecation")
     public <T extends Element> T setParentElement(Element parent) {
         internal.setParentElement(parent);
         return (T)this;

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java?rev=1438904&r1=1438903&r2=1438904&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java
(original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java
Sat Jan 26 15:35:47 2013
@@ -167,7 +167,6 @@ public class FOMExtensibleElement extend
         if (before == null) {
             addExtension(extension);
         } else {
-            extension.setParentElement(this);
             ((OMElement)before).insertSiblingBefore((OMElement)extension);
         }
         return (T)this;

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java?rev=1438904&r1=1438903&r2=1438904&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java (original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java Sat
Jan 26 15:35:47 2013
@@ -84,7 +84,6 @@ public class FOMFeed extends FOMSource i
         if (el == null) {
             addEntry(entry);
         } else {
-            entry.setParentElement(this);
             el.insertSiblingBefore((OMElement)entry);
         }
         return this;



Mime
View raw message