abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r438567 - /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java
Date Wed, 30 Aug 2006 17:59:10 GMT
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);
     }
   }



Mime
View raw message