camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject svn commit: r1231420 [4/4] - in /camel/trunk: camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/component/bean/ camel-core/src/main/java/org/apache/camel/component/mock/ camel-core/src/main/java/org/apache/cam...
Date Sat, 14 Jan 2012 00:13:16 GMT
Modified: camel/trunk/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java
(original)
+++ camel/trunk/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java
Sat Jan 14 00:13:10 2012
@@ -58,13 +58,13 @@ public abstract class CamelBlueprintTest
 
     private BundleContext bundleContext;
 
-	@Override
+    @Override
     protected void setUp() throws Exception {
         System.setProperty("org.bundles.framework.storage", "target/bundles/" + System.currentTimeMillis());
         List<BundleDescriptor> bundles = new ClasspathScanner().scanForBundles("(Bundle-SymbolicName=*)");
         TinyBundle bundle = createTestBundle();
         bundles.add(getBundleDescriptor("target/test-bundle.jar", bundle));
-        Map config = new HashMap();
+        Map<String, List<BundleDescriptor>> config = new HashMap<String, List<BundleDescriptor>>();
         config.put(PojoServiceRegistryFactory.BUNDLE_DESCRIPTORS, bundles);
         PojoServiceRegistry reg = new PojoServiceRegistryFactoryImpl().newPojoServiceRegistry(config);
         bundleContext = reg.getBundleContext();
@@ -95,7 +95,7 @@ public abstract class CamelBlueprintTest
     protected void tearDown() throws Exception {
         super.tearDown();
         bundleContext.getBundle().stop();
-	}
+    }
 
     protected <T> T getOsgiService(Class<T> type, long timeout) {
         return getOsgiService(type, null, timeout);
@@ -129,7 +129,7 @@ public abstract class CamelBlueprintTest
             // This is buggy, as the service reference may change i think
             Object svc = type.cast(tracker.waitForService(timeout));
             if (svc == null) {
-                Dictionary dic = bundleContext.getBundle().getHeaders();
+                Dictionary<?, ?> dic = bundleContext.getBundle().getHeaders();
                 System.err.println("Test bundle headers: " + explode(dic));
 
                 for (ServiceReference ref : asCollection(bundleContext.getAllServiceReferences(null,
null))) {
@@ -153,8 +153,8 @@ public abstract class CamelBlueprintTest
     /*
      * Explode the dictionary into a ,-delimited list of key=value pairs
      */
-    private static String explode(Dictionary dictionary) {
-        Enumeration keys = dictionary.keys();
+    private static String explode(Dictionary<?, ?> dictionary) {
+        Enumeration<?> keys = dictionary.keys();
         StringBuffer result = new StringBuffer();
         while (keys.hasMoreElements()) {
             Object key = keys.nextElement();
@@ -169,7 +169,7 @@ public abstract class CamelBlueprintTest
     /*
      * Provides an iterable collection of references, even if the original array is null
      */
-    private static final Collection<ServiceReference> asCollection(ServiceReference[]
references) {
+    private static Collection<ServiceReference> asCollection(ServiceReference[] references)
{
         List<ServiceReference> result = new LinkedList<ServiceReference>();
         if (references != null) {
             for (ServiceReference reference : references) {
@@ -186,7 +186,7 @@ public abstract class CamelBlueprintTest
         fos.close();
         JarInputStream jis = new JarInputStream(new FileInputStream(file));
         Map<String, String> headers = new HashMap<String, String>();
-        for (Map.Entry entry : jis.getManifest().getMainAttributes().entrySet()) {
+        for (Map.Entry<Object, Object> entry : jis.getManifest().getMainAttributes().entrySet())
{
             headers.put(entry.getKey().toString(), entry.getValue().toString());
         }
         return new BundleDescriptor(
@@ -202,8 +202,8 @@ public abstract class CamelBlueprintTest
     public static long copy(final InputStream input, final OutputStream output, int buffersize)
throws IOException {
         final byte[] buffer = new byte[buffersize];
         int n;
-        long count=0;
-        while (-1 != (n = input.read(buffer))) {
+        long count = 0;
+        while ((n = input.read(buffer)) != -1) {
             output.write(buffer, 0, n);
             count += n;
         }

Modified: camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java
(original)
+++ camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java
Sat Jan 14 00:13:10 2012
@@ -45,7 +45,6 @@ import org.apache.camel.management.JmxSy
 import org.apache.camel.model.ModelCamelContext;
 import org.apache.camel.model.ProcessorDefinition;
 import org.apache.camel.spi.Language;
-import org.apache.camel.spring.CamelBeanPostProcessor;
 import org.apache.camel.util.StopWatch;
 import org.apache.camel.util.TimeUtils;
 
@@ -279,7 +278,6 @@ public abstract class CamelTestSupport e
         return new JndiRegistry(createJndiContext());
     }
 
-    @SuppressWarnings("unchecked")
     protected Context createJndiContext() throws Exception {
         Properties properties = new Properties();
 
@@ -292,7 +290,7 @@ public abstract class CamelTestSupport e
             // set the default initial factory
             properties.put("java.naming.factory.initial", "org.apache.camel.util.jndi.CamelInitialContextFactory");
         }
-        return new InitialContext(new Hashtable(properties));
+        return new InitialContext(new Hashtable<Object, Object>(properties));
     }
 
     /**
@@ -497,7 +495,7 @@ public abstract class CamelTestSupport e
      * @param id           the id of the definition
      * @param shortName    the short name of the definition
      */
-    protected void debugBefore(Exchange exchange, Processor processor, ProcessorDefinition
definition,
+    protected void debugBefore(Exchange exchange, Processor processor, ProcessorDefinition<?>
definition,
                                String id, String shortName) {
     }
 
@@ -511,7 +509,7 @@ public abstract class CamelTestSupport e
      * @param shortName    the short name of the definition
      * @param timeTaken    time taken to process the processor in millis
      */
-    protected void debugAfter(Exchange exchange, Processor processor, ProcessorDefinition
definition,
+    protected void debugAfter(Exchange exchange, Processor processor, ProcessorDefinition<?>
definition,
                               String id, String shortName, long timeTaken) {
     }
 
@@ -521,12 +519,12 @@ public abstract class CamelTestSupport e
     private class DebugBreakpoint extends BreakpointSupport {
 
         @Override
-        public void beforeProcess(Exchange exchange, Processor processor, ProcessorDefinition
definition) {
+        public void beforeProcess(Exchange exchange, Processor processor, ProcessorDefinition<?>
definition) {
             CamelTestSupport.this.debugBefore(exchange, processor, definition, definition.getId(),
definition.getShortName());
         }
 
         @Override
-        public void afterProcess(Exchange exchange, Processor processor, ProcessorDefinition
definition, long timeTaken) {
+        public void afterProcess(Exchange exchange, Processor processor, ProcessorDefinition<?>
definition, long timeTaken) {
             CamelTestSupport.this.debugAfter(exchange, processor, definition, definition.getId(),
definition.getShortName(), timeTaken);
         }
     }

Modified: camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java
(original)
+++ camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java
Sat Jan 14 00:13:10 2012
@@ -425,7 +425,6 @@ public abstract class CamelTestSupport e
         return new JndiRegistry(createJndiContext());
     }
 
-    @SuppressWarnings("unchecked")
     protected Context createJndiContext() throws Exception {
         Properties properties = new Properties();
 
@@ -437,7 +436,7 @@ public abstract class CamelTestSupport e
         } else {            
             properties.put("java.naming.factory.initial", "org.apache.camel.util.jndi.CamelInitialContextFactory");
         }
-        return new InitialContext(new Hashtable(properties));
+        return new InitialContext(new Hashtable<Object, Object>(properties));
     }
 
     /**
@@ -634,14 +633,14 @@ public abstract class CamelTestSupport e
     /**
      * Single step debugs and Camel invokes this method before entering the given processor
      */
-    protected void debugBefore(Exchange exchange, Processor processor, ProcessorDefinition
definition,
+    protected void debugBefore(Exchange exchange, Processor processor, ProcessorDefinition<?>
definition,
                                String id, String label) {
     }
 
     /**
      * Single step debugs and Camel invokes this method after processing the given processor
      */
-    protected void debugAfter(Exchange exchange, Processor processor, ProcessorDefinition
definition,
+    protected void debugAfter(Exchange exchange, Processor processor, ProcessorDefinition<?>
definition,
                               String id, String label, long timeTaken) {
     }
 
@@ -651,12 +650,12 @@ public abstract class CamelTestSupport e
     private class DebugBreakpoint extends BreakpointSupport {
 
         @Override
-        public void beforeProcess(Exchange exchange, Processor processor, ProcessorDefinition
definition) {
+        public void beforeProcess(Exchange exchange, Processor processor, ProcessorDefinition<?>
definition) {
             CamelTestSupport.this.debugBefore(exchange, processor, definition, definition.getId(),
definition.getLabel());
         }
 
         @Override
-        public void afterProcess(Exchange exchange, Processor processor, ProcessorDefinition
definition, long timeTaken) {
+        public void afterProcess(Exchange exchange, Processor processor, ProcessorDefinition<?>
definition, long timeTaken) {
             CamelTestSupport.this.debugAfter(exchange, processor, definition, definition.getId(),
definition.getLabel(), timeTaken);
         }
     }

Modified: camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/CamelTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/CamelTestSupport.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/CamelTestSupport.java
(original)
+++ camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/CamelTestSupport.java
Sat Jan 14 00:13:10 2012
@@ -442,7 +442,7 @@ public abstract class CamelTestSupport e
         } else {
             properties.put("java.naming.factory.initial", "org.apache.camel.util.jndi.CamelInitialContextFactory");
         }
-        return new InitialContext(new Hashtable(properties));
+        return new InitialContext(new Hashtable<Object, Object>(properties));
     }
 
     /**
@@ -639,14 +639,14 @@ public abstract class CamelTestSupport e
     /**
      * Single step debugs and Camel invokes this method before entering the given processor
      */
-    protected void debugBefore(Exchange exchange, Processor processor, ProcessorDefinition
definition,
+    protected void debugBefore(Exchange exchange, Processor processor, ProcessorDefinition<?>
definition,
                                String id, String label) {
     }
 
     /**
      * Single step debugs and Camel invokes this method after processing the given processor
      */
-    protected void debugAfter(Exchange exchange, Processor processor, ProcessorDefinition
definition,
+    protected void debugAfter(Exchange exchange, Processor processor, ProcessorDefinition<?>
definition,
                               String id, String label, long timeTaken) {
     }
 
@@ -656,12 +656,12 @@ public abstract class CamelTestSupport e
     private class DebugBreakpoint extends BreakpointSupport {
 
         @Override
-        public void beforeProcess(Exchange exchange, Processor processor, ProcessorDefinition
definition) {
+        public void beforeProcess(Exchange exchange, Processor processor, ProcessorDefinition<?>
definition) {
             CamelTestSupport.this.debugBefore(exchange, processor, definition, definition.getId(),
definition.getLabel());
         }
 
         @Override
-        public void afterProcess(Exchange exchange, Processor processor, ProcessorDefinition
definition, long timeTaken) {
+        public void afterProcess(Exchange exchange, Processor processor, ProcessorDefinition<?>
definition, long timeTaken) {
             CamelTestSupport.this.debugAfter(exchange, processor, definition, definition.getId(),
definition.getLabel(), timeTaken);
         }
     }

Modified: camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/JMXRouteStatistics.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/JMXRouteStatistics.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/JMXRouteStatistics.java
(original)
+++ camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/JMXRouteStatistics.java
Sat Jan 14 00:13:10 2012
@@ -38,7 +38,6 @@ public class JMXRouteStatistics implemen
 
     private static final Logger LOG = LoggerFactory.getLogger(JMXRouteStatistics.class);
 
-    @SuppressWarnings("unchecked")
     public Object getRouteStatistic(CamelContext camelContext, String routeID, String attribute)
{
         // only possible if JMX is enabled
         if (!(camelContext.getManagementStrategy() instanceof ManagedManagementStrategy))
{
@@ -50,7 +49,7 @@ public class JMXRouteStatistics implemen
             String domain = camelContext.getManagementStrategy().getManagementAgent().getMBeanObjectDomainName();
 
             ObjectName objName = new ObjectName(domain + ":type=routes,*");
-            List<ObjectName> cacheList = new LinkedList(server.queryNames(objName,
null));
+            List<ObjectName> cacheList = new LinkedList<ObjectName>(server.queryNames(objName,
null));
             for (Iterator<ObjectName> iter = cacheList.iterator(); iter.hasNext();)
{
                 objName = iter.next();
                 String keyProps = objName.getCanonicalKeyPropertyListString();

Modified: camel/trunk/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/AbstractXStreamWrapper.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/AbstractXStreamWrapper.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/AbstractXStreamWrapper.java
(original)
+++ camel/trunk/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/AbstractXStreamWrapper.java
Sat Jan 14 00:13:10 2012
@@ -107,14 +107,14 @@ public abstract class AbstractXStreamWra
                     Class<Converter> converterClass = resolver.resolveMandatoryClass(name,
Converter.class);
                     Converter converter;
 
-                    Constructor con = null;
+                    Constructor<Converter> con = null;
                     try {
                         con = converterClass.getDeclaredConstructor(new Class[] {XStream.class});
                     } catch (Exception e) {
                          //swallow as we null check in a moment.
                     }
                     if (con != null) {
-                        converter = (Converter) con.newInstance(xstream);
+                        converter = con.newInstance(xstream);
                     } else {
                         converter = converterClass.newInstance();
                         try { 

Modified: camel/trunk/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/JsonDataFormat.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/JsonDataFormat.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/JsonDataFormat.java
(original)
+++ camel/trunk/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/JsonDataFormat.java
Sat Jan 14 00:13:10 2012
@@ -47,7 +47,7 @@ public class JsonDataFormat extends Abst
     private final MappedXMLInputFactory mif;
     
     public JsonDataFormat() {
-        final Map nstjsons = new HashMap();
+        final Map<?, ?> nstjsons = new HashMap<Object, Object>();
         mof = new MappedXMLOutputFactory(nstjsons);
         mif = new MappedXMLInputFactory(nstjsons);
     }

Modified: camel/trunk/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/XStreamConfigurationTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/XStreamConfigurationTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/XStreamConfigurationTest.java
(original)
+++ camel/trunk/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/XStreamConfigurationTest.java
Sat Jan 14 00:13:10 2012
@@ -177,6 +177,7 @@ public class XStreamConfigurationTest ex
 
     public static class PurchaseOrderConverter implements Converter {
 
+        @SuppressWarnings("rawtypes")
         public boolean canConvert(Class type) {
             return PurchaseOrder.class.isAssignableFrom(type);
         }
@@ -213,6 +214,7 @@ public class XStreamConfigurationTest ex
             return null;
         }
 
+        @SuppressWarnings("rawtypes")
         public boolean canConvert(Class type) {
             return false;
         }
@@ -238,6 +240,7 @@ public class XStreamConfigurationTest ex
             return null;
         }
 
+        @SuppressWarnings("rawtypes")
         public boolean canConvert(Class type) {
             return false;
         }

Modified: camel/trunk/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/completers/CamelContextCompleter.java
URL: http://svn.apache.org/viewvc/camel/trunk/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/completers/CamelContextCompleter.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/completers/CamelContextCompleter.java
(original)
+++ camel/trunk/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/completers/CamelContextCompleter.java
Sat Jan 14 00:13:10 2012
@@ -34,7 +34,7 @@ public class CamelContextCompleter imple
         this.camelController = camelController;
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({"unchecked", "rawtypes"})
     public int complete(String buffer, int cursor, List candidates) {
         try {
             StringsCompleter delegate = new StringsCompleter();

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java
(original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java
Sat Jan 14 00:13:10 2012
@@ -70,6 +70,7 @@ public abstract class AbstractIntegratio
             // This is buggy, as the service reference may change i think
             Object svc = type.cast(tracker.waitForService(timeout));
             if (svc == null) {
+                @SuppressWarnings("rawtypes")
                 Dictionary dic = bundleContext.getBundle().getHeaders();
                 System.err.println("Test bundle headers: " + explode(dic));
 
@@ -111,8 +112,8 @@ public abstract class AbstractIntegratio
     /*
      * Explode the dictionary into a ,-delimited list of key=value pairs
      */
-    private static String explode(Dictionary dictionary) {
-        Enumeration keys = dictionary.keys();
+    private static String explode(Dictionary<?, ?> dictionary) {
+        Enumeration<?> keys = dictionary.keys();
         StringBuffer result = new StringBuffer();
         while (keys.hasMoreElements()) {
             Object key = keys.nextElement();

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/WrappedJMSCacheLoader.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/WrappedJMSCacheLoader.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/WrappedJMSCacheLoader.java
(original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/WrappedJMSCacheLoader.java
Sat Jan 14 00:13:10 2012
@@ -84,11 +84,13 @@ public class WrappedJMSCacheLoader imple
         return jmsCacheLoader.load(arg0, arg1);
     }
 
+    @SuppressWarnings("rawtypes")
     @Override
     public Map loadAll(Collection arg0) {
         return jmsCacheLoader.loadAll(arg0);
     }
 
+    @SuppressWarnings("rawtypes")
     @Override
     public Map loadAll(Collection arg0, Object arg1) {
         return jmsCacheLoader.loadAll(arg0, arg1);

Modified: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncTest.java
(original)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncTest.java
Sat Jan 14 00:13:10 2012
@@ -37,7 +37,7 @@ public class HttpAsyncTest extends HttpA
         mock.expectedBodiesReceived("Claus", "Bye World");
 
         // Send a async request/reply message to the http endpoint
-        Future future = template.asyncRequestBody("http://0.0.0.0:" + getPort() + "/myservice",
"Hello World");
+        Future<Object> future = template.asyncRequestBody("http://0.0.0.0:" + getPort()
+ "/myservice", "Hello World");
 
         // We got the future so in the meantime we can do other stuff, as this is Camel
         // so lets invoke another request/reply route but this time is synchronous

Modified: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelGreeterConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelGreeterConsumerTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelGreeterConsumerTest.java
(original)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelGreeterConsumerTest.java
Sat Jan 14 00:13:10 2012
@@ -59,7 +59,7 @@ public class CamelGreeterConsumerTest ex
         Object result = template.sendBodyAndHeader("cxf://bean:serviceEndpoint", ExchangePattern.InOut
, 
                                                    params, CxfConstants.OPERATION_NAME, "greetMe");
         assertTrue("Result is a list instance ", result instanceof List);
-        assertEquals("Get the wrong response", ((List)result).get(0), "HelloWillem");
+        assertEquals("Get the wrong response", ((List<?>)result).get(0), "HelloWillem");
         try {
             template.sendBodyAndHeader("cxf://bean:serviceEndpoint", ExchangePattern.InOut
, 
                                             params, CxfConstants.OPERATION_NAME, "pingMe");

Modified: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/hawtdb/JmsToHawtDBAggregateTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/hawtdb/JmsToHawtDBAggregateTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/hawtdb/JmsToHawtDBAggregateTest.java
(original)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/hawtdb/JmsToHawtDBAggregateTest.java
Sat Jan 14 00:13:10 2012
@@ -43,7 +43,6 @@ public class JmsToHawtDBAggregateTest ex
     }
 
     @Test
-    @SuppressWarnings("unchecked")
     public void testJmsToHawtDBAggregateTest() throws Exception {
         // number of rounds can be adjusted
         int count = 30;
@@ -55,7 +54,7 @@ public class JmsToHawtDBAggregateTest ex
         getMockEndpoint("mock:result").expectsNoDuplicates(header("counter"));
 
         for (int i = 0; i < count; i++) {
-            Map map = new HashMap();
+            Map<String, Object> map = new HashMap<String, Object>();
             map.put("counter", i);
             map.put("group", "foo");
 

Modified: camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java
URL: http://svn.apache.org/viewvc/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java
(original)
+++ camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java
Sat Jan 14 00:13:10 2012
@@ -359,7 +359,7 @@ public class DotMojo extends AbstractMav
                 getLog().info("Running Camel embedded to load Spring XML files from default
path: META-INF/spring/*.xml");
             }
 
-            List list = project.getTestClasspathElements();
+            List<?> list = project.getTestClasspathElements();
             getLog().debug("Using classpath: " + list);
 
             EmbeddedMojo mojo = new EmbeddedMojo();

Modified: camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/EmbeddedMojo.java
URL: http://svn.apache.org/viewvc/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/EmbeddedMojo.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/EmbeddedMojo.java
(original)
+++ camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/EmbeddedMojo.java
Sat Jan 14 00:13:10 2012
@@ -96,7 +96,7 @@ public class EmbeddedMojo extends Abstra
      * @required
      * @readonly
      */
-    private List classpathElements;
+    private List<?> classpathElements;
 
     /**
      * The main class to execute.
@@ -151,11 +151,11 @@ public class EmbeddedMojo extends Abstra
         this.outputDirectory = inOutputDirectory;
     }
 
-    public List getClasspathElements() {
+    public List<?> getClasspathElements() {
         return classpathElements;
     }
 
-    public void setClasspathElements(List classpathElements) {
+    public void setClasspathElements(List<?> classpathElements) {
         this.classpathElements = classpathElements;
     }
 

Modified: camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java
URL: http://svn.apache.org/viewvc/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java
(original)
+++ camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java
Sat Jan 14 00:13:10 2012
@@ -493,9 +493,9 @@ public class RunMojo extends AbstractExe
         boolean foundNonDaemon;
         do {
             foundNonDaemon = false;
-            Collection threads = getActiveThreads(threadGroup);
-            for (Iterator iter = threads.iterator(); iter.hasNext();) {
-                Thread thread = (Thread)iter.next();
+            Collection<Thread> threads = getActiveThreads(threadGroup);
+            for (Iterator<Thread> iter = threads.iterator(); iter.hasNext();) {
+                Thread thread = iter.next();
                 if (thread.isDaemon()) {
                     continue;
                 }
@@ -636,9 +636,9 @@ public class RunMojo extends AbstractExe
         }
 
         try {
-            Iterator iter = this.determineRelevantPluginDependencies().iterator();
+            Iterator<Artifact> iter = this.determineRelevantPluginDependencies().iterator();
             while (iter.hasNext()) {
-                Artifact classPathElement = (Artifact)iter.next();
+                Artifact classPathElement = iter.next();
                 getLog().debug("Adding plugin dependency artifact: " + classPathElement.getArtifactId()
                                    + " to classpath");
                 path.add(classPathElement.getFile().toURI().toURL());
@@ -671,9 +671,9 @@ public class RunMojo extends AbstractExe
                 // MEXEC-17
                 dependencies.addAll(getAllNonTestScopedDependencies());
 
-                Iterator iter = dependencies.iterator();
+                Iterator<Artifact> iter = dependencies.iterator();
                 while (iter.hasNext()) {
-                    Artifact classPathElement = (Artifact)iter.next();
+                    Artifact classPathElement = iter.next();
                     getLog().debug("Adding project dependency artifact: " + classPathElement.getArtifactId()
                                        + " to classpath");
                     File file = classPathElement.getFile();
@@ -708,7 +708,7 @@ public class RunMojo extends AbstractExe
     private Collection<Artifact> getAllDependencies() throws MojoExecutionException
{
         List<Artifact> artifacts = new ArrayList<Artifact>();
 
-        for (Iterator dependencies = project.getDependencies().iterator(); dependencies.hasNext();)
{
+        for (Iterator<?> dependencies = project.getDependencies().iterator(); dependencies.hasNext();)
{
             Dependency dependency = (Dependency)dependencies.next();
 
             String groupId = dependency.getGroupId();
@@ -740,7 +740,7 @@ public class RunMojo extends AbstractExe
             }
 
             List<String> exclusions = new ArrayList<String>();
-            for (Iterator j = dependency.getExclusions().iterator(); j.hasNext();) {
+            for (Iterator<?> j = dependency.getExclusions().iterator(); j.hasNext();)
{
                 Exclusion e = (Exclusion)j.next();
                 exclusions.add(e.getGroupId() + ":" + e.getArtifactId());
             }

Modified: camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/DotMojo.java
URL: http://svn.apache.org/viewvc/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/DotMojo.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/DotMojo.java
(original)
+++ camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/DotMojo.java
Sat Jan 14 00:13:10 2012
@@ -339,7 +339,7 @@ public class DotMojo extends AbstractMav
         if (runCamel) {
             getLog().info("Running Camel embedded to load jndi.properties file from the classpath");
 
-            List list = project.getTestClasspathElements();
+            List<?> list = project.getTestClasspathElements();
             getLog().debug("Using classpath: " + list);
 
             EmbeddedMojo mojo = new EmbeddedMojo();

Modified: camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java
URL: http://svn.apache.org/viewvc/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java
(original)
+++ camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java
Sat Jan 14 00:13:10 2012
@@ -81,7 +81,7 @@ public class EmbeddedMojo extends Abstra
      * @required
      * @readonly
      */
-    private List classpathElements;
+    private List<?> classpathElements;
 
     /**
      * The main class to execute.
@@ -136,11 +136,11 @@ public class EmbeddedMojo extends Abstra
         this.outputDirectory = inOutputDirectory;
     }
 
-    public List getClasspathElements() {
+    public List<?> getClasspathElements() {
         return classpathElements;
     }
 
-    public void setClasspathElements(List classpathElements) {
+    public void setClasspathElements(List<?> classpathElements) {
         this.classpathElements = classpathElements;
     }
 

Modified: camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java
URL: http://svn.apache.org/viewvc/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java
(original)
+++ camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java
Sat Jan 14 00:13:10 2012
@@ -132,7 +132,7 @@ public class RunMojo extends AbstractExe
     /**
      * @parameter expression="${project.remoteArtifactRepositories}"
      */
-    private List remoteRepositories;
+    private List<?> remoteRepositories;
 
     /**
      * @component
@@ -447,9 +447,9 @@ public class RunMojo extends AbstractExe
         boolean foundNonDaemon;
         do {
             foundNonDaemon = false;
-            Collection threads = getActiveThreads(threadGroup);
-            for (Iterator iter = threads.iterator(); iter.hasNext();) {
-                Thread thread = (Thread)iter.next();
+            Collection<Thread> threads = getActiveThreads(threadGroup);
+            for (Iterator<Thread> iter = threads.iterator(); iter.hasNext();) {
+                Thread thread = iter.next();
                 if (thread.isDaemon()) {
                     continue;
                 }
@@ -590,9 +590,9 @@ public class RunMojo extends AbstractExe
         }
 
         try {
-            Iterator iter = this.determineRelevantPluginDependencies().iterator();
+            Iterator<Artifact> iter = this.determineRelevantPluginDependencies().iterator();
             while (iter.hasNext()) {
-                Artifact classPathElement = (Artifact)iter.next();
+                Artifact classPathElement = iter.next();
                 getLog().debug("Adding plugin dependency artifact: " + classPathElement.getArtifactId()
                                    + " to classpath");
                 path.add(classPathElement.getFile().toURI().toURL());
@@ -625,9 +625,9 @@ public class RunMojo extends AbstractExe
                 // MEXEC-17
                 dependencies.addAll(getAllNonTestScopedDependencies());
 
-                Iterator iter = dependencies.iterator();
+                Iterator<Artifact> iter = dependencies.iterator();
                 while (iter.hasNext()) {
-                    Artifact classPathElement = (Artifact)iter.next();
+                    Artifact classPathElement = iter.next();
                     getLog().debug("Adding project dependency artifact: " + classPathElement.getArtifactId()
                                        + " to classpath");
                     File file = classPathElement.getFile();
@@ -662,7 +662,7 @@ public class RunMojo extends AbstractExe
     private Collection<Artifact> getAllDependencies() throws MojoExecutionException
{
         List<Artifact> artifacts = new ArrayList<Artifact>();
 
-        for (Iterator dependencies = project.getDependencies().iterator(); dependencies.hasNext();)
{
+        for (Iterator<?> dependencies = project.getDependencies().iterator(); dependencies.hasNext();)
{
             Dependency dependency = (Dependency)dependencies.next();
 
             String groupId = dependency.getGroupId();
@@ -694,7 +694,7 @@ public class RunMojo extends AbstractExe
             }
 
             List<String> exclusions = new ArrayList<String>();
-            for (Iterator j = dependency.getExclusions().iterator(); j.hasNext();) {
+            for (Iterator<?> j = dependency.getExclusions().iterator(); j.hasNext();)
{
                 Exclusion e = (Exclusion)j.next();
                 exclusions.add(e.getGroupId() + ":" + e.getArtifactId());
             }



Mime
View raw message