abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r1175692 - in /abdera/abdera2/core/src/main/java/org/apache/abdera2: model/ElementIteratorWrapper.java parser/axiom/FOMElement.java parser/axiom/FOMExtensibleElement.java parser/axiom/FOMFactory.java
Date Mon, 26 Sep 2011 06:53:12 GMT
Author: jmsnell
Date: Mon Sep 26 06:53:12 2011
New Revision: 1175692

URL: http://svn.apache.org/viewvc?rev=1175692&view=rev
Log:
Silly jdk generics issues are gonna be the death of me.

Modified:
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/ElementIteratorWrapper.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMElement.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMExtensibleElement.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMFactory.java

Modified: abdera/abdera2/core/src/main/java/org/apache/abdera2/model/ElementIteratorWrapper.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/core/src/main/java/org/apache/abdera2/model/ElementIteratorWrapper.java?rev=1175692&r1=1175691&r2=1175692&view=diff
==============================================================================
--- abdera/abdera2/core/src/main/java/org/apache/abdera2/model/ElementIteratorWrapper.java
(original)
+++ abdera/abdera2/core/src/main/java/org/apache/abdera2/model/ElementIteratorWrapper.java
Mon Sep 26 06:53:12 2011
@@ -57,7 +57,7 @@ public class ElementIteratorWrapper<T ex
     public T next() {
       T item = current;
       current = get_current();
-      return factory.getElementWrapper(item);
+      return (T)factory.getElementWrapper(item);
     }
 
     public void remove() {

Modified: abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMElement.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMElement.java?rev=1175692&r1=1175691&r2=1175692&view=diff
==============================================================================
--- abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMElement.java (original)
+++ abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMElement.java Mon
Sep 26 06:53:12 2011
@@ -198,7 +198,7 @@ public class FOMElement extends OMElemen
 
     public <T extends Element> T setLanguage(String language) {
       complete();
-        return setAttributeValue(LANG, language);
+        return (T)setAttributeValue(LANG, language);
     }
 
     public IRI getBaseUri() {
@@ -230,7 +230,7 @@ public class FOMElement extends OMElemen
 
     public <T extends Element> T setBaseUri(IRI base) {
       complete();
-        return setAttributeValue(BASE, _getStringValue(base));
+        return (T)setAttributeValue(BASE, _getStringValue(base));
     }
 
     public <T extends Element> T setBaseUri(String base) {
@@ -369,7 +369,7 @@ public class FOMElement extends OMElemen
     }
 
     public <T extends Element> T setAttributeValue(String name, String value) {
-        return setAttributeValue(new QName(name), value);
+        return (T)setAttributeValue(new QName(name), value);
     }
 
     protected void _setElementValue(QName qname, String value) {

Modified: abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMExtensibleElement.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMExtensibleElement.java?rev=1175692&r1=1175691&r2=1175692&view=diff
==============================================================================
--- abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMExtensibleElement.java
(original)
+++ abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMExtensibleElement.java
Mon Sep 26 06:53:12 2011
@@ -141,7 +141,7 @@ public class FOMExtensibleElement extend
     public <T extends Element> T getExtension(Class<T> _class) {
       QName qname = AnnoUtil.getQName(_class);
       if (qname != null) {
-        return getExtension(qname);
+        return (T)getExtension(qname);
       } else {
         T t = null;
         List<Element> extensions = getExtensions();
@@ -220,13 +220,13 @@ public class FOMExtensibleElement extend
       QName qname = AnnoUtil.getQName(_class);
       if (qname == null)
         throw new IllegalArgumentException();
-      return addExtension(qname);
+      return (T)addExtension(qname);
     }
 
     public <T extends Element> T addExtension(Class<T> _class, QName before)
{
       QName qname = AnnoUtil.getQName(_class);
       if (qname == null)
         throw new IllegalArgumentException();
-      return addExtension(_class,before);
+      return (T)addExtension(_class,before);
     }
 }

Modified: abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMFactory.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMFactory.java?rev=1175692&r1=1175691&r2=1175692&view=diff
==============================================================================
--- abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMFactory.java (original)
+++ abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMFactory.java Mon
Sep 26 06:53:12 2011
@@ -857,21 +857,21 @@ public class FOMFactory extends OMLinked
       QName qname = AnnoUtil.getQName(_class);
       if (qname == null)
         throw new IllegalArgumentException();
-      return newElement(qname);
+      return (T)newElement(qname);
     }
 
     public <T extends Element> T newElement(Class<?> _class, Base parent) {
       QName qname = AnnoUtil.getQName(_class);
       if (qname == null)
         throw new IllegalArgumentException();
-      return newElement(qname,parent);
+      return (T)newElement(qname,parent);
     }
 
     public <T extends Element> T newExtensionElement(Class<?> _class) {
       QName qname = AnnoUtil.getQName(_class);
       if (qname == null)
         throw new IllegalArgumentException();
-      return newExtensionElement(qname);
+      return (T)newExtensionElement(qname);
     }
 
     public <T extends Element> T newExtensionElement(Class<?> _class,
@@ -879,7 +879,7 @@ public class FOMFactory extends OMLinked
       QName qname = AnnoUtil.getQName(_class);
       if (qname == null)
         throw new IllegalArgumentException();
-      return newExtensionElement(qname,parent);
+      return (T)newExtensionElement(qname,parent);
     }
 
 }



Mime
View raw message