camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject svn commit: r834590 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/component/vm/ components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/ components/camel-jaxb/src/test/java/org/apache/camel/example/
Date Tue, 10 Nov 2009 18:39:42 GMT
Author: hadrian
Date: Tue Nov 10 18:39:41 2009
New Revision: 834590

URL: http://svn.apache.org/viewvc?rev=834590&view=rev
Log:
Long running effort to remove warnings

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/component/vm/VmComponent.java
    camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java
    camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbConverter.java
    camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java
    camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/MessageDefinition.java
    camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/DataFormatTest.java
    camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/InvalidOrderException.java
    camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatTest.java
    camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatWithMarshalAndUnmarshalUsingRefTest.java
    camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatWithMarshalAndUnmarshalUsingSpringBeanTest.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/component/vm/VmComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/vm/VmComponent.java?rev=834590&r1=834589&r2=834590&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/component/vm/VmComponent.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/component/vm/VmComponent.java Tue
Nov 10 18:39:41 2009
@@ -35,7 +35,7 @@
  * @version $Revision$
  */
 public class VmComponent extends SedaComponent {
-    protected static final Map<String, BlockingQueue> QUEUES = new HashMap<String,
BlockingQueue>();
+    protected static final Map<String, BlockingQueue<Exchange>> QUEUES = new
HashMap<String, BlockingQueue<Exchange>>();
     private static final AtomicInteger START_COUNTER = new AtomicInteger();
 
     @Override
@@ -69,12 +69,11 @@
         super.doStop();
         if (START_COUNTER.decrementAndGet() == 0) {
             synchronized (QUEUES) {
-                for (BlockingQueue q : QUEUES.values()) {
+                for (BlockingQueue<Exchange> q : QUEUES.values()) {
                     q.clear();
                 }
                 QUEUES.clear();
             }
         }
     }
-
 }

Modified: camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java?rev=834590&r1=834589&r2=834590&view=diff
==============================================================================
--- camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java
(original)
+++ camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java
Tue Nov 10 18:39:41 2009
@@ -46,7 +46,7 @@
  */
 public class FallbackTypeConverter implements TypeConverter, TypeConverterAware {
     private static final transient Log LOG = LogFactory.getLog(FallbackTypeConverter.class);
-    private Map<Class, JAXBContext> contexts = new HashMap<Class, JAXBContext>();
+    private Map<Class<?>, JAXBContext> contexts = new HashMap<Class<?>,
JAXBContext>();
     private TypeConverter parentTypeConverter;
     private boolean prettyPrint = true;
 

Modified: camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbConverter.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbConverter.java?rev=834590&r1=834589&r2=834590&view=diff
==============================================================================
--- camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbConverter.java
(original)
+++ camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbConverter.java
Tue Nov 10 18:39:41 2009
@@ -38,7 +38,7 @@
  */
 public final class JaxbConverter {
     private XmlConverter xmlConverter = new XmlConverter();
-    private Map<Class, JAXBContext> contexts = new HashMap<Class, JAXBContext>();
+    private Map<Class<?>, JAXBContext> contexts = new HashMap<Class<?>,
JAXBContext>();
 
     @Converter
     public JAXBSource toSource(@HasAnnotation(XmlRootElement.class)Object value) throws JAXBException
{
@@ -76,7 +76,7 @@
     }
 
     private synchronized JAXBContext getJaxbContext(Object value) throws JAXBException {
-        Class type = value.getClass();
+        Class<?> type = value.getClass();
         JAXBContext context = contexts.get(type);
         if (context == null) {
             context = JAXBContext.newInstance(type);
@@ -84,5 +84,4 @@
         }
         return context;
     }
-
 }

Modified: camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java?rev=834590&r1=834589&r2=834590&view=diff
==============================================================================
--- camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java
(original)
+++ camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java
Tue Nov 10 18:39:41 2009
@@ -80,7 +80,7 @@
             // must create a new instance of unmarshaller as its not thread safe
             Object answer = getContext().createUnmarshaller().unmarshal(stream);
             if (answer instanceof JAXBElement && isIgnoreJAXBElement()) {
-                answer = ((JAXBElement)answer).getValue();
+                answer = ((JAXBElement<?>)answer).getValue();
             }
             return answer;
         } catch (JAXBException e) {

Modified: camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/MessageDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/MessageDefinition.java?rev=834590&r1=834589&r2=834590&view=diff
==============================================================================
--- camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/MessageDefinition.java
(original)
+++ camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/MessageDefinition.java
Tue Nov 10 18:39:41 2009
@@ -30,6 +30,7 @@
 import javax.xml.bind.annotation.XmlTransient;
 
 import org.apache.camel.Message;
+import org.apache.camel.util.CastUtils;
 
 /**
  * Represents a JAXB2 representation of a Camel {@link Message} - <b>Important</b>:
work in progress!
@@ -46,7 +47,7 @@
     List<HeaderDefinition> headers = new ArrayList<HeaderDefinition>();
     @XmlAnyElement(lax = true)
     @XmlMixed
-    private List content = new ArrayList();
+    private List<Object> content = new ArrayList<Object>();
     @XmlTransient
     private Object body;
 
@@ -66,9 +67,10 @@
     public void setBody(Object body) {
         this.body = body;
         if (body instanceof List) {
-            content = (List)body;
+            List<Object> cont = CastUtils.cast((List<?>)body);
+            content = cont;
         } else {
-            content = new ArrayList();
+            content = new ArrayList<Object>();
             content.add(body);
         }
     }

Modified: camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/DataFormatTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/DataFormatTest.java?rev=834590&r1=834589&r2=834590&view=diff
==============================================================================
--- camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/DataFormatTest.java
(original)
+++ camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/DataFormatTest.java
Tue Nov 10 18:39:41 2009
@@ -22,7 +22,6 @@
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.converter.jaxb.JaxbDataFormat;
 import org.apache.camel.foo.bar.PersonType;
-import org.apache.camel.spi.DataFormat;
 
 /**
  * @version $Revision$

Modified: camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/InvalidOrderException.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/InvalidOrderException.java?rev=834590&r1=834589&r2=834590&view=diff
==============================================================================
--- camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/InvalidOrderException.java
(original)
+++ camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/InvalidOrderException.java
Tue Nov 10 18:39:41 2009
@@ -20,9 +20,9 @@
  * @version $Revision$
  */
 public class InvalidOrderException extends Exception {
+    private static final long serialVersionUID = 383958238537555588L;
 
     public InvalidOrderException(String message) {
         super(message);
     }
-    
 }

Modified: camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatTest.java?rev=834590&r1=834589&r2=834590&view=diff
==============================================================================
--- camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatTest.java
(original)
+++ camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatTest.java
Tue Nov 10 18:39:41 2009
@@ -21,8 +21,6 @@
 
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
-import static org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied;
-
 /**
  * @version $Revision$
  */

Modified: camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatWithMarshalAndUnmarshalUsingRefTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatWithMarshalAndUnmarshalUsingRefTest.java?rev=834590&r1=834589&r2=834590&view=diff
==============================================================================
--- camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatWithMarshalAndUnmarshalUsingRefTest.java
(original)
+++ camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatWithMarshalAndUnmarshalUsingRefTest.java
Tue Nov 10 18:39:41 2009
@@ -16,13 +16,8 @@
  */
 package org.apache.camel.example;
 
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.spring.SpringTestSupport;
-
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
-import static org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied;
-
 /**
  * @version $Revision$
  */

Modified: camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatWithMarshalAndUnmarshalUsingSpringBeanTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatWithMarshalAndUnmarshalUsingSpringBeanTest.java?rev=834590&r1=834589&r2=834590&view=diff
==============================================================================
--- camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatWithMarshalAndUnmarshalUsingSpringBeanTest.java
(original)
+++ camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatWithMarshalAndUnmarshalUsingSpringBeanTest.java
Tue Nov 10 18:39:41 2009
@@ -16,13 +16,8 @@
  */
 package org.apache.camel.example;
 
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.spring.SpringTestSupport;
-
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
-import static org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied;
-
 /**
  * @version $Revision$
  */



Mime
View raw message