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 2020/09/30 09:27:43 UTC
[camel] branch master updated: Fixed olingo tests due recent change
in generated configurer for ALL_OPTIONS
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 cb27e76 Fixed olingo tests due recent change in generated configurer for ALL_OPTIONS
cb27e76 is described below
commit cb27e76822cf98df351fefab44e295d36a93b4b9
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Sep 30 11:27:08 2020 +0200
Fixed olingo tests due recent change in generated configurer for ALL_OPTIONS
---
.../java/org/apache/camel/component/olingo2/Olingo2Endpoint.java | 7 +++++--
.../java/org/apache/camel/component/olingo4/Olingo4Endpoint.java | 7 +++++--
.../org/apache/camel/support/component/AbstractApiEndpoint.java | 3 +--
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java
index 92e3206..57259a5 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java
@@ -131,8 +131,11 @@ public class Olingo2Endpoint extends AbstractApiEndpoint<Olingo2ApiName, Olingo2
PropertyConfigurerGetter getter = (PropertyConfigurerGetter) configurer;
for (String name : getter.getAllOptions(this).keySet()) {
if (known.containsKey(name)) {
- Object value = known.remove(name);
- configurer.configure(getCamelContext(), this, name, value, true);
+ Object value = known.get(name);
+ boolean hit = configurer.configure(getCamelContext(), this, name, value, true);
+ if (hit) {
+ known.remove(name);
+ }
}
}
}
diff --git a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java
index 90c447e..cfbd9a9 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java
@@ -131,8 +131,11 @@ public class Olingo4Endpoint extends AbstractApiEndpoint<Olingo4ApiName, Olingo4
PropertyConfigurerGetter getter = (PropertyConfigurerGetter) configurer;
for (String name : getter.getAllOptions(this).keySet()) {
if (known.containsKey(name)) {
- Object value = known.remove(name);
- configurer.configure(getCamelContext(), this, name, value, true);
+ Object value = known.get(name);
+ boolean hit = configurer.configure(getCamelContext(), this, name, value, true);
+ if (hit) {
+ known.remove(name);
+ }
}
}
}
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/component/AbstractApiEndpoint.java b/core/camel-support/src/main/java/org/apache/camel/support/component/AbstractApiEndpoint.java
index a60fa2a..6e2cd7f 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/component/AbstractApiEndpoint.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/component/AbstractApiEndpoint.java
@@ -117,11 +117,10 @@ public abstract class AbstractApiEndpoint<E extends ApiName, T>
private void initState() {
// compute endpoint property names and values
- this.endpointPropertyNames = Collections.unmodifiableSet(
- getPropertiesHelper().getEndpointPropertyNames(getCamelContext(), configuration));
final HashMap<String, Object> properties = new HashMap<>();
getPropertiesHelper().getEndpointProperties(getCamelContext(), configuration, properties);
this.endpointProperties = Collections.unmodifiableMap(properties);
+ this.endpointPropertyNames = Collections.unmodifiableSet(properties.keySet());
// get endpoint property names
final Set<String> arguments = new HashSet<>(endpointPropertyNames);