You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@abdera.apache.org by jm...@apache.org on 2006/08/30 19:59:10 UTC

svn commit: r438567 - /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java

Author: jmsnell
Date: Wed Aug 30 10:59:09 2006
New Revision: 438567

URL: http://svn.apache.org/viewvc?rev=438567&view=rev
Log:
Fixing a NPE that occurs when inserting an entry created from the Factory.

e.g.

feed.insertEntry(factory.newEntry());
feed.insertEntry(factory.newEntry()); // caused a NPE in Axiom

Explicitly setting the inserted entries parent prior to the insert resolves the problem

Modified:
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java?rev=438567&r1=438566&r2=438567&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java Wed Aug 30 10:59:09 2006
@@ -107,6 +107,7 @@
     if (el == null) {
       addEntry(entry);
     } else {
+      entry.setParentElement(this);
       el.insertSiblingBefore((OMElement)entry);
     }
   }