camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zregv...@apache.org
Subject camel git commit: CAMEL-11068 Remove deprecated usage from Salesf...
Date Fri, 24 Mar 2017 20:50:08 GMT
Repository: camel
Updated Branches:
  refs/heads/master 9fd3b4fbf -> f1a3617cb


CAMEL-11068 Remove deprecated usage from Salesf...

...orce component

Replaced deprecated usage and removed EndpointCompleter implementation.


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

Branch: refs/heads/master
Commit: f1a3617cb0122e053d6305de91f10bf0d54ead24
Parents: 9fd3b4f
Author: Zoran Regvart <zregvart@apache.org>
Authored: Fri Mar 24 21:50:03 2017 +0100
Committer: Zoran Regvart <zregvart@apache.org>
Committed: Fri Mar 24 21:50:03 2017 +0100

----------------------------------------------------------------------
 .../salesforce/SalesforceComponent.java         |  86 +-------
 .../salesforce/SalesforceEndpointConfig.java    |   4 +-
 .../api/utils/DateTimeDeserializer.java         |   3 +-
 ...ceComponentConfigurationIntegrationTest.java | 214 -------------------
 .../salesforce/internal/LoginTokenTest.java     |   2 -
 .../internal/SessionIntegrationTest.java        |   2 +-
 .../processor/JsonRestProcessorTest.java        |   2 +-
 .../SalesforceComponentConfiguration.java       |   2 +-
 8 files changed, 14 insertions(+), 301 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f1a3617c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java
index fb3387e..930c9e9 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java
@@ -16,36 +16,27 @@
  */
 package org.apache.camel.component.salesforce;
 
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
 import java.net.URI;
-import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import org.apache.camel.CamelContext;
-import org.apache.camel.ComponentConfiguration;
 import org.apache.camel.ComponentVerifier;
 import org.apache.camel.Endpoint;
 import org.apache.camel.VerifiableComponent;
 import org.apache.camel.component.salesforce.api.SalesforceException;
-import org.apache.camel.component.salesforce.api.dto.AbstractQueryRecordsBase;
 import org.apache.camel.component.salesforce.api.dto.AbstractSObjectBase;
 import org.apache.camel.component.salesforce.internal.OperationName;
 import org.apache.camel.component.salesforce.internal.SalesforceSession;
 import org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper;
-import org.apache.camel.impl.UriEndpointComponent;
-import org.apache.camel.spi.EndpointCompleter;
+import org.apache.camel.impl.DefaultComponent;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.util.IntrospectionSupport;
-import org.apache.camel.util.ObjectHelper;
-import org.apache.camel.util.ReflectionHelper;
 import org.apache.camel.util.ServiceHelper;
+import org.apache.camel.util.StringHelper;
 import org.apache.camel.util.jsse.KeyStoreParameters;
 import org.apache.camel.util.jsse.SSLContextParameters;
 import org.eclipse.jetty.client.HttpProxy;
@@ -65,7 +56,7 @@ import static org.apache.camel.component.salesforce.SalesforceLoginConfig.DEFAUL
  * Represents the component that manages {@link SalesforceEndpoint}.
  */
 @Metadata(label = "verifiers", enums = "parameters,connectivity")
-public class SalesforceComponent extends UriEndpointComponent implements EndpointCompleter,
VerifiableComponent {
+public class SalesforceComponent extends DefaultComponent implements VerifiableComponent
{
 
     static final int CONNECTION_TIMEOUT = 60000;
     static final Pattern SOBJECT_NAME_PATTERN = Pattern.compile("^.*[\\?&]sObjectName=([^&,]+).*$");
@@ -202,11 +193,10 @@ public class SalesforceComponent extends UriEndpointComponent implements
Endpoin
     private SubscriptionHelper subscriptionHelper;
 
     public SalesforceComponent() {
-        super(SalesforceEndpoint.class);
     }
 
     public SalesforceComponent(CamelContext context) {
-        super(context, SalesforceEndpoint.class);
+        super(context);
     }
 
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object>
parameters) throws Exception {
@@ -340,8 +330,8 @@ public class SalesforceComponent extends UriEndpointComponent implements
Endpoin
         }
         if (this.httpProxyUsername != null && httpProxyPassword != null) {
 
-            ObjectHelper.notEmpty(httpProxyAuthUri, "httpProxyAuthUri");
-            ObjectHelper.notEmpty(httpProxyRealm, "httpProxyRealm");
+            StringHelper.notEmpty(httpProxyAuthUri, "httpProxyAuthUri");
+            StringHelper.notEmpty(httpProxyRealm, "httpProxyRealm");
 
             final Authentication authentication;
             if (httpProxyUseDigestAuth) {
@@ -428,70 +418,6 @@ public class SalesforceComponent extends UriEndpointComponent implements
Endpoin
         return subscriptionHelper;
     }
 
-    @Override
-    public List<String> completeEndpointPath(ComponentConfiguration configuration,
String completionText) {
-        final List<String> result = new ArrayList<String>();
-        // return operations names on empty completion text
-        final boolean empty = ObjectHelper.isEmpty(completionText);
-        if (empty || completionText.indexOf('?') == -1) {
-            if (empty) {
-                completionText = "";
-            }
-            final OperationName[] values = OperationName.values();
-            for (OperationName val : values) {
-                final String strValue = val.value();
-                if (strValue.startsWith(completionText)) {
-                    result.add(strValue);
-                }
-            }
-            // also add place holder for user defined push topic name for empty completionText
-            if (empty) {
-                result.add("[PushTopicName]");
-            }
-        } else {
-            // handle package parameters
-            if (completionText.matches("^.*[\\?&]sObjectName=$")) {
-                result.addAll(classMap.keySet());
-            } else if (completionText.matches("^.*[\\?&]sObjectFields=$")) {
-                // find sObjectName from configuration or completionText
-                String sObjectName = (String) configuration.getParameter("sObjectName");
-                if (sObjectName == null) {
-                    final Matcher matcher = SOBJECT_NAME_PATTERN.matcher(completionText);
-                    if (matcher.matches()) {
-                        sObjectName = matcher.group(1);
-                    }
-                }
-                // return all fields of sObject
-                if (sObjectName != null) {
-                    final Class<?> aClass = classMap.get(sObjectName);
-                    ReflectionHelper.doWithFields(aClass, new ReflectionHelper.FieldCallback()
{
-                        @Override
-                        public void doWith(Field field) throws IllegalArgumentException,
IllegalAccessException {
-                            // get non-static fields
-                            if ((field.getModifiers() & Modifier.STATIC) == 0) {
-                                result.add(field.getName());
-                            }
-                        }
-                    });
-                }
-            } else if (completionText.matches("^.*[\\?&]sObjectClass=$")) {
-                for (Class c : classMap.values()) {
-                    result.add(c.getName());
-                }
-                // also add Query records classes
-                Set<Class<?>> classes = getCamelContext().getPackageScanClassResolver().
-                    findImplementations(AbstractQueryRecordsBase.class, packages);
-                for (Class<?> aClass : classes) {
-                    // findImplementations also returns AbstractQueryRecordsBase for some
reason!!!
-                    if (AbstractQueryRecordsBase.class != aClass) {
-                        result.add(aClass.getName());
-                    }
-                }
-            }
-        }
-        return result;
-    }
-
     public AuthenticationType getAuthenticationType() {
         return authenticationType;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/f1a3617c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceEndpointConfig.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceEndpointConfig.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceEndpointConfig.java
index 1aad7da..f035449 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceEndpointConfig.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceEndpointConfig.java
@@ -341,7 +341,9 @@ public class SalesforceEndpointConfig implements Cloneable {
     }
 
     public Map<String, Object> getApexQueryParams() {
-        return apexQueryParams == null ? Collections.EMPTY_MAP : Collections.unmodifiableMap(apexQueryParams);
+        final Map<String, Object> value = Optional.ofNullable(apexQueryParams).orElse(Collections.emptyMap());
+
+        return Collections.unmodifiableMap(value);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/camel/blob/f1a3617c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/utils/DateTimeDeserializer.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/utils/DateTimeDeserializer.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/utils/DateTimeDeserializer.java
index a79d137..e62496e 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/utils/DateTimeDeserializer.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/utils/DateTimeDeserializer.java
@@ -23,6 +23,7 @@ import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.core.JsonToken;
 import com.fasterxml.jackson.databind.DeserializationContext;
 import com.fasterxml.jackson.databind.JsonDeserializer;
+import com.fasterxml.jackson.databind.JsonMappingException;
 
 
 public class DateTimeDeserializer extends JsonDeserializer<ZonedDateTime> {
@@ -37,7 +38,7 @@ public class DateTimeDeserializer extends JsonDeserializer<ZonedDateTime>
{
         if (currentToken == JsonToken.VALUE_STRING) {
             return DateTimeUtils.parseDateTime(jsonParser.getText().trim());
         }
-        throw deserializationContext.mappingException(getClass());
+        throw JsonMappingException.from(deserializationContext, "Expected String value, got:
" + currentToken);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/f1a3617c/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceComponentConfigurationIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceComponentConfigurationIntegrationTest.java
b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceComponentConfigurationIntegrationTest.java
deleted file mode 100644
index e5f15e1..0000000
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceComponentConfigurationIntegrationTest.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.salesforce;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.SortedMap;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.Component;
-import org.apache.camel.ComponentConfiguration;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.salesforce.dto.generated.Account;
-import org.apache.camel.component.salesforce.dto.generated.Asset;
-import org.apache.camel.component.salesforce.dto.generated.Contact;
-import org.apache.camel.component.salesforce.dto.generated.Document;
-import org.apache.camel.component.salesforce.dto.generated.Line_Item__c;
-import org.apache.camel.component.salesforce.dto.generated.MSPTest;
-import org.apache.camel.component.salesforce.dto.generated.Merchandise__c;
-import org.apache.camel.component.salesforce.dto.generated.QueryRecordsLine_Item__c;
-import org.apache.camel.component.salesforce.dto.generated.Task;
-import org.apache.camel.component.salesforce.internal.PayloadFormat;
-import org.apache.camel.impl.ParameterConfiguration;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Lets test the use of the ComponentConfiguration on the Salesforce endpoint
- */
-public class SalesforceComponentConfigurationIntegrationTest extends CamelTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(SalesforceComponentConfigurationIntegrationTest.class);
-
-    protected String componentName = "salesforce123";
-    protected boolean verbose = true;
-
-    @Test
-    public void testConfiguration() throws Exception {
-        Component component = context().getComponent(componentName);
-        ComponentConfiguration configuration = component.createComponentConfiguration();
-        SortedMap<String, ParameterConfiguration> parameterConfigurationMap = configuration.getParameterConfigurationMap();
-        if (verbose) {
-            Set<Map.Entry<String, ParameterConfiguration>> entries = parameterConfigurationMap.entrySet();
-            for (Map.Entry<String, ParameterConfiguration> entry : entries) {
-                String name = entry.getKey();
-                ParameterConfiguration config = entry.getValue();
-                LOG.info("Has name: {} with type {}", name, config.getParameterType().getName());
-            }
-        }
-
-        assertParameterConfig(configuration, "format", PayloadFormat.class);
-        assertParameterConfig(configuration, "sObjectName", String.class);
-        assertParameterConfig(configuration, "sObjectFields", String.class);
-        assertParameterConfig(configuration, "updateTopic", boolean.class);
-
-        configuration.setParameter("format", PayloadFormat.XML);
-        configuration.setParameter("sObjectName", "Merchandise__c");
-        configuration.setParameter("sObjectFields", "Description__c,Total_Inventory__c");
-        configuration.setParameter("updateTopic", false);
-
-        // operation name is base uri
-        configuration.setBaseUri(componentName + ":getSObject");
-
-        SalesforceEndpoint endpoint = assertIsInstanceOf(SalesforceEndpoint.class, configuration.createEndpoint());
-        final SalesforceEndpointConfig endpointConfig = endpoint.getConfiguration();
-        assertEquals("endpoint.format", PayloadFormat.XML, endpointConfig.getFormat());
-        assertEquals("endpoint.sObjectName", "Merchandise__c", endpointConfig.getSObjectName());
-        assertEquals("endpoint.sObjectFields", "Description__c,Total_Inventory__c", endpointConfig.getSObjectFields());
-        assertEquals("endpoint.updateTopic", false, endpointConfig.isUpdateTopic());
-    }
-
-    public static void assertParameterConfig(ComponentConfiguration configuration, String
name,
-                                       Class<?> parameterType) {
-        ParameterConfiguration config = configuration.getParameterConfiguration(name);
-        assertNotNull("ParameterConfiguration should exist for parameter name " + name, config);
-        assertEquals("ParameterConfiguration." + name + ".getName()", name, config.getName());
-        assertEquals("ParameterConfiguration." + name + ".getParameterType()", parameterType,
-                config.getParameterType());
-    }
-
-    @Test
-    public void testEndpointCompletion() throws Exception {
-        Component component = context().getComponent(componentName);
-        ComponentConfiguration configuration = component.createComponentConfiguration();
-
-        // get operation names
-        assertCompletionOptions(configuration.completeEndpointPath(""),
-            "getVersions", "getResources", "getGlobalObjects", "getBasicInfo", "getDescription",
"getSObject", "createSObject",
-            "updateSObject", "deleteSObject", "getSObjectWithId", "upsertSObject", "deleteSObjectWithId",
"getBlobField",
-            "query", "queryMore", "queryAll", "search", "apexCall", "recent", "createJob",
"getJob", "closeJob", "abortJob",
-            "createBatch", "getBatch", "getAllBatches", "getRequest", "getResults", "createBatchQuery",
"getQueryResultIds",
-            "getQueryResult", "getRecentReports", "getReportDescription", "executeSyncReport",
"executeAsyncReport",
-            "getReportInstances", "getReportResults", "limits", "approval", "approvals",
"composite-batch", "composite-tree",
-            "[PushTopicName]"
-        );
-
-        // get filtered operation names
-        assertCompletionOptions(configuration.completeEndpointPath("get"),
-            "getVersions", "getResources", "getGlobalObjects", "getBasicInfo", "getDescription",
"getSObject", "getSObjectWithId",
-            "getBlobField", "getJob", "getBatch", "getAllBatches", "getRequest", "getResults",
"getQueryResultIds",
-            "getQueryResult", "getRecentReports", "getReportDescription", "getReportInstances",
"getReportResults"
-        );
-
-/* TODO support parameter completion
-        // get ALL REST operation parameters
-        // TODO support operation specific parameter completion
-        assertCompletionOptions(configuration.completeEndpointPath("getSObject?"),
-            "apiVersion", "httpClient", "format", "sObjectName", "sObjectId", "sObjectFields",
-            "sObjectIdName", "sObjectIdValue", "sObjectBlobFieldName", "sObjectClass", "sObjectQuery",
"sObjectSearch");
-
-        // get filtered REST parameters
-        assertCompletionOptions(configuration.completeEndpointPath("getSObject?format=XML&"),
-            "apiVersion", "httpClient", "sObjectName", "sObjectId", "sObjectFields",
-            "sObjectIdName", "sObjectIdValue", "sObjectBlobFieldName", "sObjectClass", "sObjectQuery",
"sObjectSearch");
-
-        // get ALL Bulk operation parameters
-        // TODO support operation specific parameter completion
-        assertCompletionOptions(configuration.completeEndpointPath("createJob?"),
-            "apiVersion", "httpClient", "sObjectQuery", "contentType", "jobId", "batchId",
"resultId");
-
-        // get filtered Bulk operation parameters
-        assertCompletionOptions(configuration.completeEndpointPath("createJob?contentType=XML&"),
-            "apiVersion", "httpClient", "sObjectQuery", "jobId", "batchId", "resultId");
-
-        // get ALL topic parameters for consumers
-        assertCompletionOptions(configuration.completeEndpointPath("myTopic?"),
-            "apiVersion", "httpClient", "updateTopic", "notifyForFields", "notifyForOperations");
-
-        // get filtered topic parameters for consumers
-        assertCompletionOptions(configuration.completeEndpointPath("myTopic?updateTopic=true&"),
-            "apiVersion", "httpClient", "notifyForFields", "notifyForOperations");
-
-        // get parameters from partial name
-        assertCompletionOptions(configuration.completeEndpointPath("getSObject?sObject"),
-            "sObjectName", "sObjectId", "sObjectFields",
-            "sObjectIdName", "sObjectIdValue", "sObjectBlobFieldName", "sObjectClass", "sObjectQuery",
"sObjectSearch");
-*/
-
-        // get sObjectName values, from scanned DTO packages
-        assertCompletionOptions(configuration.completeEndpointPath("getSObject?sObjectName="),
-            "Account", "Asset", "Contact", "Task", "Line_Item__c", "Merchandise__c", "Document",
"MSPTest");
-
-        // get sObjectFields values, from scanned DTO
-        assertCompletionOptions(
-            configuration.completeEndpointPath("getSObject?sObjectName=Merchandise__c&sObjectFields="),
-            "Description__c", "Price__c", "Total_Inventory__c", "attributes", "Id",
-            "OwnerId", "IsDeleted", "Name", "CreatedDate", "CreatedById", "LastModifiedDate",
"LastModifiedById",
-            "SystemModstamp", "LastActivityDate", "LastViewedDate", "LastReferencedDate");
-
-        // get sObjectClass values, from scanned DTO packages
-        assertCompletionOptions(configuration.completeEndpointPath("getSObject?sObjectClass="),
-            Account.class.getName(),
-            Asset.class.getName(),
-            Contact.class.getName(),
-            Task.class.getName(),
-            Line_Item__c.class.getName(),
-            Merchandise__c.class.getName(),
-            Document.class.getName(),
-            MSPTest.class.getName(),
-            QueryRecordsLine_Item__c.class.getName());
-    }
-
-    private void assertCompletionOptions(List<String> options, final String ...args)
{
-        List<String> missing = new ArrayList<String>();
-        for (String arg : args) {
-            if (!options.remove(arg)) {
-                missing.add(arg);
-            }
-        }
-        if (!missing.isEmpty() || !options.isEmpty()) {
-            fail(String.format("Missing options %s, unknown options %s",
-                missing, options));
-        }
-    }
-
-    protected CamelContext createCamelContext() throws Exception {
-        final CamelContext camelContext = super.createCamelContext();
-        final SalesforceLoginConfig loginConfig = LoginConfigHelper.getLoginConfig();
-        final SalesforceComponent component = new SalesforceComponent();
-        component.setLoginConfig(loginConfig);
-        // set DTO package
-        component.setPackages(new String[]{
-            Merchandise__c.class.getPackage().getName()
-        });
-        camelContext.addComponent(componentName, component);
-        return camelContext;
-    }
-
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            public void configure() throws Exception {
-            }
-        };
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/f1a3617c/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/LoginTokenTest.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/LoginTokenTest.java
b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/LoginTokenTest.java
index 96de04f..02f319b 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/LoginTokenTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/LoginTokenTest.java
@@ -30,8 +30,6 @@ import static org.junit.Assert.assertNull;
 
 public class LoginTokenTest {
 
-    private static final Logger LOG = LoggerFactory.getLogger(SessionIntegrationTest.class);
-
     @Test
     public void testLoginTokenWithUnknownFields() throws Exception {
 

http://git-wip-us.apache.org/repos/asf/camel/blob/f1a3617c/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/SessionIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/SessionIntegrationTest.java
b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/SessionIntegrationTest.java
index 81396c2..e089ca8 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/SessionIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/SessionIntegrationTest.java
@@ -40,7 +40,7 @@ public class SessionIntegrationTest extends Assert implements SalesforceSession.
     public void testLogin() throws Exception {
 
         final SslContextFactory sslContextFactory = new SslContextFactory();
-        sslContextFactory.setSslContext(new SSLContextParameters().createSSLContext());
+        sslContextFactory.setSslContext(new SSLContextParameters().createSSLContext(new DefaultCamelContext()));
         final SalesforceHttpClient httpClient = new SalesforceHttpClient(sslContextFactory);
         httpClient.setConnectTimeout(TIMEOUT);
 

http://git-wip-us.apache.org/repos/asf/camel/blob/f1a3617c/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessorTest.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessorTest.java
b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessorTest.java
index 1f6da5f..97b7b4d 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessorTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessorTest.java
@@ -54,7 +54,7 @@ public class JsonRestProcessorTest {
         assertThat(result, result.length() <= 48, Is.is(true));
     }
 
-    private static class TestObject extends AbstractDTOBase {
+    static class TestObject extends AbstractDTOBase {
 
         private ZonedDateTime creationDate;
 

http://git-wip-us.apache.org/repos/asf/camel/blob/f1a3617c/platforms/spring-boot/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentConfiguration.java
b/platforms/spring-boot/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentConfiguration.java
index 5ae2470..52f5a4b 100644
--- a/platforms/spring-boot/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentConfiguration.java
@@ -491,7 +491,7 @@ public class SalesforceComponentConfiguration {
          * Whether to update an existing Push Topic when using the Streaming
          * API, defaults to false
          */
-        private Boolean updateTopic = false;
+        private Boolean updateTopic;
         /**
          * Notify for fields, options are ALL, REFERENCED, SELECT, WHERE
          */


Mime
View raw message