abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roo...@apache.org
Subject svn commit: r469295 - in /incubator/abdera/java/trunk: core/src/main/java/org/apache/abdera/factory/ core/src/main/java/org/apache/abdera/model/ parser/src/main/java/org/apache/abdera/parser/stax/
Date Mon, 30 Oct 2006 22:17:29 GMT
Author: rooneg
Date: Mon Oct 30 14:17:28 2006
New Revision: 469295

URL: http://svn.apache.org/viewvc?view=rev&rev=469295
Log:
Make the new extension code build on Sun's compiler.  Have I mentioned
lately how much the differences in generics support between the Eclipse
Java compiler and the Sun Java compiler annoy me?

[ in core/src/main/java/org/apache/abdera ]

* model/ExtensibleElementWrapper.java: Add necessary casts to T.

* model/ElementWrapper.java: Ditto.

* factory/ExtensionFactoryMap.java: Ditto.

[ in parser/src/main/java/org/apache/abdera/parser/stax ]

* FOMDocument.java: Ditto.

Modified:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactoryMap.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ElementWrapper.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElementWrapper.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactoryMap.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactoryMap.java?view=diff&rev=469295&r1=469294&r2=469295
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactoryMap.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactoryMap.java
Mon Oct 30 14:17:28 2006
@@ -44,7 +44,7 @@
     T t = (T)wrappers.get(internal);
     if (t == null) {
       for (ExtensionFactory factory : factories) {
-        t = factory.getElementWrapper(internal);
+        t = (T) factory.getElementWrapper(internal);
         if (t != internal) {
           wrappers.put(internal, t);
           return t;

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ElementWrapper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ElementWrapper.java?view=diff&rev=469295&r1=469294&r2=469295
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ElementWrapper.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ElementWrapper.java
Mon Oct 30 14:17:28 2006
@@ -99,11 +99,11 @@
   }
 
   public <T extends Element> T getFirstChild() {
-    return internal.getFirstChild();
+    return (T) internal.getFirstChild();
   }
 
   public <T extends Element> T getFirstChild(QName qname) {
-    return internal.getFirstChild(qname);
+    return (T) internal.getFirstChild(qname);
   }
 
   public String getLanguage() {
@@ -115,23 +115,23 @@
   }
 
   public <T extends Element> T getNextSibling() {
-    return internal.getNextSibling();
+    return (T) internal.getNextSibling();
   }
 
   public <T extends Element> T getNextSibling(QName qname) {
-    return internal.getNextSibling(qname);
+    return (T) internal.getNextSibling(qname);
   }
 
   public <T extends Base> T getParentElement() {
-    return internal.getParentElement();
+    return (T) internal.getParentElement();
   }
 
   public <T extends Element> T getPreviousSibling() {
-    return internal.getPreviousSibling();
+    return (T) internal.getPreviousSibling();
   }
 
   public <T extends Element> T getPreviousSibling(QName qname) {
-    return internal.getPreviousSibling(qname);
+    return (T) internal.getPreviousSibling(qname);
   }
 
   public QName getQName() {

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElementWrapper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElementWrapper.java?view=diff&rev=469295&r1=469294&r2=469295
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElementWrapper.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElementWrapper.java
Mon Oct 30 14:17:28 2006
@@ -44,11 +44,11 @@
   }
 
   public <T extends Element> T addExtension(QName qname) {
-    return getExtInternal().addExtension(qname);
+    return (T) getExtInternal().addExtension(qname);
   }
 
   public <T extends Element> T addExtension(String namespace, String localPart, String
prefix) {
-    return getExtInternal().addExtension(namespace, localPart, prefix);
+    return (T) getExtInternal().addExtension(namespace, localPart, prefix);
   }
 
   public Element addSimpleExtension(QName qname, String value) {
@@ -60,7 +60,7 @@
   }
 
   public <T extends Element> T getExtension(QName qname) {
-    return getExtInternal().getExtension(qname);
+    return (T) getExtInternal().getExtension(qname);
   }
 
   public <T extends Element> T getExtension(Class<T> _class) {

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java?view=diff&rev=469295&r1=469294&r2=469295
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java
Mon Oct 30 14:17:28 2006
@@ -92,7 +92,7 @@
   @SuppressWarnings("unchecked")
   public T getRoot() {  
     FOMFactory factory = (FOMFactory) getFactory();
-    return factory.getElementWrapper((T)this.getOMDocumentElement());
+    return (T) factory.getElementWrapper((T) this.getOMDocumentElement());
   }
 
   public void setRoot(T root) {



Mime
View raw message