camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject [1/5] camel git commit: Polish
Date Sun, 18 Dec 2016 16:17:58 GMT
Repository: camel
Updated Branches:
  refs/heads/master 7bc7a37ac -> 079b5f9e6


Polish

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

Branch: refs/heads/master
Commit: dccd46005a9550a021c43dc1b690816d44eee42b
Parents: 7bc7a37
Author: Babak Vahdat <bvahdat@apache.org>
Authored: Sun Dec 18 17:14:21 2016 +0100
Committer: Babak Vahdat <bvahdat@apache.org>
Committed: Sun Dec 18 17:14:21 2016 +0100

----------------------------------------------------------------------
 .../apache/camel/util/component/ApiMethodParser.java   |  1 -
 .../camel/component/bean/BeanConcurrentTest.java       |  1 -
 .../api/util/BonitaAPIUtilPrepareInputsTest.java       | 13 +++++++------
 .../docker/headers/AttachContainerCmdHeaderTest.java   |  2 +-
 .../docker/headers/BuildImageCmdHeaderTest.java        |  4 ++--
 .../google/calendar/CalendarConfigurationTest.java     |  2 --
 .../openstack/common/AbstractOpenstackProducer.java    |  2 +-
 .../component/salesforce/dto/generated/Account.java    |  2 --
 .../component/salesforce/dto/generated/Asset.java      |  3 ---
 .../sql/stored/CallableStatementWrapperTest.java       |  2 +-
 .../example/transformer/demo/client/CamelClient.java   |  5 -----
 11 files changed, 12 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/dccd4600/camel-core/src/main/java/org/apache/camel/util/component/ApiMethodParser.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/util/component/ApiMethodParser.java
b/camel-core/src/main/java/org/apache/camel/util/component/ApiMethodParser.java
index 8829ba5..73f71e6 100644
--- a/camel-core/src/main/java/org/apache/camel/util/component/ApiMethodParser.java
+++ b/camel-core/src/main/java/org/apache/camel/util/component/ApiMethodParser.java
@@ -19,7 +19,6 @@ package org.apache.camel.util.component;
 import java.lang.reflect.Array;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
 import java.util.List;

http://git-wip-us.apache.org/repos/asf/camel/blob/dccd4600/camel-core/src/test/java/org/apache/camel/component/bean/BeanConcurrentTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/bean/BeanConcurrentTest.java
b/camel-core/src/test/java/org/apache/camel/component/bean/BeanConcurrentTest.java
index 4601a21..dfa4848 100644
--- a/camel-core/src/test/java/org/apache/camel/component/bean/BeanConcurrentTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/bean/BeanConcurrentTest.java
@@ -17,7 +17,6 @@
 package org.apache.camel.component.bean;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 
 import org.apache.camel.ContextTestSupport;

http://git-wip-us.apache.org/repos/asf/camel/blob/dccd4600/components/camel-bonita/src/test/java/org/apache/camel/component/bonita/api/util/BonitaAPIUtilPrepareInputsTest.java
----------------------------------------------------------------------
diff --git a/components/camel-bonita/src/test/java/org/apache/camel/component/bonita/api/util/BonitaAPIUtilPrepareInputsTest.java
b/components/camel-bonita/src/test/java/org/apache/camel/component/bonita/api/util/BonitaAPIUtilPrepareInputsTest.java
index 14a900c..1750d15 100644
--- a/components/camel-bonita/src/test/java/org/apache/camel/component/bonita/api/util/BonitaAPIUtilPrepareInputsTest.java
+++ b/components/camel-bonita/src/test/java/org/apache/camel/component/bonita/api/util/BonitaAPIUtilPrepareInputsTest.java
@@ -27,6 +27,7 @@ import org.apache.camel.component.bonita.api.model.UploadFileResponse;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.powermock.core.classloader.annotations.PrepareForTest;
@@ -80,8 +81,8 @@ public class BonitaAPIUtilPrepareInputsTest {
         BonitaAPIUtil bonitaApiUtilMod = Mockito.spy(bonitaApiUtil);
         UploadFileResponse uploadFileResponse = new UploadFileResponse();
         uploadFileResponse.setTempPath("temp");
-        Mockito.doReturn(uploadFileResponse).when(bonitaApiUtilMod).uploadFile(Mockito.any(),
-                Mockito.any());
+        Mockito.doReturn(uploadFileResponse).when(bonitaApiUtilMod).uploadFile(Matchers.any(),
+                Matchers.any());
         Map<String, Serializable> inputs =
                 bonitaApiUtilMod.prepareInputs(processDefinition, rawInputs);
         assertEquals(rawInputs.size(), inputs.size());
@@ -96,8 +97,8 @@ public class BonitaAPIUtilPrepareInputsTest {
         BonitaAPIUtil bonitaApiUtilMod = Mockito.spy(bonitaApiUtil);
         UploadFileResponse uploadFileResponse = new UploadFileResponse();
         uploadFileResponse.setTempPath("temp");
-        Mockito.doReturn(uploadFileResponse).when(bonitaApiUtilMod).uploadFile(Mockito.any(),
-                Mockito.any());
+        Mockito.doReturn(uploadFileResponse).when(bonitaApiUtilMod).uploadFile(Matchers.any(),
+                Matchers.any());
         Map<String, Serializable> inputs =
                 bonitaApiUtilMod.prepareInputs(processDefinition, rawInputs);
         assertTrue(Map.class.isInstance(inputs.get("filename")));
@@ -112,8 +113,8 @@ public class BonitaAPIUtilPrepareInputsTest {
         BonitaAPIUtil bonitaApiUtilMod = Mockito.spy(bonitaApiUtil);
         UploadFileResponse uploadFileResponse = new UploadFileResponse();
         uploadFileResponse.setTempPath("temp");
-        Mockito.doReturn(uploadFileResponse).when(bonitaApiUtilMod).uploadFile(Mockito.any(),
-                Mockito.any());
+        Mockito.doReturn(uploadFileResponse).when(bonitaApiUtilMod).uploadFile(Matchers.any(),
+                Matchers.any());
         Map<String, Serializable> inputs =
                 bonitaApiUtilMod.prepareInputs(processDefinition, rawInputs);
         Map<String, Serializable> fileMap = (Map<String, Serializable>) inputs.get("filename");

http://git-wip-us.apache.org/repos/asf/camel/blob/dccd4600/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/AttachContainerCmdHeaderTest.java
----------------------------------------------------------------------
diff --git a/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/AttachContainerCmdHeaderTest.java
b/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/AttachContainerCmdHeaderTest.java
index 95629a2..587f053 100644
--- a/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/AttachContainerCmdHeaderTest.java
+++ b/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/AttachContainerCmdHeaderTest.java
@@ -70,7 +70,7 @@ public class AttachContainerCmdHeaderTest extends BaseDockerHeaderTest<AttachCon
     @Override
     protected void setupMocks() {
         Mockito.when(dockerClient.attachContainerCmd(Matchers.anyString())).thenReturn(mockObject);
-        Mockito.when(mockObject.exec(Mockito.anyObject())).thenReturn(callback);
+        Mockito.when(mockObject.exec(Matchers.anyObject())).thenReturn(callback);
         try {
             Mockito.when(callback.awaitCompletion()).thenReturn(callback);
         } catch (InterruptedException e) {

http://git-wip-us.apache.org/repos/asf/camel/blob/dccd4600/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/BuildImageCmdHeaderTest.java
----------------------------------------------------------------------
diff --git a/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/BuildImageCmdHeaderTest.java
b/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/BuildImageCmdHeaderTest.java
index dff491b..dee3e88 100644
--- a/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/BuildImageCmdHeaderTest.java
+++ b/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/BuildImageCmdHeaderTest.java
@@ -84,8 +84,8 @@ public class BuildImageCmdHeaderTest extends BaseDockerHeaderTest<BuildImageCmd>
         Mockito.when(dockerClient.buildImageCmd(Matchers.any(InputStream.class))).thenReturn(mockObject);
         Mockito.when(dockerClient.buildImageCmd(Matchers.any(File.class))).thenReturn(mockObject);
 
-        Mockito.when(mockObject.exec(Mockito.anyObject())).thenReturn(callback);
-        Mockito.when(callback.awaitImageId()).thenReturn(Mockito.anyString());
+        Mockito.when(mockObject.exec(Matchers.anyObject())).thenReturn(callback);
+        Mockito.when(callback.awaitImageId()).thenReturn(Matchers.anyString());
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/dccd4600/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
b/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
index 00ada76..2a8a891 100644
--- a/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
+++ b/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.component.google.calendar;
 
-import com.google.api.services.calendar.model.Calendar;
-
 import org.apache.camel.CamelContext;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.google.calendar.internal.CalendarCalendarsApiMethod;

http://git-wip-us.apache.org/repos/asf/camel/blob/dccd4600/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/common/AbstractOpenstackProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/common/AbstractOpenstackProducer.java
b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/common/AbstractOpenstackProducer.java
index 5a93dc5..6f651c5 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/common/AbstractOpenstackProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/common/AbstractOpenstackProducer.java
@@ -68,7 +68,7 @@ public abstract class AbstractOpenstackProducer extends DefaultProducer
{
     }
 
     protected String getOperation(Exchange exchange) {
-        final String operation = exchange.getIn().getHeader(NovaConstants.OPERATION, endpoint.getOperation(),
String.class);
+        final String operation = exchange.getIn().getHeader(OpenstackConstants.OPERATION,
endpoint.getOperation(), String.class);
         ObjectHelper.notEmpty(operation, "Operation");
         return operation;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/dccd4600/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/dto/generated/Account.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/dto/generated/Account.java
b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/dto/generated/Account.java
index fd6b5b9..430a62d 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/dto/generated/Account.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/dto/generated/Account.java
@@ -24,9 +24,7 @@ import com.thoughtworks.xstream.annotations.XStreamConverter;
 
 import org.apache.camel.component.salesforce.api.PicklistEnumConverter;
 import org.apache.camel.component.salesforce.api.dto.AbstractDescribedSObjectBase;
-import org.apache.camel.component.salesforce.api.dto.ChildRelationShip;
 import org.apache.camel.component.salesforce.api.dto.InfoUrls;
-import org.apache.camel.component.salesforce.api.dto.NamedLayoutInfo;
 import org.apache.camel.component.salesforce.api.dto.RecordTypeInfo;
 import org.apache.camel.component.salesforce.api.dto.SObjectDescription;
 import org.apache.camel.component.salesforce.api.dto.SObjectDescriptionUrls;

http://git-wip-us.apache.org/repos/asf/camel/blob/dccd4600/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/dto/generated/Asset.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/dto/generated/Asset.java
b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/dto/generated/Asset.java
index 17b23cc..ce8b1be 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/dto/generated/Asset.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/dto/generated/Asset.java
@@ -18,9 +18,6 @@ package org.apache.camel.component.salesforce.dto.generated;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.thoughtworks.xstream.annotations.XStreamAlias;
-import com.thoughtworks.xstream.annotations.XStreamConverter;
-
-import org.apache.camel.component.salesforce.api.PicklistEnumConverter;
 import org.apache.camel.component.salesforce.api.dto.AbstractSObjectBase;
 
 //CHECKSTYLE:OFF

http://git-wip-us.apache.org/repos/asf/camel/blob/dccd4600/components/camel-sql/src/test/java/org/apache/camel/component/sql/stored/CallableStatementWrapperTest.java
----------------------------------------------------------------------
diff --git a/components/camel-sql/src/test/java/org/apache/camel/component/sql/stored/CallableStatementWrapperTest.java
b/components/camel-sql/src/test/java/org/apache/camel/component/sql/stored/CallableStatementWrapperTest.java
index 09ccbe9..6aa372c 100644
--- a/components/camel-sql/src/test/java/org/apache/camel/component/sql/stored/CallableStatementWrapperTest.java
+++ b/components/camel-sql/src/test/java/org/apache/camel/component/sql/stored/CallableStatementWrapperTest.java
@@ -66,7 +66,7 @@ public class CallableStatementWrapperTest extends CamelTestSupport {
                 statementWrapper.populateStatement(null, exchange);
 
                 Map resultOfQuery = (Map) statementWrapper.executeStatement();
-                Assert.assertEquals(Integer.valueOf(-1), ((Map) resultOfQuery).get("resultofsub"));
+                Assert.assertEquals(-1, resultOfQuery.get("resultofsub"));
             }
         });
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/dccd4600/examples/camel-example-transformer-demo/src/main/java/org/apache/camel/example/transformer/demo/client/CamelClient.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-transformer-demo/src/main/java/org/apache/camel/example/transformer/demo/client/CamelClient.java
b/examples/camel-example-transformer-demo/src/main/java/org/apache/camel/example/transformer/demo/client/CamelClient.java
index 03ac095..2f42ef8 100644
--- a/examples/camel-example-transformer-demo/src/main/java/org/apache/camel/example/transformer/demo/client/CamelClient.java
+++ b/examples/camel-example-transformer-demo/src/main/java/org/apache/camel/example/transformer/demo/client/CamelClient.java
@@ -21,16 +21,11 @@ import java.io.File;
 import java.io.FileReader;
 
 import org.apache.camel.CamelContext;
-import org.apache.camel.ExchangePattern;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.example.transformer.demo.Order;
 import org.apache.camel.example.transformer.demo.OrderResponse;
-import org.apache.camel.spring.Main;
-import org.apache.camel.spring.SpringCamelContext;
-import org.apache.camel.util.IOHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 /**


Mime
View raw message