abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r448099 - in /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax: FOMEntry.java FOMSource.java
Date Wed, 20 Sep 2006 06:56:52 GMT
Author: jmsnell
Date: Tue Sep 19 23:56:51 2006
New Revision: 448099

URL: http://svn.apache.org/viewvc?view=rev&rev=448099
Log:
Bug reported by Steven Isaacson. Caused by a limitation some java1.5 compilers have when handling

generics.  

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

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java?view=diff&rev=448099&r1=448098&r2=448099
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
Tue Sep 19 23:56:51 2006
@@ -139,7 +139,8 @@
   }
 
   public void addCategory(Category category) {
-    if (category.getParentElement() instanceof Categories) {
+    Element el = category.getParentElement();
+    if (el != null && el instanceof Categories) {
       Categories cats = category.getParentElement();
       category = (Category) category.clone();
       try {

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java?view=diff&rev=448099&r1=448098&r2=448099
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java
Tue Sep 19 23:56:51 2006
@@ -31,6 +31,7 @@
 import org.apache.abdera.model.Collection;
 import org.apache.abdera.model.DateTime;
 import org.apache.abdera.model.Div;
+import org.apache.abdera.model.Element;
 import org.apache.abdera.model.Generator;
 import org.apache.abdera.model.IRI;
 import org.apache.abdera.model.Link;
@@ -135,7 +136,8 @@
   }
   
   public void addCategory(Category category) {
-    if (category.getParentElement() instanceof Categories) {
+    Element el = category.getParentElement();
+    if (el != null && el instanceof Categories) {
       Categories cats = category.getParentElement();
       category = (Category) category.clone();
       try {



Mime
View raw message