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/06/28 03:57:53 UTC
[camel] branch master updated (102f170 -> a2a252a)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.
from 102f170 camel-main-maven-plugin - Add a way to grab javadoc as component option desc for ActiveMQ Artemis ConnectionFactory which has its javadoc on a special interface.
new 4361835 Fixed duplicate in pom
new a2a252a Fixed CS
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
apache-camel/pom.xml | 4 ---
.../org/apache/camel/PropertyBindingException.java | 30 ++++++++++++++--------
.../java/org/apache/camel/main/MainSupport.java | 8 +++---
.../camel/support/PropertyBindingSupport.java | 2 +-
4 files changed, 23 insertions(+), 21 deletions(-)
[camel] 01/02: Fixed duplicate in pom
Posted by da...@apache.org.
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
commit 436183501857b78603fd480991d651e19ec0baa6
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Jun 28 05:28:26 2019 +0200
Fixed duplicate in pom
---
apache-camel/pom.xml | 4 ----
1 file changed, 4 deletions(-)
diff --git a/apache-camel/pom.xml b/apache-camel/pom.xml
index 10f0839..e7a2b8a 100644
--- a/apache-camel/pom.xml
+++ b/apache-camel/pom.xml
@@ -104,10 +104,6 @@
<groupId>org.apache.camel</groupId>
<artifactId>camel-main</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-reactive-executor-vertx</artifactId>
- </dependency>
<!-- NOTE: auto-generated list of components when building camel catalog -->
<!-- camel components: START -->
[camel] 02/02: Fixed CS
Posted by da...@apache.org.
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
commit a2a252a9c188028ea95d310249d699ab12bcdbaf
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Jun 28 05:53:50 2019 +0200
Fixed CS
---
.../org/apache/camel/PropertyBindingException.java | 30 ++++++++++++++--------
.../java/org/apache/camel/main/MainSupport.java | 8 +++---
.../camel/support/PropertyBindingSupport.java | 2 +-
3 files changed, 23 insertions(+), 17 deletions(-)
diff --git a/core/camel-api/src/main/java/org/apache/camel/PropertyBindingException.java b/core/camel-api/src/main/java/org/apache/camel/PropertyBindingException.java
index 377b718..315c53e 100644
--- a/core/camel-api/src/main/java/org/apache/camel/PropertyBindingException.java
+++ b/core/camel-api/src/main/java/org/apache/camel/PropertyBindingException.java
@@ -24,27 +24,42 @@ public class PropertyBindingException extends RuntimeCamelException {
private final Object target;
private final String propertyName;
private final Object value;
- private String optionPrefix;
- private String optionKey;
+ private final String optionPrefix;
+ private final String optionKey;
public PropertyBindingException(Object target, String propertyName, Object value) {
this.target = target;
this.propertyName = propertyName;
this.value = value;
+ this.optionPrefix = null;
+ this.optionKey = null;
}
- public PropertyBindingException(Object target, String propertyName, Object value, Exception e) {
+ public PropertyBindingException(Object target, String propertyName, Object value, Throwable e) {
initCause(e);
this.target = target;
this.propertyName = propertyName;
this.value = value;
+ this.optionPrefix = null;
+ this.optionKey = null;
}
- public PropertyBindingException(Object target, Exception e) {
+ public PropertyBindingException(Object target, Throwable e) {
initCause(e);
this.target = target;
this.propertyName = null;
this.value = null;
+ this.optionPrefix = null;
+ this.optionKey = null;
+ }
+
+ public PropertyBindingException(Object target, String propertyName, Object value, String optionPrefix, String optionKey, Throwable e) {
+ initCause(e);
+ this.target = target;
+ this.propertyName = propertyName;
+ this.value = value;
+ this.optionPrefix = optionPrefix;
+ this.optionKey = optionKey;
}
@Override
@@ -78,15 +93,8 @@ public class PropertyBindingException extends RuntimeCamelException {
return optionPrefix;
}
- public void setOptionPrefix(String optionPrefix) {
- this.optionPrefix = optionPrefix;
- }
-
public String getOptionKey() {
return optionKey;
}
- public void setOptionKey(String optionKey) {
- this.optionKey = optionKey;
- }
}
diff --git a/core/camel-main/src/main/java/org/apache/camel/main/MainSupport.java b/core/camel-main/src/main/java/org/apache/camel/main/MainSupport.java
index 57be0f3..cb2f182 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/MainSupport.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/MainSupport.java
@@ -1003,7 +1003,7 @@ public abstract class MainSupport extends ServiceSupport {
if (!properties.isEmpty()) {
LOG.info("Auto configuring main from loaded properties: {}", properties.size());
- setPropertiesOnTarget(camelContext, config, properties, null,"camel.main.",
+ setPropertiesOnTarget(camelContext, config, properties, null, "camel.main.",
mainConfigurationProperties.isAutoConfigurationFailFast(), true);
}
@@ -1242,10 +1242,8 @@ public abstract class MainSupport extends ServiceSupport {
}
} catch (PropertyBindingException e) {
if (failIfNotSet) {
- // enrich the error with better details
- e.setOptionPrefix(optionPrefix);
- e.setOptionKey(optionKey);
- throw e;
+ // enrich the error with more precise details with option prefix and key
+ throw new PropertyBindingException(e.getTarget(), e.getPropertyName(), e.getValue(), optionPrefix, optionKey, e.getCause());
} else {
LOG.debug("Error setting property (" + key + ") with name: " + name + ") on bean: " + target
+ " with value: " + stringValue + ". This exception is ignored as failIfNotSet=false.", e);
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/PropertyBindingSupport.java b/core/camel-support/src/main/java/org/apache/camel/support/PropertyBindingSupport.java
index 975fea8..310042f 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/PropertyBindingSupport.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/PropertyBindingSupport.java
@@ -470,7 +470,7 @@ public final class PropertyBindingSupport {
* @param ignoreCase whether to ignore case for property keys
* @throws PropertyBindingException is thrown if error binding property, or the property was not bound
*/
- public static void bindMandatoryProperty(CamelContext camelContext, Object target, String name, Object value, boolean ignoreCase) throws PropertyBindingException{
+ public static void bindMandatoryProperty(CamelContext camelContext, Object target, String name, Object value, boolean ignoreCase) throws PropertyBindingException {
boolean bound;
if (target != null && name != null) {
try {