You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/08/22 06:15:29 UTC

[camel] 03/07: CAMEL-13870: Fast property configuration of Camel endpoints. Work in progress.

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

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

commit 7d37b519cbe93624456c97714a5843f1786775d9
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Aug 22 06:35:37 2019 +0200

    CAMEL-13870: Fast property configuration of Camel endpoints. Work in progress.
---
 .../support/component/EndpointPropertyConfigurerSupport.java      | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/core/camel-support/src/main/java/org/apache/camel/support/component/EndpointPropertyConfigurerSupport.java b/core/camel-support/src/main/java/org/apache/camel/support/component/EndpointPropertyConfigurerSupport.java
index 55a47e1..406e5e1 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/component/EndpointPropertyConfigurerSupport.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/component/EndpointPropertyConfigurerSupport.java
@@ -17,6 +17,8 @@
 package org.apache.camel.support.component;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.NoTypeConversionAvailableException;
+import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.spi.EndpointPropertyConfigurer;
 
 public abstract class EndpointPropertyConfigurerSupport implements EndpointPropertyConfigurer {
@@ -45,7 +47,11 @@ public abstract class EndpointPropertyConfigurerSupport implements EndpointPrope
             }
         }
 
-        return camelContext.getTypeConverter().convertTo(type, value);
+        try {
+            return camelContext.getTypeConverter().mandatoryConvertTo(type, value);
+        } catch (NoTypeConversionAvailableException e) {
+            throw RuntimeCamelException.wrapRuntimeException(e);
+        }
     }
 
 }