camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject svn commit: r1230684 [3/3] - in /camel/trunk: camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/builder/xml/ camel-core/src/main/java/org/apache/camel/component/bean/ camel-core/src/main/java/org/apache/camel/...
Date Thu, 12 Jan 2012 18:25:40 GMT
Modified: camel/trunk/components/camel-jibx/src/main/java/org/apache/camel/dataformat/jibx/JibxDataFormat.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jibx/src/main/java/org/apache/camel/dataformat/jibx/JibxDataFormat.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-jibx/src/main/java/org/apache/camel/dataformat/jibx/JibxDataFormat.java
(original)
+++ camel/trunk/components/camel-jibx/src/main/java/org/apache/camel/dataformat/jibx/JibxDataFormat.java
Thu Jan 12 18:25:36 2012
@@ -28,12 +28,12 @@ import org.jibx.runtime.IMarshallingCont
 import org.jibx.runtime.IUnmarshallingContext;
 
 public class JibxDataFormat implements DataFormat {
-    private Class unmarshallClass;
+    private Class<?> unmarshallClass;
 
     public JibxDataFormat() {
     }
 
-    public JibxDataFormat(Class unmarshallClass) {
+    public JibxDataFormat(Class<?> unmarshallClass) {
         this.setUnmarshallClass(unmarshallClass);
     }
 
@@ -50,11 +50,11 @@ public class JibxDataFormat implements D
         return unmarshallingContext.unmarshalDocument(stream, null);
     }
 
-    public Class getUnmarshallClass() {
+    public Class<?> getUnmarshallClass() {
         return unmarshallClass;
     }
 
-    public void setUnmarshallClass(Class unmarshallClass) {
+    public void setUnmarshallClass(Class<?> unmarshallClass) {
         this.unmarshallClass = unmarshallClass;
     }
 

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteRequestReplyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteRequestReplyTest.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteRequestReplyTest.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteRequestReplyTest.java
Thu Jan 12 18:25:36 2012
@@ -278,7 +278,7 @@ public class JmsRouteRequestReplyTest ex
         }
     }
 
-    public class Task implements Callable {
+    public class Task implements Callable<Task> {
         private AtomicInteger counter;
         private String fromUri;
         private volatile boolean ok = true;
@@ -289,7 +289,7 @@ public class JmsRouteRequestReplyTest ex
             this.fromUri = fromUri;
         }
 
-        public Object call() throws Exception {
+        public Task call() throws Exception {
             for (int i = 0; i < maxCalls; i++) {
                 int callId = counter.incrementAndGet();
                 Object reply = "";
@@ -445,7 +445,6 @@ public class JmsRouteRequestReplyTest ex
         runRequestReplyThreaded(endpointUriA);
     }
 
-    @SuppressWarnings("unchecked")
     protected void runRequestReplyThreaded(String fromUri) throws Exception {
         // start template
         template.start();

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/AbstractTransactionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/AbstractTransactionTest.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/AbstractTransactionTest.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/AbstractTransactionTest.java
Thu Jan 12 18:25:36 2012
@@ -82,7 +82,7 @@ public abstract class AbstractTransactio
         return assertIsInstanceOf(ConditionalExceptionProcessor.class, processor);
     }
 
-    protected Processor findProcessorByClass(Processor processor, Class findClass) {
+    protected Processor findProcessorByClass(Processor processor, Class<?> findClass)
{
         while (true) {
             processor = unwrapDeadLetter(processor);
 

Modified: camel/trunk/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiDataStoreRegistration.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiDataStoreRegistration.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiDataStoreRegistration.java
(original)
+++ camel/trunk/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiDataStoreRegistration.java
Thu Jan 12 18:25:36 2012
@@ -26,10 +26,10 @@ public class KratiDataStoreRegistration 
 
     private static final transient Logger LOG = LoggerFactory.getLogger(KratiDataStoreRegistration.class);
 
-    private final DataStore dataStore;
+    private final DataStore<byte[], byte[]> dataStore;
     private int registrationCount;
 
-    public KratiDataStoreRegistration(DataStore dataStore) {
+    public KratiDataStoreRegistration(DataStore<byte[], byte[]> dataStore) {
         this.dataStore = dataStore;
     }
 
@@ -50,7 +50,7 @@ public class KratiDataStoreRegistration 
         }
     }
 
-    public DataStore getDataStore() {
+    public DataStore<byte[], byte[]> getDataStore() {
         register();
         return dataStore;
     }

Modified: camel/trunk/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiEndpoint.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiEndpoint.java
(original)
+++ camel/trunk/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiEndpoint.java
Thu Jan 12 18:25:36 2012
@@ -48,7 +48,7 @@ public class KratiEndpoint extends Defau
     protected Serializer keySerializer = new KratiDefaultSerializer();
     protected Serializer valueSerializer = new KratiDefaultSerializer();
     protected SegmentFactory segmentFactory = new ChannelSegmentFactory();
-    protected HashFunction hashFunction = new FnvHashFunction();
+    protected HashFunction<byte[]> hashFunction = new FnvHashFunction();
 
     protected String path;
 
@@ -72,7 +72,7 @@ public class KratiEndpoint extends Defau
     }
 
     public Producer createProducer() throws Exception {
-        DataStore dataStore = null;
+        DataStore<byte[], byte[]> dataStore = null;
         KratiDataStoreRegistration registration = dataStoreRegistry.get(path);
         if (registration != null) {
             dataStore = registration.getDataStore();
@@ -85,7 +85,7 @@ public class KratiEndpoint extends Defau
     }
 
     public Consumer createConsumer(Processor processor) throws Exception {
-        DataStore dataStore = null;
+        DataStore<byte[], byte[]> dataStore = null;
         KratiDataStoreRegistration registration = dataStoreRegistry.get(path);
         if (registration != null) {
             dataStore = registration.getDataStore();
@@ -168,11 +168,11 @@ public class KratiEndpoint extends Defau
         this.segmentFactory = segmentFactory;
     }
 
-    public HashFunction getHashFunction() {
+    public HashFunction<byte[]> getHashFunction() {
         return hashFunction;
     }
 
-    public void setHashFunction(HashFunction hashFunction) {
+    public void setHashFunction(HashFunction<byte[]> hashFunction) {
         this.hashFunction = hashFunction;
     }
 

Modified: camel/trunk/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiHelper.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiHelper.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiHelper.java
(original)
+++ camel/trunk/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiHelper.java
Thu Jan 12 18:25:36 2012
@@ -50,9 +50,9 @@ public final class KratiHelper {
      * @param valueSerializer The serializer used for values,defaults to {@link org.apache.camel.component.krati.serializer.KratiDefaultSerializer}.
      * @return
      */
-    public static DataStore createDataStore(String path, int initialCapacity, int segmentFileSize,
SegmentFactory segmentFactory,
-                                            HashFunction hashFunction, Serializer keySerializer,
Serializer valueSerializer) {
-        DataStore result = null;
+    public static DataStore<byte[], byte[]> createDataStore(String path, int initialCapacity,
int segmentFileSize, SegmentFactory segmentFactory,
+                                            HashFunction<byte[]> hashFunction, Serializer
keySerializer, Serializer valueSerializer) {
+        DataStore<byte[], byte[]> result = null;
         File homeDir = new File(path);
         homeDir.mkdirs();
         try {
@@ -60,7 +60,7 @@ public final class KratiHelper {
             storeConfig.setSegmentFactory(segmentFactory);
             storeConfig.setHashFunction(hashFunction);
             storeConfig.setSegmentFileSizeMB(segmentFileSize);
-            DataStore dynamicDataStore = new DynamicDataStore(storeConfig);
+            DataStore<byte[], byte[]> dynamicDataStore = new DynamicDataStore(storeConfig);
             result = new SerializableObjectStore(dynamicDataStore, keySerializer, valueSerializer);
         } catch (Exception e) {
             throw new RuntimeCamelException("Failed to create Krati DataStore.", e);
@@ -77,8 +77,8 @@ public final class KratiHelper {
      * @param segmentFactory  The segment factory, defaults to {@link krati.core.segment.ChannelSegmentFactory}.
      * @return
      */
-    public static DataSet createDataSet(String path, int initialCapacity, SegmentFactory
segmentFactory) {
-        DataSet result = null;
+    public static DataSet<byte[]> createDataSet(String path, int initialCapacity, SegmentFactory
segmentFactory) {
+        DataSet<byte[]> result = null;
         File homeDir = new File(path);
         homeDir.mkdirs();
         try {

Modified: camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
(original)
+++ camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
Thu Jan 12 18:25:36 2012
@@ -531,7 +531,7 @@ public class MailBinding {
 
     protected Map<String, Object> extractHeadersFromMail(Message mailMessage, Exchange
exchange) throws MessagingException {
         Map<String, Object> answer = new HashMap<String, Object>();
-        Enumeration names = mailMessage.getAllHeaders();
+        Enumeration<?> names = mailMessage.getAllHeaders();
 
         while (names.hasMoreElements()) {
             Header header = (Header) names.nextElement();

Modified: camel/trunk/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Helper.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Helper.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Helper.java
(original)
+++ camel/trunk/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Helper.java
Thu Jan 12 18:25:36 2012
@@ -16,11 +16,8 @@
  */
 package org.apache.camel.component.mina2;
 
-import java.util.concurrent.TimeUnit;
-import java.util.logging.Level;
 import org.apache.camel.CamelExchangeException;
 import org.apache.camel.Exchange;
-import org.apache.mina.core.future.WriteFuture;
 import org.apache.mina.core.session.IoSession;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

Modified: camel/trunk/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2EncodingTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2EncodingTest.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2EncodingTest.java
(original)
+++ camel/trunk/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2EncodingTest.java
Thu Jan 12 18:25:36 2012
@@ -18,10 +18,8 @@ package org.apache.camel.component.mina2
 
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
-import org.apache.camel.FailedToCreateRouteException;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
-import org.apache.camel.ResolveEndpointFailedException;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.junit.Test;

Modified: camel/trunk/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjComponent.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjComponent.java
(original)
+++ camel/trunk/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjComponent.java
Thu Jan 12 18:25:36 2012
@@ -16,15 +16,12 @@
  */
 package org.apache.camel.component.quickfixj;
 
-import java.net.URI;
-import java.net.URISyntaxException;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.camel.Endpoint;
 import org.apache.camel.impl.DefaultComponent;
-import org.apache.camel.util.UnsafeUriCharactersEncoder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import quickfix.LogFactory;

Modified: camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala
(original)
+++ camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala
Thu Jan 12 18:25:36 2012
@@ -45,7 +45,7 @@ trait DSL {
 
   def filter(predicate: Exchange => Any) : SFilterDefinition
 
-  def handle[E](block: => Unit)(implicit manifest: Manifest[E]) : SOnExceptionDefinition
+  def handle[E <: Throwable](block: => Unit)(implicit manifest: Manifest[E]) : SOnExceptionDefinition[E]
 
   def id(id : String): DSL
   def idempotentConsumer(expression: Exchange => Any): SIdempotentConsumerDefinition

Modified: camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
(original)
+++ camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
Thu Jan 12 18:25:36 2012
@@ -74,7 +74,7 @@ abstract class SAbstractDefinition[P <: 
 
   def filter(predicate: Exchange => Any) = SFilterDefinition(target.filter(predicateBuilder(predicate)))
 
-  def handle[E](block: => Unit)(implicit manifest: Manifest[E]) = SOnExceptionDefinition(target.onException(manifest.erasure)).apply(block)
+  def handle[E <: Throwable](block: => Unit)(implicit manifest: Manifest[E]) = SOnExceptionDefinition[E](target.onException(manifest.erasure.asInstanceOf[Class[Throwable]])).apply(block)
 
   def id(id : String) = wrap(target.id(id))
   def idempotentConsumer(expression: Exchange => Any) = SIdempotentConsumerDefinition(target.idempotentConsumer(expression,
null))

Modified: camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SOnExceptionDefinition.scala
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SOnExceptionDefinition.scala?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SOnExceptionDefinition.scala
(original)
+++ camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SOnExceptionDefinition.scala
Thu Jan 12 18:25:36 2012
@@ -25,9 +25,9 @@ import org.apache.camel.Exchange
 /**
  * Scala enrichment for Camel's OnExceptionDefinition
  */
-case class SOnExceptionDefinition(override val target: OnExceptionDefinition)(implicit val
builder: RouteBuilder) extends SAbstractDefinition[OnExceptionDefinition] {
+case class SOnExceptionDefinition[E <: Throwable](override val target: OnExceptionDefinition)(implicit
val builder: RouteBuilder) extends SAbstractDefinition[OnExceptionDefinition] {
 
-  override def apply(block: => Unit) = super.apply(block).asInstanceOf[SOnExceptionDefinition]
+  override def apply(block: => Unit) = super.apply(block).asInstanceOf[SOnExceptionDefinition[E]]
 
   def handled = wrap(target.handled(true))
   def handled(predicate: Exchange => Any) = wrap(target.handled(predicateBuilder(predicate)))
@@ -45,6 +45,6 @@ case class SOnExceptionDefinition(overri
 
   def useOriginalMessage = wrap(target.useOriginalMessage)
 
-  override def wrap(block: => Unit) = super.wrap(block).asInstanceOf[SOnExceptionDefinition]
+  override def wrap(block: => Unit) = super.wrap(block).asInstanceOf[SOnExceptionDefinition[E]]
   
 }

Modified: camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/STryDefinition.scala
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/STryDefinition.scala?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/STryDefinition.scala
(original)
+++ camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/STryDefinition.scala
Thu Jan 12 18:25:36 2012
@@ -26,7 +26,7 @@ case class STryDefinition(override val t
   
   override def apply(block: => Unit) : STryDefinition = super.apply(block).asInstanceOf[STryDefinition]
   
-  def handle[Target](exception: Class[Target]) = {
+  def handle[E <: Throwable](exception: Class[E]) = {
     target.doCatch(exception)
     this
   }

Modified: camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
(original)
+++ camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
Thu Jan 12 18:25:36 2012
@@ -82,9 +82,9 @@ class RouteBuilder extends Preamble with
    * This is done a bit differently - the implicit manifest parameter forces us to define
the block in the same
    * method definition
    */
-  def handle[E](block: => Unit)(implicit manifest: Manifest[E]) = {
+  def handle[E <: Throwable](block: => Unit)(implicit manifest: Manifest[E]) = {
     stack.size match {
-      case 0 => SOnExceptionDefinition(builder.onException(manifest.erasure))(this).apply(block)
+      case 0 => SOnExceptionDefinition[E](builder.onException(manifest.erasure.asInstanceOf[Class[Throwable]]))(this).apply(block)
       case _ => stack.top.handle[E](block)
     }
   }

Modified: camel/trunk/components/camel-script/src/main/java/org/apache/camel/script/osgi/Activator.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-script/src/main/java/org/apache/camel/script/osgi/Activator.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-script/src/main/java/org/apache/camel/script/osgi/Activator.java
(original)
+++ camel/trunk/components/camel-script/src/main/java/org/apache/camel/script/osgi/Activator.java
Thu Jan 12 18:25:36 2012
@@ -149,7 +149,7 @@ public class Activator implements Bundle
                 BufferedReader in = new BufferedReader(new InputStreamReader(configFile.openStream()));
                 String className = in.readLine();
                 in.close();
-                Class cls = bundle.loadClass(className);
+                Class<?> cls = bundle.loadClass(className);
                 if (!ScriptEngineFactory.class.isAssignableFrom(cls)) {
                     throw new IllegalStateException("Invalid ScriptEngineFactory: " + cls.getName());
                 }

Modified: camel/trunk/components/camel-sip/src/main/java/org/apache/camel/component/sip/SipConfiguration.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-sip/src/main/java/org/apache/camel/component/sip/SipConfiguration.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-sip/src/main/java/org/apache/camel/component/sip/SipConfiguration.java
(original)
+++ camel/trunk/components/camel-sip/src/main/java/org/apache/camel/component/sip/SipConfiguration.java
Thu Jan 12 18:25:36 2012
@@ -327,7 +327,7 @@ public class SipConfiguration {    
     }
 
     private void createViaHeaders() throws ParseException, InvalidArgumentException {
-        viaHeaders = new ArrayList();
+        viaHeaders = new ArrayList<ViaHeader>();
         ViaHeader viaHeader = headerFactory.createViaHeader(getFromHost(), getFromPort(),
                 getTransport(), null);
 

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/osgi/CamelNamespaceHandler.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/osgi/CamelNamespaceHandler.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/osgi/CamelNamespaceHandler.java
(original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/osgi/CamelNamespaceHandler.java
Thu Jan 12 18:25:36 2012
@@ -27,8 +27,8 @@ public class CamelNamespaceHandler exten
     }
 
     // It just add the package of the class for initiate the JAXB context
-    protected Set<Class> getJaxbPackages() {
-        Set<Class> classes = new HashSet<Class>();
+    protected Set<Class<?>> getJaxbPackages() {
+        Set<Class<?>> classes = new HashSet<Class<?>>();
         classes.add(CamelContextFactoryBean.class);
         classes.add(org.apache.camel.spring.CamelContextFactoryBean.class);
         classes.add(org.apache.camel.ExchangePattern.class);

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
(original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
Thu Jan 12 18:25:36 2012
@@ -77,7 +77,7 @@ import static org.apache.camel.util.Obje
 @XmlAccessorType(XmlAccessType.FIELD)
 @SuppressWarnings("unused")
 public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<SpringCamelContext>
-        implements FactoryBean, InitializingBean, DisposableBean, ApplicationContextAware,
ApplicationListener {
+        implements FactoryBean<SpringCamelContext>, InitializingBean, DisposableBean,
ApplicationContextAware, ApplicationListener<ApplicationEvent> {
     private static final Logger LOG = LoggerFactory.getLogger(CamelContextFactoryBean.class);
 
     @XmlAttribute(name = "depends-on", required = false)

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelRouteContextFactoryBean.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelRouteContextFactoryBean.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelRouteContextFactoryBean.java
(original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelRouteContextFactoryBean.java
Thu Jan 12 18:25:36 2012
@@ -32,17 +32,17 @@ import org.springframework.beans.factory
  */
 @XmlRootElement(name = "routeContext")
 @XmlAccessorType(XmlAccessType.FIELD)
-public class CamelRouteContextFactoryBean extends IdentifiedType implements FactoryBean {
+public class CamelRouteContextFactoryBean extends IdentifiedType implements FactoryBean<List<RouteDefinition>>
{
 
     @XmlElement(name = "route", required = true)
     private List<RouteDefinition> routes = new ArrayList<RouteDefinition>();
 
-    public Object getObject() throws Exception {
+    public List<RouteDefinition> getObject() throws Exception {
         return routes;
     }
 
-    public Class getObjectType() {
-        return List.class;
+    public Class<?> getObjectType() {
+        return routes.getClass();
     }
 
     public boolean isSingleton() {

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/ErrorHandlerType.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/ErrorHandlerType.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/ErrorHandlerType.java
(original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/ErrorHandlerType.java
Thu Jan 12 18:25:36 2012
@@ -41,7 +41,7 @@ public enum ErrorHandlerType {
      *
      * @return the class which represents the selected type.
      */
-    public Class getTypeAsClass() {
+    public Class<?> getTypeAsClass() {
         switch (this) {
         case DefaultErrorHandler:
             return DefaultErrorHandlerBuilder.class;

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/PackageScanRouteBuilderFinder.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/PackageScanRouteBuilderFinder.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/PackageScanRouteBuilderFinder.java
(original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/PackageScanRouteBuilderFinder.java
Thu Jan 12 18:25:36 2012
@@ -57,7 +57,7 @@ public class PackageScanRouteBuilderFind
      */
     public void appendBuilders(List<RoutesBuilder> list) throws IllegalAccessException,
InstantiationException {
         Set<Class<?>> classes = resolver.findImplementations(RoutesBuilder.class,
packages);
-        for (Class aClass : classes) {
+        for (Class<?> aClass : classes) {
             LOG.trace("Found RouteBuilder class: {}", aClass);
 
             // certain beans should be ignored
@@ -72,7 +72,8 @@ public class PackageScanRouteBuilderFind
             }
 
             // type is valid so create and instantiate the builder
-            RoutesBuilder builder = instantiateBuilder(aClass);
+            @SuppressWarnings("unchecked")
+            RoutesBuilder builder = instantiateBuilder((Class<? extends RoutesBuilder>)
aClass);
             if (beanPostProcessor != null) {
                 // Inject the annotated resource
                 beanPostProcessor.postProcessBeforeInitialization(builder, builder.toString());
@@ -86,7 +87,7 @@ public class PackageScanRouteBuilderFind
      * Lets ignore beans that are explicitly configured in the Spring XML files
      */
     protected boolean shouldIgnoreBean(Class<?> type) {
-        Map beans = applicationContext.getBeansOfType(type, true, true);
+        Map<String, ?> beans = applicationContext.getBeansOfType(type, true, true);
         if (beans == null || beans.isEmpty()) {
             return false;
         }
@@ -96,7 +97,7 @@ public class PackageScanRouteBuilderFind
     /**
      * Returns <tt>true</tt>if the class is a public, non-abstract class
      */
-    protected boolean isValidClass(Class type) {
+    protected boolean isValidClass(Class<?> type) {
         // should skip non public classes
         if (!Modifier.isPublic(type.getModifiers())) {
             return false;
@@ -108,8 +109,7 @@ public class PackageScanRouteBuilderFind
         return false;
     }
 
-    @SuppressWarnings("unchecked")
-    protected RoutesBuilder instantiateBuilder(Class type) throws IllegalAccessException,
InstantiationException {
-        return (RoutesBuilder) camelContext.getInjector().newInstance(type);
+    protected RoutesBuilder instantiateBuilder(Class<? extends RoutesBuilder> type)
throws IllegalAccessException, InstantiationException {
+        return camelContext.getInjector().newInstance(type);
     }
 }

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/BeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/BeanDefinitionParser.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/BeanDefinitionParser.java
(original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/BeanDefinitionParser.java
Thu Jan 12 18:25:36 2012
@@ -32,7 +32,7 @@ import org.springframework.util.StringUt
  * @version 
  */
 public class BeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
-    private final Class type;
+    private final Class<?> type;
     private final boolean assignId;
 
     /**
@@ -42,12 +42,12 @@ public class BeanDefinitionParser extend
      * @param assignId whether to allow assigning id from the id attribute on the type
      *                 (there must be getter/setter id on type class).
      */
-    public BeanDefinitionParser(Class type, boolean assignId) {
+    public BeanDefinitionParser(Class<?> type, boolean assignId) {
         this.type = type;
         this.assignId = assignId;
     }
 
-    protected Class getBeanClass(Element element) {
+    protected Class<?> getBeanClass(Element element) {
         return type;
     }
 

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java
(original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java
Thu Jan 12 18:25:36 2012
@@ -124,7 +124,7 @@ public class CamelNamespaceHandler exten
 
         // camel context
         boolean osgi = false;
-        Class cl = CamelContextFactoryBean.class;
+        Class<?> cl = CamelContextFactoryBean.class;
         try {
             Class<?> c = Class.forName("org.apache.camel.osgi.Activator");
             Method mth = c.getDeclaredMethod("getBundle");
@@ -176,7 +176,7 @@ public class CamelNamespaceHandler exten
 
     protected JAXBContext createJaxbContext() throws JAXBException {
         StringBuilder packages = new StringBuilder();
-        for (Class cl : getJaxbPackages()) {
+        for (Class<?> cl : getJaxbPackages()) {
             if (packages.length() > 0) {
                 packages.append(":");
             }
@@ -185,8 +185,8 @@ public class CamelNamespaceHandler exten
         return JAXBContext.newInstance(packages.toString(), getClass().getClassLoader());
     }
 
-    protected Set<Class> getJaxbPackages() {
-        Set<Class> classes = new HashSet<Class>();
+    protected Set<Class<?>> getJaxbPackages() {
+        Set<Class<?>> classes = new HashSet<Class<?>>();
         classes.add(org.apache.camel.spring.CamelContextFactoryBean.class);
         classes.add(CamelJMXAgentDefinition.class);
         classes.add(org.apache.camel.ExchangePattern.class);
@@ -273,7 +273,7 @@ public class CamelNamespaceHandler exten
 
     protected class CamelContextBeanDefinitionParser extends BeanDefinitionParser {
 
-        public CamelContextBeanDefinitionParser(Class type) {
+        public CamelContextBeanDefinitionParser(Class<?> type) {
             super(type, false);
         }
 

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/ErrorHandlerDefinitionParser.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/ErrorHandlerDefinitionParser.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/ErrorHandlerDefinitionParser.java
(original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/ErrorHandlerDefinitionParser.java
Thu Jan 12 18:25:36 2012
@@ -42,7 +42,7 @@ public class ErrorHandlerDefinitionParse
         super(null, false);
     }
 
-    protected Class getBeanClass(Element element) {
+    protected Class<?> getBeanClass(Element element) {
         ErrorHandlerType type = ErrorHandlerType.DefaultErrorHandler;
 
         if (ObjectHelper.isNotEmpty(element.getAttribute("type"))) {
@@ -177,7 +177,7 @@ public class ErrorHandlerDefinitionParse
     
     protected class RedeliveryPolicyDefinitionParser extends BeanDefinitionParser {
 
-        public RedeliveryPolicyDefinitionParser(Class type) {
+        public RedeliveryPolicyDefinitionParser(Class<?> type) {
             super(type, false);
         }
 

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/remoting/CamelProxyFactoryBean.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/remoting/CamelProxyFactoryBean.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/remoting/CamelProxyFactoryBean.java
(original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/remoting/CamelProxyFactoryBean.java
Thu Jan 12 18:25:36 2012
@@ -34,7 +34,7 @@ import org.springframework.remoting.supp
 /**
  * A {@link FactoryBean} to create a Proxy to a a Camel Pojo Endpoint.
  */
-public class CamelProxyFactoryBean extends UrlBasedRemoteAccessor implements FactoryBean,
CamelContextAware, DisposableBean, ApplicationContextAware {
+public class CamelProxyFactoryBean extends UrlBasedRemoteAccessor implements FactoryBean<Object>,
CamelContextAware, DisposableBean, ApplicationContextAware {
     private String serviceRef;
     private CamelContext camelContext;
     private String camelContextId;
@@ -83,7 +83,7 @@ public class CamelProxyFactoryBean exten
         ServiceHelper.stopService(producer);
     }
 
-    public Class getServiceInterface() {
+    public Class<?> getServiceInterface() {
         return super.getServiceInterface();
     }
 
@@ -95,7 +95,7 @@ public class CamelProxyFactoryBean exten
         return serviceProxy;
     }
 
-    public Class getObjectType() {
+    public Class<?> getObjectType() {
         return getServiceInterface();
     }
 

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/util/MainRunner.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/util/MainRunner.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/util/MainRunner.java
(original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/util/MainRunner.java
Thu Jan 12 18:25:36 2012
@@ -92,11 +92,11 @@ public class MainRunner implements Initi
         this.asyncRun = asyncRun;
     }
 
-    public Class getMain() {
+    public Class<?> getMain() {
         return main;
     }
 
-    public void setMain(Class main) {
+    public void setMain(Class<?> main) {
         this.main = main;
     }
 

Modified: camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/JAXBContextResolver.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/JAXBContextResolver.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/JAXBContextResolver.java
(original)
+++ camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/JAXBContextResolver.java
Thu Jan 12 18:25:36 2012
@@ -41,7 +41,7 @@ public  class JAXBContextResolver implem
         this.context = JAXBContext.newInstance(packages);
     }
 
-    public JAXBContext getContext(Class objectType) {
+    public JAXBContext getContext(Class<?> objectType) {
         Package aPackage = objectType.getPackage();
         if (aPackage != null) {
             String name = aPackage.getName();

Modified: camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/JAXBContextResolverOSGI.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/JAXBContextResolverOSGI.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/JAXBContextResolverOSGI.java
(original)
+++ camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/JAXBContextResolverOSGI.java
Thu Jan 12 18:25:36 2012
@@ -40,7 +40,7 @@ public final class JAXBContextResolverOS
         
     }
     
-    public JAXBContext getContext(Class objectType) {
+    public JAXBContext getContext(Class<?> objectType) {
         Package aPackage = objectType.getPackage();
         if (aPackage != null) {
             String name = aPackage.getName();

Modified: camel/trunk/examples/camel-example-cxf-osgi/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cxf-osgi/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cxf-osgi/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java
(original)
+++ camel/trunk/examples/camel-example-cxf-osgi/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java
Thu Jan 12 18:25:36 2012
@@ -32,11 +32,11 @@ public class ReportIncidentRoutesClientT
 
     // should be the same address as we have in our route
     private static final String URL = "http://localhost:%s/cxf/camel-example-cxf-osgi/webservices/incident";
-    private static final int port = AvailablePortFinder.getNextAvailable(9100);
+    private static final int PORT = AvailablePortFinder.getNextAvailable(9100);
     
     @BeforeClass
     public static void setUpBeforeClass() {
-        System.setProperty("port", String.valueOf(port));
+        System.setProperty("port", String.valueOf(PORT));
     }
     
     @AfterClass
@@ -66,7 +66,7 @@ public class ReportIncidentRoutesClientT
         input.setPhone("0045 2962 7576");
 
         // create the webservice client and send the request
-        ReportIncidentEndpoint client = createCXFClient(String.format(URL, port));
+        ReportIncidentEndpoint client = createCXFClient(String.format(URL, PORT));
         OutputReportIncident out = client.reportIncident(input);
 
         // assert we got a OK back

Modified: camel/trunk/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/queue/version/BankResponseAggregationStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/queue/version/BankResponseAggregationStrategy.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/queue/version/BankResponseAggregationStrategy.java
(original)
+++ camel/trunk/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/queue/version/BankResponseAggregationStrategy.java
Thu Jan 12 18:25:36 2012
@@ -17,7 +17,6 @@
 package org.apache.camel.loanbroker.queue.version;
 
 import org.apache.camel.Exchange;
-import org.apache.camel.loanbroker.webservice.version.bank.BankQuote;
 import org.apache.camel.processor.aggregate.AggregationStrategy;
 
 //START SNIPPET: aggregation

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java
(original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java
Thu Jan 12 18:25:36 2012
@@ -95,6 +95,7 @@ public class JpaRouteTest extends OSGiIn
         // must type cast with Spring 2.x
         jpaTemplate = applicationContext.getBean("jpaTemplate", JpaTemplate.class);
 
+        @SuppressWarnings("rawtypes")
         List list = jpaTemplate.find(SELECT_ALL_STRING);
         assertEquals(1, list.size());
         
@@ -109,8 +110,9 @@ public class JpaRouteTest extends OSGiIn
         transactionTemplate.setTransactionManager(new JpaTransactionManager(jpaTemplate.getEntityManagerFactory()));
         transactionTemplate.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
 
-        transactionTemplate.execute(new TransactionCallback() {
-            public Object doInTransaction(TransactionStatus arg0) {
+        transactionTemplate.execute(new TransactionCallback<Boolean>() {
+            public Boolean doInTransaction(TransactionStatus arg0) {
+                @SuppressWarnings("rawtypes")
                 List list = jpaTemplate.find(SELECT_ALL_STRING);
                 for (Object item : list) {
                     jpaTemplate.remove(item);

Modified: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/JettyFailoverRoundRobinTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/JettyFailoverRoundRobinTest.java?rev=1230684&r1=1230683&r2=1230684&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/JettyFailoverRoundRobinTest.java
(original)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/JettyFailoverRoundRobinTest.java
Thu Jan 12 18:25:36 2012
@@ -21,7 +21,6 @@ import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.test.AvailablePortFinder;
 import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.BeforeClass;
 import org.junit.Test;
 
 /**



Mime
View raw message