abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roo...@apache.org
Subject svn commit: r466166 - /incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/history/FeedHistoryHelper.java
Date Fri, 20 Oct 2006 16:04:21 GMT
Author: rooneg
Date: Fri Oct 20 09:04:19 2006
New Revision: 466166

URL: http://svn.apache.org/viewvc?view=rev&rev=466166
Log:
Fix an odd compile problem in the Feed History extension.  I have no idea
why this isn't working, and I can only assume it's some weirdness with the
generics implementation in Sun's javac.

[ in extensions/src/main/java/org/apache/abdera/ext/history ]

* FeedHistoryHelper.java
  (setComplete, setArchive): Put the Element into an explicit variable
   to avoid weird compile error.

Modified:
    incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/history/FeedHistoryHelper.java

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/history/FeedHistoryHelper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/history/FeedHistoryHelper.java?view=diff&rev=466166&r1=466165&r2=466166
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/history/FeedHistoryHelper.java
(original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/history/FeedHistoryHelper.java
Fri Oct 20 09:04:19 2006
@@ -19,6 +19,7 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.abdera.model.Element;
 import org.apache.abdera.model.Feed;
 import org.apache.abdera.model.Link;
 import org.apache.abdera.util.iri.IRI;
@@ -42,7 +43,10 @@
     if (complete) {
       if (!isComplete(feed)) feed.addExtension(COMPLETE);
     } else {
-      if (isComplete(feed)) feed.getExtension(COMPLETE).discard(); 
+      if (isComplete(feed)) {
+        Element ext = feed.getExtension(COMPLETE);
+        ext.discard(); 
+      }
     }
   }
   
@@ -50,7 +54,10 @@
     if (archive) {
       if (!isArchive(feed)) feed.addExtension(ARCHIVE);
     } else {
-      if (isArchive(feed)) feed.getExtension(ARCHIVE).discard(); 
+      if (isArchive(feed)) {
+        Element ext = feed.getExtension(ARCHIVE);
+        ext.discard();
+      }
     }
   }
 



Mime
View raw message