camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [1/2] git commit: Fixed some eclipse warnings of camel-core
Date Fri, 07 Feb 2014 09:18:32 GMT
Updated Branches:
  refs/heads/master 0dfba40b9 -> 94dea7761


Fixed some eclipse warnings of camel-core


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/94dea776
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/94dea776
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/94dea776

Branch: refs/heads/master
Commit: 94dea77619b508e3ee02c73c060ce207e7a01e6f
Parents: 6641f18
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Fri Feb 7 17:18:01 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Fri Feb 7 17:18:11 2014 +0800

----------------------------------------------------------------------
 .../org/apache/camel/builder/xml/NodeListToDocumentTest.java  | 7 +------
 .../java/org/apache/camel/processor/SplitWithEndTest.java     | 1 -
 .../test/java/org/apache/camel/processor/ValidationTest.java  | 4 ++--
 .../AggregationStrategyBeanAdapterAllowNullTest.java          | 6 +++---
 ...gationStrategyBeanAdapterWithHeadersAndPropertiesTest.java | 4 ++--
 .../AggregationStrategyBeanAdapterWithHeadersTest.java        | 4 +---
 6 files changed, 9 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/94dea776/camel-core/src/test/java/org/apache/camel/builder/xml/NodeListToDocumentTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/builder/xml/NodeListToDocumentTest.java
b/camel-core/src/test/java/org/apache/camel/builder/xml/NodeListToDocumentTest.java
index b370307..444ee0f 100644
--- a/camel-core/src/test/java/org/apache/camel/builder/xml/NodeListToDocumentTest.java
+++ b/camel-core/src/test/java/org/apache/camel/builder/xml/NodeListToDocumentTest.java
@@ -16,15 +16,10 @@
  */
 package org.apache.camel.builder.xml;
 
-import org.w3c.dom.Document;
-import org.w3c.dom.NodeList;
-
-//import com.sun.org.apache.xerces.internal.dom.ElementNSImpl;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.junit.Ignore;
-
-import static org.apache.camel.builder.xml.XPathBuilder.xpath;
+//import com.sun.org.apache.xerces.internal.dom.ElementNSImpl;
 
 @Ignore("For manual testing CAMEL-6922")
 public class NodeListToDocumentTest extends ContextTestSupport {

http://git-wip-us.apache.org/repos/asf/camel/blob/94dea776/camel-core/src/test/java/org/apache/camel/processor/SplitWithEndTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/processor/SplitWithEndTest.java b/camel-core/src/test/java/org/apache/camel/processor/SplitWithEndTest.java
index b4b4792..c62d0bc 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/SplitWithEndTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/SplitWithEndTest.java
@@ -30,7 +30,6 @@ import org.apache.camel.processor.aggregate.AggregationStrategy;
  */
 public class SplitWithEndTest extends ContextTestSupport {
 
-    @SuppressWarnings("unchecked")
     public void testRouteIsCorrectAtRuntime() throws Exception {
         // use navigate to find that the end works as expected
         Navigate<Processor> nav = context.getRoutes().get(0).navigate();

http://git-wip-us.apache.org/repos/asf/camel/blob/94dea776/camel-core/src/test/java/org/apache/camel/processor/ValidationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/processor/ValidationTest.java b/camel-core/src/test/java/org/apache/camel/processor/ValidationTest.java
index 182cbff..0053211 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/ValidationTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/ValidationTest.java
@@ -86,8 +86,8 @@ public class ValidationTest extends ContextTestSupport {
         validEndpoint = resolveMandatoryEndpoint("mock:valid", MockEndpoint.class);
         invalidEndpoint = resolveMandatoryEndpoint("mock:invalid", MockEndpoint.class);
 
-        validEndpoint.whenAnyExchangeReceived(ProcessorBuilder.setOutBody(Builder.constant("validResult")));
-        invalidEndpoint.whenAnyExchangeReceived(ProcessorBuilder.setOutBody(Builder.constant("invalidResult")));
+        validEndpoint.whenAnyExchangeReceived(ProcessorBuilder.setBody(Builder.constant("validResult")));
+        invalidEndpoint.whenAnyExchangeReceived(ProcessorBuilder.setBody(Builder.constant("invalidResult")));
     }
 
     protected RouteBuilder createRouteBuilder() {

http://git-wip-us.apache.org/repos/asf/camel/blob/94dea776/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterAllowNullTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterAllowNullTest.java
b/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterAllowNullTest.java
index c9cc79f..525c04d 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterAllowNullTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterAllowNullTest.java
@@ -36,7 +36,7 @@ public class AggregationStrategyBeanAdapterAllowNullTest extends ContextTestSupp
 
         assertMockEndpointsSatisfied();
 
-        List names = getMockEndpoint("mock:result").getReceivedExchanges().get(0).getIn().getBody(List.class);
+        List<?> names = getMockEndpoint("mock:result").getReceivedExchanges().get(0).getIn().getBody(List.class);
         assertEquals("Claus", names.get(0));
         assertEquals("James", names.get(1));
         assertEquals("Jonathan", names.get(2));
@@ -57,9 +57,9 @@ public class AggregationStrategyBeanAdapterAllowNullTest extends ContextTestSupp
 
     public static final class MyUserAppender {
 
-        public List addUsers(List names, User user) {
+        public List<String> addUsers(List<String> names, User user) {
             if (names == null) {
-                names = new ArrayList();
+                names = new ArrayList<String>();
             }
             names.add(user.getName());
             return names;

http://git-wip-us.apache.org/repos/asf/camel/blob/94dea776/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterWithHeadersAndPropertiesTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterWithHeadersAndPropertiesTest.java
b/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterWithHeadersAndPropertiesTest.java
index a305c58..e9385ef 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterWithHeadersAndPropertiesTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterWithHeadersAndPropertiesTest.java
@@ -54,8 +54,8 @@ public class AggregationStrategyBeanAdapterWithHeadersAndPropertiesTest
extends
 
     public static final class MyBodyAppender {
 
-        public String appendWithHeadersAndProperties(String existing, Map oldHeaders, Map
oldProperties,
-                                                     String next, Map newHeaders, Map newProperties)
{
+        public String appendWithHeadersAndProperties(String existing, Map<String, String>
oldHeaders, Map<String, Integer> oldProperties,
+                                                     String next, Map<String, String>
newHeaders, Map<String, Integer> newProperties) {
             if (next != null) {
                 Integer count = (Integer) oldProperties.get("count") + (Integer) newProperties.get("count");
                 oldProperties.put("count", count);

http://git-wip-us.apache.org/repos/asf/camel/blob/94dea776/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterWithHeadersTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterWithHeadersTest.java
b/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterWithHeadersTest.java
index 0e46159..fd54b36 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterWithHeadersTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterWithHeadersTest.java
@@ -20,13 +20,11 @@ import java.util.Map;
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.processor.aggregate.AggregationStrategyBeanAdapter;
 import org.apache.camel.util.toolbox.AggregationStrategies;
 
 public class AggregationStrategyBeanAdapterWithHeadersTest extends ContextTestSupport {
 
     private MyBodyAppender appender = new MyBodyAppender();
-    private AggregationStrategyBeanAdapter myStrategy;
 
     public void testAggregate() throws Exception {
         getMockEndpoint("mock:result").expectedBodiesReceived("ABC");
@@ -54,7 +52,7 @@ public class AggregationStrategyBeanAdapterWithHeadersTest extends ContextTestSu
 
     public static final class MyBodyAppender {
 
-        public String appendWithHeaders(String existing, Map oldHeaders, String next, Map
newHeaders) {
+        public String appendWithHeaders(String existing, Map<String, Integer> oldHeaders,
String next, Map<String, Integer> newHeaders) {
             if (next != null) {
                 Integer count = (Integer) oldHeaders.get("count") + (Integer) newHeaders.get("count");
                 oldHeaders.put("count", count);


Mime
View raw message