abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r518477 - /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java
Date Thu, 15 Mar 2007 04:45:24 GMT
Author: jmsnell
Date: Wed Mar 14 21:45:24 2007
New Revision: 518477

URL: http://svn.apache.org/viewvc?view=rev&rev=518477
Log:
Fixing https://issues.apache.org/jira/browse/ABDERA-40

"entry.getSource().getId() cast exception"

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?view=diff&rev=518477&r1=518476&r2=518477
==============================================================================
--- 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 Mar 14 21:45:24 2007
@@ -121,13 +121,17 @@
 
   public Source getAsSource() {
     FOMSource source = (FOMSource) ((FOMFactory)factory).newSource(null);
-    OMElement _source = source;
     for (Iterator i = this.getChildElements(); i.hasNext();) {
-      OMElement _child = (OMElement) i.next();
-      if (!_child.getQName().equals(ENTRY)) {
-        _source.addChild(_child.cloneOMElement());
+      FOMElement child = (FOMElement)i.next();
+      if (!child.getQName().equals(ENTRY)) {
+        source.addChild((OMNode)child.clone());
       }
     }
+    try {
+      if (this.getBaseUri() != null) {
+        source.setBaseUri(this.getBaseUri());
+      }
+    } catch (Exception e) {}
     return source;
   }
 



Mime
View raw message