abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r432030 - /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java
Date Wed, 16 Aug 2006 20:44:11 GMT
Author: jmsnell
Date: Wed Aug 16 13:44:11 2006
New Revision: 432030

URL: http://svn.apache.org/viewvc?rev=432030&view=rev
Log:
Fix a NPE that occurs when text type == XHTML and no div is present

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

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java?rev=432030&r1=432029&r2=432030&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java
Wed Aug 16 13:44:11 2006
@@ -119,7 +119,8 @@
     } else if (Type.HTML.equals(type)) {
       val = getText();
     } else if (Type.XHTML.equals(type)) {
-      val = ((FOMDiv)this.getFirstChildWithName(Constants.DIV)).getInternalValue();
+      FOMDiv div = (FOMDiv) this.getFirstChildWithName(Constants.DIV);
+      val = (div != null) ? div.getInternalValue() : null;
     }
     return val;
   }



Mime
View raw message