camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r938754 - in /camel/trunk/components/camel-jpa/src: main/java/org/apache/camel/component/jpa/ main/java/org/apache/camel/processor/idempotent/jpa/ test/java/org/apache/camel/component/jpa/ test/java/org/apache/camel/processor/interceptor/ t...
Date Wed, 28 Apr 2010 02:39:54 GMT
Author: ningjiang
Date: Wed Apr 28 02:39:54 2010
New Revision: 938754

URL: http://svn.apache.org/viewvc?rev=938754&view=rev
Log:
Clean up the @SuppressWarnings in camel-jpa

Modified:
    camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaTemplateTransactionStrategy.java
    camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/processor/idempotent/jpa/JpaMessageIdRepository.java
    camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java
    camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/QueryBuilderTest.java
    camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/interceptor/JpaTraceEventMessageTest.java
    camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/FileConsumerJpaIdempotentTest.java
    camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaBatchConsumerTest.java
    camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaFlushOnSendTest.java
    camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaIdempotentConsumerTest.java
    camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerConcurrentTest.java
    camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerNoBodyTest.java
    camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteConsumeLockEntityTest.java
    camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteMaximumResultsTest.java
    camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteTest.java
    camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRoutemaxMessagesPerPollTest.java
    camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaShutdownCompleteAllTasksTest.java
    camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaShutdownCompleteCurrentTaskOnlyTest.java

Modified: camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaTemplateTransactionStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaTemplateTransactionStrategy.java?rev=938754&r1=938753&r2=938754&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaTemplateTransactionStrategy.java
(original)
+++ camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaTemplateTransactionStrategy.java
Wed Apr 28 02:39:54 2010
@@ -73,6 +73,7 @@ public class JpaTemplateTransactionStrat
         return new JpaTemplateTransactionStrategy(template, tranasctionTemplate);
     }
 
+    @SuppressWarnings("unchecked")
     public Object execute(final JpaCallback callback) {
         return transactionTemplate.execute(new TransactionCallback() {
             public Object doInTransaction(TransactionStatus status) {

Modified: camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/processor/idempotent/jpa/JpaMessageIdRepository.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/processor/idempotent/jpa/JpaMessageIdRepository.java?rev=938754&r1=938753&r2=938754&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/processor/idempotent/jpa/JpaMessageIdRepository.java
(original)
+++ camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/processor/idempotent/jpa/JpaMessageIdRepository.java
Wed Apr 28 02:39:54 2010
@@ -63,6 +63,7 @@ public class JpaMessageIdRepository impl
         return transactionTemplate;
     }
 
+    @SuppressWarnings("unchecked")
     public boolean add(final String messageId) {
         // Run this in single transaction.
         Boolean rc = (Boolean)transactionTemplate.execute(new TransactionCallback() {
@@ -83,6 +84,7 @@ public class JpaMessageIdRepository impl
         return rc.booleanValue();
     }
 
+    @SuppressWarnings("unchecked")
     public boolean contains(final String messageId) {
         // Run this in single transaction.
         Boolean rc = (Boolean)transactionTemplate.execute(new TransactionCallback() {
@@ -98,6 +100,7 @@ public class JpaMessageIdRepository impl
         return rc.booleanValue();
     }
 
+    @SuppressWarnings("unchecked")
     public boolean remove(final String messageId) {
         Boolean rc = (Boolean)transactionTemplate.execute(new TransactionCallback() {
             public Object doInTransaction(TransactionStatus arg0) {

Modified: camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java?rev=938754&r1=938753&r2=938754&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java
(original)
+++ camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java
Wed Apr 28 02:39:54 2010
@@ -111,6 +111,7 @@ public class JpaWithNamedQueryTest exten
         Thread.sleep(1000);
 
         transactionStrategy.execute(new JpaCallback() {
+            @SuppressWarnings("unchecked")
             public Object doInJpa(EntityManager entityManager) throws PersistenceException
{
 
                 // now lets assert that there are still 2 entities left

Modified: camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/QueryBuilderTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/QueryBuilderTest.java?rev=938754&r1=938753&r2=938754&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/QueryBuilderTest.java
(original)
+++ camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/QueryBuilderTest.java
Wed Apr 28 02:39:54 2010
@@ -60,7 +60,7 @@ public class QueryBuilderTest extends Ca
     public void testQueryBuilderWithParametersMap() throws Exception {
         QueryBuilder q = QueryBuilder.query("select x from SendEmail x where x.id = :a");
         assertNotNull(q);
-        Map map = new HashMap();
+        Map<String, Object> map = new HashMap<String, Object>();
         map.put("a", 1);
         q.parameters(map);
         assertEquals("Query: select x from SendEmail x where x.id = :a Parameters: {a=1}",
q.toString());

Modified: camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/interceptor/JpaTraceEventMessageTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/interceptor/JpaTraceEventMessageTest.java?rev=938754&r1=938753&r2=938754&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/interceptor/JpaTraceEventMessageTest.java
(original)
+++ camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/interceptor/JpaTraceEventMessageTest.java
Wed Apr 28 02:39:54 2010
@@ -88,6 +88,7 @@ public class JpaTraceEventMessageTest ex
         assertEquals("mock://result", db.getToNode());
     }
 
+    @SuppressWarnings("unchecked")
     protected void cleanupRepository() {
         jpaTemplate = (JpaTemplate)applicationContext.getBean("jpaTemplate", JpaTemplate.class);
 

Modified: camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/FileConsumerJpaIdempotentTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/FileConsumerJpaIdempotentTest.java?rev=938754&r1=938753&r2=938754&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/FileConsumerJpaIdempotentTest.java
(original)
+++ camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/FileConsumerJpaIdempotentTest.java
Wed Apr 28 02:39:54 2010
@@ -71,6 +71,7 @@ public class FileConsumerJpaIdempotentTe
         };
     }
 
+    @SuppressWarnings("unchecked")
     protected void cleanupRepository() {
         jpaTemplate = (JpaTemplate)applicationContext.getBean("jpaTemplate", JpaTemplate.class);
 

Modified: camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaBatchConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaBatchConsumerTest.java?rev=938754&r1=938753&r2=938754&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaBatchConsumerTest.java
(original)
+++ camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaBatchConsumerTest.java
Wed Apr 28 02:39:54 2010
@@ -79,6 +79,7 @@ public class JpaBatchConsumerTest extend
         return SpringCamelContext.springCamelContext(applicationContext);
     }
 
+    @SuppressWarnings("unchecked")
     protected void cleanupRepository() {
         jpaTemplate = (JpaTemplate)applicationContext.getBean("jpaTemplate", JpaTemplate.class);
 

Modified: camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaFlushOnSendTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaFlushOnSendTest.java?rev=938754&r1=938753&r2=938754&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaFlushOnSendTest.java
(original)
+++ camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaFlushOnSendTest.java
Wed Apr 28 02:39:54 2010
@@ -80,6 +80,7 @@ public class JpaFlushOnSendTest extends 
         assertIsInstanceOf(SendEmail.class, list.get(0));
     }
 
+    @SuppressWarnings("unchecked")
     protected void cleanupRepository() {
         jpaTemplate = (JpaTemplate)applicationContext.getBean("jpaTemplate", JpaTemplate.class);
 

Modified: camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaIdempotentConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaIdempotentConsumerTest.java?rev=938754&r1=938753&r2=938754&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaIdempotentConsumerTest.java
(original)
+++ camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaIdempotentConsumerTest.java
Wed Apr 28 02:39:54 2010
@@ -67,6 +67,7 @@ public class JpaIdempotentConsumerTest e
         return false;
     }
 
+    @SuppressWarnings("unchecked")
     protected void cleanupRepository() {
         jpaTemplate = (JpaTemplate)applicationContext.getBean("jpaTemplate", JpaTemplate.class);
 
@@ -94,6 +95,7 @@ public class JpaIdempotentConsumerTest e
         resultEndpoint = getMockEndpoint("mock:result");
     }
 
+    @SuppressWarnings("unchecked")
     @Test
     public void testDuplicateMessagesAreFilteredOut() throws Exception {
         context.addRoutes(new SpringRouteBuilder() {
@@ -133,12 +135,13 @@ public class JpaIdempotentConsumerTest e
         assertTrue("Should contain message 3", ids.contains("3"));
     }
 
+    @SuppressWarnings("unchecked")
     @Test
     public void testFailedExchangesNotAdded() throws Exception {
         context.addRoutes(new SpringRouteBuilder() {
             @Override
             public void configure() throws Exception {
-                errorHandler(deadLetterChannel("mock:error").maximumRedeliveries(0).redeliverDelay(0).logStackTrace(false));
+                errorHandler(deadLetterChannel("mock:error").maximumRedeliveries(0).redeliveryDelay(0).logStackTrace(false));
 
                 from("direct:start").idempotentConsumer(
                         header("messageId"),

Modified: camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerConcurrentTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerConcurrentTest.java?rev=938754&r1=938753&r2=938754&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerConcurrentTest.java
(original)
+++ camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerConcurrentTest.java
Wed Apr 28 02:39:54 2010
@@ -64,7 +64,7 @@ public class JpaProducerConcurrentTest e
         getMockEndpoint("mock:result").assertNoDuplicates(body());
 
         ExecutorService executor = Executors.newFixedThreadPool(poolSize);
-        Map<Integer, Future> responses = new ConcurrentHashMap();
+        Map<Integer, Future> responses = new ConcurrentHashMap<Integer, Future>();
         for (int i = 0; i < files; i++) {
             final int index = i;
             Future out = executor.submit(new Callable<Object>() {
@@ -114,6 +114,7 @@ public class JpaProducerConcurrentTest e
         assertIsInstanceOf(SendEmail.class, list.get(0));
     }
 
+    @SuppressWarnings("unchecked")
     protected void cleanupRepository() {
         jpaTemplate = (JpaTemplate)applicationContext.getBean("jpaTemplate", JpaTemplate.class);
 

Modified: camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerNoBodyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerNoBodyTest.java?rev=938754&r1=938753&r2=938754&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerNoBodyTest.java
(original)
+++ camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerNoBodyTest.java
Wed Apr 28 02:39:54 2010
@@ -72,6 +72,7 @@ public class JpaProducerNoBodyTest exten
         };
     }
 
+    @SuppressWarnings("unchecked")
     protected void cleanupRepository() {
         jpaTemplate = (JpaTemplate)applicationContext.getBean("jpaTemplate", JpaTemplate.class);
 

Modified: camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteConsumeLockEntityTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteConsumeLockEntityTest.java?rev=938754&r1=938753&r2=938754&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteConsumeLockEntityTest.java
(original)
+++ camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteConsumeLockEntityTest.java
Wed Apr 28 02:39:54 2010
@@ -72,6 +72,7 @@ public class JpaRouteConsumeLockEntityTe
         };
     }
 
+    @SuppressWarnings("unchecked")
     protected void cleanupRepository() {
         jpaTemplate = (JpaTemplate)applicationContext.getBean("jpaTemplate", JpaTemplate.class);
 

Modified: camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteMaximumResultsTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteMaximumResultsTest.java?rev=938754&r1=938753&r2=938754&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteMaximumResultsTest.java
(original)
+++ camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteMaximumResultsTest.java
Wed Apr 28 02:39:54 2010
@@ -87,6 +87,7 @@ public class JpaRouteMaximumResultsTest 
         assertIsInstanceOf(SendEmail.class, list.get(0));
     }
 
+    @SuppressWarnings("unchecked")
     protected void cleanupRepository() {
         jpaTemplate = (JpaTemplate)applicationContext.getBean("jpaTemplate", JpaTemplate.class);
 

Modified: camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteTest.java?rev=938754&r1=938753&r2=938754&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteTest.java
(original)
+++ camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteTest.java
Wed Apr 28 02:39:54 2010
@@ -86,6 +86,7 @@ public class JpaRouteTest extends CamelT
         assertIsInstanceOf(SendEmail.class, list.get(0));
     }
 
+    @SuppressWarnings("unchecked")
     protected void cleanupRepository() {
         jpaTemplate = (JpaTemplate)applicationContext.getBean("jpaTemplate", JpaTemplate.class);
 

Modified: camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRoutemaxMessagesPerPollTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRoutemaxMessagesPerPollTest.java?rev=938754&r1=938753&r2=938754&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRoutemaxMessagesPerPollTest.java
(original)
+++ camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRoutemaxMessagesPerPollTest.java
Wed Apr 28 02:39:54 2010
@@ -84,6 +84,7 @@ public class JpaRoutemaxMessagesPerPollT
         assertIsInstanceOf(SendEmail.class, list.get(0));
     }
 
+    @SuppressWarnings("unchecked")
     protected void cleanupRepository() {
         jpaTemplate = (JpaTemplate)applicationContext.getBean("jpaTemplate", JpaTemplate.class);
 

Modified: camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaShutdownCompleteAllTasksTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaShutdownCompleteAllTasksTest.java?rev=938754&r1=938753&r2=938754&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaShutdownCompleteAllTasksTest.java
(original)
+++ camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaShutdownCompleteAllTasksTest.java
Wed Apr 28 02:39:54 2010
@@ -101,6 +101,7 @@ public class JpaShutdownCompleteAllTasks
         return SpringCamelContext.springCamelContext(applicationContext);
     }
 
+    @SuppressWarnings("unchecked")
     protected void cleanupRepository() {
         jpaTemplate = (JpaTemplate)applicationContext.getBean("jpaTemplate", JpaTemplate.class);
 

Modified: camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaShutdownCompleteCurrentTaskOnlyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaShutdownCompleteCurrentTaskOnlyTest.java?rev=938754&r1=938753&r2=938754&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaShutdownCompleteCurrentTaskOnlyTest.java
(original)
+++ camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaShutdownCompleteCurrentTaskOnlyTest.java
Wed Apr 28 02:39:54 2010
@@ -101,6 +101,7 @@ public class JpaShutdownCompleteCurrentT
         return SpringCamelContext.springCamelContext(applicationContext);
     }
 
+    @SuppressWarnings("unchecked")
     protected void cleanupRepository() {
         jpaTemplate = (JpaTemplate)applicationContext.getBean("jpaTemplate", JpaTemplate.class);
 



Mime
View raw message