abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r617552 - in /incubator/abdera/java/trunk: client/src/test/java/org/apache/abdera/test/client/app/ client/src/test/java/org/apache/abdera/test/client/cache/ core/src/main/java/org/apache/abdera/model/ core/src/test/java/org/apache/abdera/te...
Date Fri, 01 Feb 2008 16:36:40 GMT
Author: jmsnell
Date: Fri Feb  1 08:36:21 2008
New Revision: 617552

URL: http://svn.apache.org/viewvc?rev=617552&view=rev
Log:
Deal with a bunch of annoying compiler warnings

Modified:
    incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/app/AppTest.java
    incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/cache/CacheTest.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElementWrapper.java
    incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java
    incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestText.java
    incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/apache/abdera/ext/opensearch/Query.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMControl.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java
    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/FOMFactory.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMService.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMWorkspace.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMElementIteratorWrapper.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMLinkIterator.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/PrettyWriter.java
    incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java
    incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedParserTest.java
    incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java
    incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/Encryption.java
    incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/EncryptionBase.java
    incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/SecurityBase.java
    incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/xmlsec/XmlEncryption.java
    incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/DefaultProviderDefinitionParser.java
    incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/ProviderFactoryBean.java
    incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/RegexTargetResolverFactoryBean.java
    incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/WorkspaceDefinitionParser.java

Modified: incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/app/AppTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/app/AppTest.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/app/AppTest.java
(original)
+++ incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/app/AppTest.java
Fri Feb  1 08:36:21 2008
@@ -225,7 +225,7 @@
             String uri = AppTest.INSTANCE.getBase() + "/collections/entries";
             ParserOptions options = getParser().getDefaultParserOptions();
             options.setCharset(charset);
-            Document doc = getParser().parse(request.getInputStream(), uri, options);
+            Document<?> doc = getParser().parse(request.getInputStream(), uri, options);
             if (doc.getRoot() instanceof Entry) {
               Entry entry = (Entry) doc.getRoot().clone();
               String newID = AppTest.INSTANCE.getBase() + "/collections/entries/" + feed.getRoot().getEntries().size();
@@ -291,7 +291,7 @@
                 String uri = AppTest.INSTANCE.getBase() + "/collections/entries/" + target;
                 ParserOptions options = getParser().getDefaultParserOptions();
                 options.setCharset(charset);
-                Document doc = getParser().parse(request.getInputStream(), uri, options);
+                Document<?> doc = getParser().parse(request.getInputStream(), uri,
options);
                 if (doc.getRoot() instanceof Entry) {
                   Entry newentry = (Entry) doc.getRoot().clone();
                   if (newentry.getId().equals(entry.getId())) {
@@ -589,7 +589,7 @@
       media = entry_doc.getRoot().getContentElement().getSrc().toString();
     
       // edit the entry
-      Document doc = response.getDocument();
+      Document<Entry> doc = response.getDocument();
       entry = (Entry) doc.getRoot().clone();
       entry.setTitle("New title");
     } finally {

Modified: incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/cache/CacheTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/cache/CacheTest.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/cache/CacheTest.java
(original)
+++ incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/cache/CacheTest.java
Fri Feb  1 08:36:21 2008
@@ -54,14 +54,14 @@
   
   private static String CHECK_CACHE_INVALIDATE;
   private static String CHECK_NO_CACHE;
-  private static String CHECK_AUTH;
+  //private static String CHECK_AUTH;
   private static String CHECK_MUST_REVALIDATE;
   
   public CacheTest() {
     String base = getBase();
     CHECK_CACHE_INVALIDATE = base + "/check_cache_invalidate";
     CHECK_NO_CACHE = base + "/no_cache";
-    CHECK_AUTH = base + "/auth";
+    //CHECK_AUTH = base + "/auth";
     CHECK_MUST_REVALIDATE = base + "/must_revalidate";
   }
   

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?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- 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
Fri Feb  1 08:36:21 2008
@@ -27,6 +27,7 @@
  * ElementWrapper implementation that implements the ExtensibleElement interface.
  * This should be used to create static extension elements that support extensions
  */
+@SuppressWarnings("unchecked") 
 public abstract class ExtensibleElementWrapper 
   extends ElementWrapper 
   implements ExtensibleElement {
@@ -48,12 +49,10 @@
     return (T)this;
   }
 
-  @SuppressWarnings("unchecked")
   public <T extends Element> T addExtension(QName qname) {
     return (T) getExtInternal().addExtension(qname);
   }
 
-  @SuppressWarnings("unchecked")
   public <T extends Element> T addExtension(String namespace, String localPart, String
prefix) {
     return (T) getExtInternal().addExtension(namespace, localPart, prefix);
   }
@@ -66,7 +65,6 @@
     return getExtInternal().addSimpleExtension(namespace, localPart, prefix, value);
   }
 
-  @SuppressWarnings("unchecked")
   public <T extends Element> T getExtension(QName qname) {
     return (T) getExtInternal().getExtension(qname);
   }
@@ -109,7 +107,6 @@
     return (T)this;
   }
 
-  @SuppressWarnings("unchecked")
   public <T extends Element> T addExtension(QName qname, QName before) {
     return (T)getExtInternal().addExtension(qname,before);
   }

Modified: incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java
(original)
+++ incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java
Fri Feb  1 08:36:21 2008
@@ -191,6 +191,7 @@
   }
   
   /** dummy classes **/
+  @SuppressWarnings("unchecked") 
   private static class EmptyFeed implements Feed {
 
     public Object clone() {
@@ -816,6 +817,7 @@
     
   }
   
+  @SuppressWarnings("unchecked") 
   private static class EmptyEntry implements Entry {
 
     public Object clone() {

Modified: incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestText.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestText.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestText.java
(original)
+++ incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestText.java
Fri Feb  1 08:36:21 2008
@@ -58,8 +58,6 @@
     assertTrue(CharUtils.isBidi(CharUtils.RLE));
     assertTrue(CharUtils.isBidi(CharUtils.RLM));
     assertTrue(CharUtils.isBidi(CharUtils.RLO));
-    
-    // TODO: other checks
   }
   
   @Test
@@ -114,9 +112,7 @@
   public void testCodepointIterator() throws Exception {
     String s = "abcdefghijklmnop";
     CodepointIterator ci = CodepointIterator.forCharSequence(s);
-    while(ci.hasNext()) {
-      Codepoint cp = ci.next();
-    }
+    while(ci.hasNext()) ci.next();
   }
   
   @Test

Modified: incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/apache/abdera/ext/opensearch/Query.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/apache/abdera/ext/opensearch/Query.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/apache/abdera/ext/opensearch/Query.java
(original)
+++ incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/apache/abdera/ext/opensearch/Query.java
Fri Feb  1 08:36:21 2008
@@ -25,6 +25,7 @@
 import org.apache.abdera.model.ElementWrapper;
 import org.apache.abdera.model.ExtensibleElement;
 
+@SuppressWarnings("unchecked")
 public class Query 
   extends ElementWrapper {
 

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java
Fri Feb  1 08:36:21 2008
@@ -46,7 +46,7 @@
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
 import org.apache.axiom.om.impl.util.OMSerializerUtil;
 
-@SuppressWarnings("unchecked")
+@SuppressWarnings({"unchecked","deprecation"})
 public class FOMBuilder 
   extends StAXOMBuilder
   implements Constants {

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
Fri Feb  1 08:36:21 2008
@@ -39,6 +39,7 @@
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 
+@SuppressWarnings("deprecation") 
 public class FOMCollection 
   extends FOMExtensibleElement 
   implements Collection {
@@ -148,7 +149,7 @@
   
   public String[] getAccept(){
     List<String> accept = new ArrayList<String>();
-    Iterator i = getChildrenWithName(ACCEPT);
+    Iterator<?> i = getChildrenWithName(ACCEPT);
     if (i == null || !i.hasNext()) i = getChildrenWithName(PRE_RFC_ACCEPT);
     while(i.hasNext()) {
       Element e = (Element) i.next();

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMControl.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMControl.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMControl.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMControl.java
Fri Feb  1 08:36:21 2008
@@ -27,6 +27,7 @@
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 
+@SuppressWarnings("deprecation") 
 public class FOMControl
   extends FOMExtensibleElement
   implements Control {

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java
Fri Feb  1 08:36:21 2008
@@ -135,7 +135,7 @@
         baseUri = getResolvedBaseUri();
         element = (OMElement) _parse(value, baseUri);
       } catch (Exception e) {}
-      for (Iterator i = element.getChildren(); i.hasNext();) {
+      for (Iterator<?> i = element.getChildren(); i.hasNext();) {
         this.addChild((OMNode)i.next());
       }
     }
@@ -147,7 +147,7 @@
       XMLStreamWriter writer = 
         XMLOutputFactory.newInstance().createXMLStreamWriter(out);
       writer.writeStartElement("");
-      for (Iterator nodes = this.getChildren(); nodes.hasNext();) {
+      for (Iterator<?> nodes = this.getChildren(); nodes.hasNext();) {
         OMNode node = (OMNode) nodes.next();
         node.serialize(writer);
       }

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?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- 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
Fri Feb  1 08:36:21 2008
@@ -292,7 +292,7 @@
     return this;
   }
 
-  public <T extends Base>T addComment(String value) {
+  public <X extends Base>X addComment(String value) {
     OMComment comment =
       this.factory.createOMComment(null, value);
     if (this.getOMDocumentElement() != null) {
@@ -300,7 +300,7 @@
     } else {
       this.addChild(comment);
     }
-    return (T)this;
+    return (X)this;
   }
 
   public EntityTag getEntityTag() {
@@ -364,9 +364,9 @@
    * ensure that this particular object is fully parsed and ready 
    * to be modified.
    */
-  public <T extends Base>T complete() {
+  public <X extends Base>X complete() {
     if (!isComplete() && getRoot() != null) getRoot().complete();
-    return (T)this;
+    return (X)this;
   }
 
   public void writeTo(

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?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- 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
Fri Feb  1 08:36:21 2008
@@ -46,7 +46,6 @@
 import org.apache.abdera.util.Constants;
 import org.apache.abdera.i18n.text.io.InputStreamDataSource;
 import org.apache.abdera.i18n.iri.IRI;
-import org.apache.abdera.i18n.iri.IRIHelper;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMException;
@@ -54,7 +53,7 @@
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 
-@SuppressWarnings("unchecked")
+@SuppressWarnings({"unchecked","deprecation"}) 
 public class FOMEntry
   extends FOMExtensibleElement 
   implements Entry {

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
Fri Feb  1 08:36:21 2008
@@ -65,7 +65,7 @@
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory;
 
-@SuppressWarnings("unchecked")
+@SuppressWarnings({"unchecked","deprecation"})
 public class FOMFactory 
   extends OMLinkedListImplFactory 
   implements Factory, Constants, ExtensionFactory {

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java
Fri Feb  1 08:36:21 2008
@@ -38,7 +38,6 @@
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMXMLParserWrapper;
 
-
 public class FOMFeed 
   extends FOMSource 
   implements Feed {
@@ -126,7 +125,7 @@
 
   public Source getAsSource() {
     FOMSource source = (FOMSource) ((FOMFactory)factory).newSource(null);
-    for (Iterator i = this.getChildElements(); i.hasNext();) {
+    for (Iterator<?> i = this.getChildElements(); i.hasNext();) {
       FOMElement child = (FOMElement)i.next();
       if (!child.getQName().equals(ENTRY)) {
         source.addChild((OMNode)child.clone());

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMService.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMService.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMService.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMService.java
Fri Feb  1 08:36:21 2008
@@ -34,6 +34,7 @@
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 
+@SuppressWarnings("deprecation") 
 public class FOMService
   extends FOMExtensibleElement 
   implements Service {

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?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- 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
Fri Feb  1 08:36:21 2008
@@ -49,7 +49,7 @@
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMXMLParserWrapper;
 
-@SuppressWarnings("unchecked")
+@SuppressWarnings({"unchecked","deprecation"})
 public class FOMSource
   extends FOMExtensibleElement 
   implements Source {

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=617552&r1=617551&r2=617552&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
Fri Feb  1 08:36:21 2008
@@ -32,6 +32,7 @@
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMXMLParserWrapper;
 
+@SuppressWarnings("unchecked") 
 public class FOMText 
   extends FOMElement 
   implements Text {

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMWorkspace.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMWorkspace.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMWorkspace.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMWorkspace.java
Fri Feb  1 08:36:21 2008
@@ -34,6 +34,7 @@
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 
+@SuppressWarnings("deprecation") 
 public class FOMWorkspace
   extends FOMExtensibleElement 
   implements Workspace {

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMElementIteratorWrapper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMElementIteratorWrapper.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMElementIteratorWrapper.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMElementIteratorWrapper.java
Fri Feb  1 08:36:21 2008
@@ -22,12 +22,13 @@
 import org.apache.abdera.model.Element;
 import org.apache.abdera.parser.stax.FOMFactory;
 
+@SuppressWarnings("unchecked") 
 public class FOMElementIteratorWrapper implements Iterator {
 
-  private final Iterator iterator;
+  private final Iterator<?> iterator;
   private final FOMFactory factory;
   
-  public FOMElementIteratorWrapper(FOMFactory factory, Iterator iterator) {
+  public FOMElementIteratorWrapper(FOMFactory factory, Iterator<?> iterator) {
     this.iterator = iterator;
     this.factory = factory;
   }

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMLinkIterator.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMLinkIterator.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMLinkIterator.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMLinkIterator.java
Fri Feb  1 08:36:21 2008
@@ -25,12 +25,26 @@
 
 public class FOMLinkIterator extends FOMElementIterator {
 
-  public FOMLinkIterator(Element parent, Class _class, QName attribute, String value, String
defaultValue) {
-    super(parent, _class, attribute, (value != null) ? FOMLink.getRelEquiv(value) : Link.REL_ALTERNATE,
defaultValue);
+  public FOMLinkIterator(
+    Element parent, 
+    Class<?> _class, 
+    QName attribute, 
+    String value, 
+    String defaultValue) {
+      super(
+        parent, 
+        _class, 
+        attribute, 
+        value != null ? 
+          FOMLink.getRelEquiv(value) : 
+          Link.REL_ALTERNATE, 
+        defaultValue);
   }
 
-  public FOMLinkIterator(Element parent, Class _class) {
-    super(parent, _class);
+  public FOMLinkIterator(
+    Element parent, 
+    Class<?> _class) {
+      super(parent, _class);
   }
 
   protected boolean isMatch(Element el) {

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/PrettyWriter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/PrettyWriter.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/PrettyWriter.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/PrettyWriter.java
Fri Feb  1 08:36:21 2008
@@ -40,6 +40,7 @@
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.util.StAXUtils;
 
+@SuppressWarnings("unchecked")
 public class PrettyWriter
   extends AbstractNamedWriter 
   implements NamedWriter {

Modified: incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java
(original)
+++ incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java
Fri Feb  1 08:36:21 2008
@@ -163,17 +163,7 @@
     entry2.addLink("/2003/12/13/atom03/1");
     entry2.setId("urn:uuid:1225c695-cfb8-4ebb-aaaa-80cb323feb5b", false);
     entry2.setSummary("A response");
-    
-    //TODO: we can't compare the serializations.  different 
-    // stax impls serialize with slight variances
-    //String compare = "<?xml version='1.0' encoding='UTF-8'?><a:feed xmlns:a=\"http://www.w3.org/2005/Atom\"
xml:base=\"http://example.org\" xml:lang=\"en-US\"><a:title type=\"text\">Example
Feed</a:title><a:link href=\"http://example.org/\" /><a:author><a:name>John
Doe</a:name></a:author><a:id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</a:id><a:contributor><a:name>Bob
Jones</a:name></a:contributor><a:category term=\"example\" /><a:entry><a:title
type=\"text\">re: Atom-Powered Robots Run Amok</a:title><a:link href=\"/2003/12/13/atom03/1\"
/><a:id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80cb323feb5b</a:id><a:summary type=\"text\">A
response</a:summary></a:entry><a:entry><a:title type=\"text\">Atom-Powered
Robots Run Amok</a:title><a:link href=\"http://example.org/2003/12/13/atom03\" /><a:id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</a:id><a:summary
type=\"text\">Some text.</a:summary></a:entry></a:feed>";
-    
-    //ByteArrayOutputStream out = new ByteArrayOutputStream(512);
-    //feed.getDocument().writeTo(out);
-    //String actual = out.toString();
-    
-    //assertEquals(actual, compare);
-    
+
     assertEquals(feed.getEntries().get(0).getId().toString(), "urn:uuid:1225c695-cfb8-4ebb-aaaa-80cb323feb5b");
     assertEquals(feed.getEntries().get(1).getId().toString(), "urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a");
     
@@ -371,7 +361,7 @@
     assertEquals(generator.getUri().toString(), Version.URI);
     Div div = factory.newDiv();
     assertNotNull(div);
-    Document doc = factory.newDocument();
+    Document<?> doc = factory.newDocument();
     assertNotNull(doc);
     Element el = factory.newEmail();
     assertNotNull(el);
@@ -712,7 +702,7 @@
     try {
       // Apply an XSLT transform to the entire Feed
       TransformerFactory factory = TransformerFactory.newInstance();
-      Document xslt = getParser().parse(FOMTest.class.getResourceAsStream("/test.xslt"));
+      Document<Element> xslt = getParser().parse(FOMTest.class.getResourceAsStream("/test.xslt"));
       AbderaSource xsltSource = new AbderaSource(xslt);
       Transformer transformer = factory.newTransformer(xsltSource);
       Document<Feed> feed = getParser().parse(FOMTest.class.getResourceAsStream("/simple.xml"));
@@ -745,7 +735,7 @@
     ByteArrayInputStream in = new ByteArrayInputStream(s.getBytes());
     Abdera abdera = new Abdera();
     Parser parser = abdera.getParser();
-    Document doc = parser.parse(in);
+    Document<Entry> doc = parser.parse(in);
     Entry entry = (Entry)(doc.getRoot().clone());
     assertEquals(entry.getContentType(), Content.Type.HTML);
   }

Modified: incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedParserTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedParserTest.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedParserTest.java
(original)
+++ incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedParserTest.java
Fri Feb  1 08:36:21 2008
@@ -42,7 +42,7 @@
   }
 
   @Test public void testAtom10Namespace() throws Exception {
-    Document doc = parse(baseURI.resolve("atom10_namespace.xml"));
+    Document<?> doc = parse(baseURI.resolve("atom10_namespace.xml"));
     assertNotNull(doc);
   }
   
@@ -55,16 +55,16 @@
   }
   
   @Test public void testEntryAuthorName() throws Exception {
-    Document doc = parse(baseURI.resolve("entry_author_name.xml"));
-    Feed feed = (Feed) doc.getRoot();
+    Document<Feed> doc = parse(baseURI.resolve("entry_author_name.xml"));
+    Feed feed = doc.getRoot();
     Entry entry = feed.getEntries().get(0);
     Person person = entry.getAuthor();
     assertEquals(person.getName(), "Example author");    
   }
   
   @Test public void testEntryContentBase64() throws Exception {
-    Document doc = parse(baseURI.resolve("entry_content_base64.xml"));
-    Feed feed = (Feed)doc.getRoot();
+    Document<Feed> doc = parse(baseURI.resolve("entry_content_base64.xml"));
+    Feed feed = doc.getRoot();
     Entry entry = feed.getEntries().get(0);
     Content mediaContent = entry.getContentElement();
     assertEquals(mediaContent.getMimeType().toString(), "application/octet-stream");
@@ -77,8 +77,8 @@
   }
   
   @Test public void testEntryContentBase642() throws Exception {
-    Document doc = parse(baseURI.resolve("entry_content_base64_2.xml"));
-    Feed feed = (Feed)doc.getRoot();
+    Document<Feed> doc = parse(baseURI.resolve("entry_content_base64_2.xml"));
+    Feed feed = doc.getRoot();
     Entry entry = feed.getEntries().get(0);
     Content mediaContent = entry.getContentElement();
     assertEquals(mediaContent.getMimeType().toString(), "application/octet-stream");

Modified: incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java
(original)
+++ incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java
Fri Feb  1 08:36:21 2008
@@ -250,7 +250,7 @@
   @Test public void testSection12MissingNamespace() throws Exception {
     //http://feedvalidator.org/testcases/atom/1.2/missing-namespace.xml
     IRI uri = baseURI.resolve("1.2/missing-namespace.xml");
-    Document doc = null;
+    Document<?> doc = null;
     doc = get(uri);
     assertNotNull(doc);
     assertFalse(doc.getRoot() instanceof Feed);
@@ -269,7 +269,7 @@
   @Test public void testSection12WrongNamespaceCase() throws Exception {
     //http://feedvalidator.org/testcases/atom/1.2/wrong-namespace-case.xml
     IRI uri = baseURI.resolve("1.2/wrong-namespace-case.xml");
-    Document doc = null;
+    Document<?> doc = null;
     doc = get(uri);
     assertNotNull(doc);
     assertFalse(doc.getRoot() instanceof Feed);
@@ -278,7 +278,7 @@
   @Test public void testSection12WrongNamespace() throws Exception {
     //http://feedvalidator.org/testcases/atom/1.2/wrong-namespace.xml
     IRI uri = baseURI.resolve("1.2/wrong-namespace.xml");
-    Document doc = null;
+    Document<?> doc = null;
     doc = get(uri);
     assertNotNull(doc);
     assertFalse(doc.getRoot() instanceof Feed);

Modified: incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/Encryption.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/Encryption.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/Encryption.java
(original)
+++ incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/Encryption.java
Fri Feb  1 08:36:21 2008
@@ -22,6 +22,7 @@
 /**
  * Interface used for encrypting/decrypting Abdera documents.  
  */
+@SuppressWarnings("unchecked")
 public interface Encryption {
 
   /**

Modified: incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/EncryptionBase.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/EncryptionBase.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/EncryptionBase.java
(original)
+++ incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/EncryptionBase.java
Fri Feb  1 08:36:21 2008
@@ -23,7 +23,7 @@
 import org.apache.abdera.security.Encryption;
 import org.apache.abdera.security.SecurityException;
 
-
+@SuppressWarnings("unchecked")
 public abstract class EncryptionBase 
   extends SecurityBase
   implements Encryption {

Modified: incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/SecurityBase.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/SecurityBase.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/SecurityBase.java
(original)
+++ incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/SecurityBase.java
Fri Feb  1 08:36:21 2008
@@ -30,7 +30,7 @@
 import org.apache.xml.serialize.Serializer;
 import org.apache.xml.serialize.XMLSerializer;
 
-
+@SuppressWarnings("unchecked")
 public abstract class SecurityBase {
   
   protected final Abdera abdera;

Modified: incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/xmlsec/XmlEncryption.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/xmlsec/XmlEncryption.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/xmlsec/XmlEncryption.java
(original)
+++ incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/xmlsec/XmlEncryption.java
Fri Feb  1 08:36:21 2008
@@ -29,7 +29,7 @@
 import org.apache.xml.security.encryption.XMLCipher;
 import org.apache.xml.security.keys.KeyInfo;
 
-
+@SuppressWarnings("unchecked")
 public class XmlEncryption 
   extends EncryptionBase {
 

Modified: incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/DefaultProviderDefinitionParser.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/DefaultProviderDefinitionParser.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/DefaultProviderDefinitionParser.java
(original)
+++ incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/DefaultProviderDefinitionParser.java
Fri Feb  1 08:36:21 2008
@@ -18,17 +18,11 @@
  */
 package org.apache.abdera.spring;
 
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.abdera.protocol.server.Provider;
-import org.apache.abdera.protocol.server.WorkspaceInfo;
-import org.apache.abdera.protocol.server.impl.DefaultProvider;
 import org.springframework.beans.factory.BeanDefinitionStoreException;
 import org.springframework.beans.factory.support.AbstractBeanDefinition;
 import org.springframework.beans.factory.support.BeanDefinitionBuilder;
 import org.springframework.beans.factory.xml.ParserContext;
-
 import org.w3c.dom.Element;
 
 public class DefaultProviderDefinitionParser 

Modified: incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/ProviderFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/ProviderFactoryBean.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/ProviderFactoryBean.java
(original)
+++ incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/ProviderFactoryBean.java
Fri Feb  1 08:36:21 2008
@@ -11,8 +11,9 @@
 import org.apache.abdera.protocol.server.impl.DefaultProvider;
 import org.springframework.beans.factory.FactoryBean;
 
+@SuppressWarnings("unchecked")
 public class ProviderFactoryBean implements FactoryBean {
-    private Class providerClass = DefaultProvider.class;
+    private Class<? extends DefaultProvider> providerClass = DefaultProvider.class;
     private String base;
     private Collection<WorkspaceInfo> workspaces;
     private Resolver<Target> targetResolver;
@@ -22,10 +23,11 @@
         DefaultProvider p = null;
         
         if (base != null) {
-            Constructor constructor = providerClass.getConstructor(String.class);
-            p = (DefaultProvider) constructor.newInstance(base);
+            Constructor<? extends DefaultProvider> constructor = 
+              providerClass.getConstructor(String.class);
+            p = constructor.newInstance(base);
         } else {
-            p = (DefaultProvider) providerClass.newInstance();
+            p = providerClass.newInstance();
         }
         
         if (workspaces != null && workspaces.size() > 0) {

Modified: incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/RegexTargetResolverFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/RegexTargetResolverFactoryBean.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/RegexTargetResolverFactoryBean.java
(original)
+++ incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/RegexTargetResolverFactoryBean.java
Fri Feb  1 08:36:21 2008
@@ -23,6 +23,7 @@
 import org.apache.abdera.protocol.server.impl.RegexTargetResolver;
 import org.springframework.beans.factory.FactoryBean;
 
+@SuppressWarnings("unchecked")
 public class RegexTargetResolverFactoryBean implements FactoryBean {
     private List<String> services;
     private List<String> collections;

Modified: incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/WorkspaceDefinitionParser.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/WorkspaceDefinitionParser.java?rev=617552&r1=617551&r2=617552&view=diff
==============================================================================
--- incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/WorkspaceDefinitionParser.java
(original)
+++ incubator/abdera/java/trunk/spring/src/main/java/org/apache/abdera/spring/WorkspaceDefinitionParser.java
Fri Feb  1 08:36:21 2008
@@ -23,12 +23,12 @@
 import org.springframework.beans.factory.support.BeanDefinitionBuilder;
 import org.springframework.beans.factory.support.ManagedList;
 import org.springframework.beans.factory.xml.ParserContext;
-
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
+@SuppressWarnings("unchecked")
 public class WorkspaceDefinitionParser 
     extends org.apache.abdera.spring.AbstractSingleBeanDefinitionParser {
 



Mime
View raw message