[camel] branch master updated: CAMEL-13557: Fixed test to use property binding support as the old has removed the legacy JDK PropertyEditor in CAMEL-13566

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[camel] branch master updated: CAMEL-13557: Fixed test to use property binding support as the old has removed the legacy JDK PropertyEditor in CAMEL-13566

davsclaus-2
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 0f96834  CAMEL-13557: Fixed test to use property binding support as the old has removed the legacy JDK PropertyEditor in CAMEL-13566
0f96834 is described below

commit 0f968344de6805c908ab47d21e632020c71d1d7e
Author: Claus Ibsen <[hidden email]>
AuthorDate: Sat May 25 09:36:40 2019 +0200

    CAMEL-13557: Fixed test to use property binding support as the old has removed the legacy JDK PropertyEditor in CAMEL-13566
---
 .../main/java/org/apache/camel/maven/AbstractSalesforceMojo.java | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/AbstractSalesforceMojo.java b/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/AbstractSalesforceMojo.java
index c12eaa9..c90bac5 100644
--- a/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/AbstractSalesforceMojo.java
+++ b/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/AbstractSalesforceMojo.java
@@ -23,6 +23,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.camel.CamelContext;
 import org.apache.camel.component.salesforce.SalesforceEndpointConfig;
 import org.apache.camel.component.salesforce.SalesforceHttpClient;
 import org.apache.camel.component.salesforce.SalesforceLoginConfig;
@@ -32,7 +33,7 @@ import org.apache.camel.component.salesforce.internal.SalesforceSession;
 import org.apache.camel.component.salesforce.internal.client.DefaultRestClient;
 import org.apache.camel.component.salesforce.internal.client.RestClient;
 import org.apache.camel.impl.DefaultCamelContext;
-import org.apache.camel.support.IntrospectionSupport;
+import org.apache.camel.support.PropertyBindingSupport;
 import org.apache.camel.support.jsse.SSLContextParameters;
 import org.apache.camel.support.service.ServiceHelper;
 import org.apache.camel.util.StringHelper;
@@ -222,10 +223,12 @@ abstract class AbstractSalesforceMojo extends AbstractMojo {
     private SalesforceHttpClient createHttpClient() throws MojoExecutionException {
         final SalesforceHttpClient httpClient;
 
+        CamelContext camelContext = new DefaultCamelContext();
+
         // set ssl context parameters
         try {
             final SslContextFactory sslContextFactory = new SslContextFactory();
-            sslContextFactory.setSslContext(sslContextParameters.createSSLContext(new DefaultCamelContext()));
+            sslContextFactory.setSslContext(sslContextParameters.createSSLContext(camelContext));
 
             httpClient = new SalesforceHttpClient(sslContextFactory);
         } catch (final GeneralSecurityException e) {
@@ -244,7 +247,7 @@ abstract class AbstractSalesforceMojo extends AbstractMojo {
         // set HTTP client parameters
         if (httpClientProperties != null && !httpClientProperties.isEmpty()) {
             try {
-                IntrospectionSupport.setProperties(httpClient, new HashMap<>(httpClientProperties));
+                PropertyBindingSupport.bindProperties(camelContext, httpClient, new HashMap<>(httpClientProperties));
             } catch (final Exception e) {
                 throw new MojoExecutionException("Error setting HTTP client properties: " + e.getMessage(), e);
             }