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/21 10:03:17 UTC

[camel] branch master updated (5802b21 -> 2214015)

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 5802b21  Revert "Updating Avro to 1.9.2"
     new 3438ac3  CAMEL-15559: Fixed camel-catalog validate configuration properties with spaces around = sign.
     new 2214015  Regen

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:
 .../org/apache/camel/catalog/components/braintree.json     |  2 +-
 .../java/org/apache/camel/catalog/CamelCatalogTest.java    | 14 ++++++++++++++
 .../apache/camel/catalog/impl/AbstractCamelCatalog.java    | 10 ++++++++++
 3 files changed, 25 insertions(+), 1 deletion(-)


[camel] 02/02: Regen

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 221401561b595a5e5b88412668af5a84acbea76f
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Sep 21 12:02:50 2020 +0200

    Regen
---
 .../resources/org/apache/camel/catalog/components/braintree.json        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/braintree.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/braintree.json
index 34a9327..3cb92a3 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/braintree.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/braintree.json
@@ -29,7 +29,7 @@
   },
   "properties": {
     "apiName": { "kind": "path", "displayName": "Api Name", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.braintree.internal.BraintreeApiName", "enum": [ "ADD_ON", "ADDRESS", "CLIENT_TOKEN", "CREDIT_CARD_VERIFICATION", "CUSTOMER", "DISCOUNT", "DISPUTE", "DOCUMENT_UPLOAD", "MERCHANT_ACCOUNT", "PAYMENT_METHOD", "PAYMENT_METHOD_NONCE", "PLAN", "REPORT", "SETTLEMENT_BATCH_SUMMARY", "SUBSCRIPTION", "TRANSACTION", "WEBHOOK_NOTIFIC [...]
-    "methodName": { "kind": "path", "displayName": "Method Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "What sub operation to use for the selected operation" },
+    "methodName": { "kind": "path", "displayName": "Method Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "enum": [ "accept", "addFileEvidence", "addTextEvidence", "cancel", "cancelRelease", "cloneTransaction", "create", "createForCurrency", "credit", "delete", "fetchMerchantAccounts", "finalize", "find", "generate", "grant", "holdInEscrow", "parse", "refund", "releaseFromEscrow", "removeEvidence", "retryCharge", "revoke", "sa [...]
     "environment": { "kind": "parameter", "displayName": "Environment", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.braintree.BraintreeConfiguration", "configurationField": "configuration", "description": "The environment Either SANDBOX or PRODUCTION" },
     "inBody": { "kind": "parameter", "displayName": "In Body", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Sets the name of a parameter to be passed in the exchange In Body" },
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the  [...]


[camel] 01/02: CAMEL-15559: Fixed camel-catalog validate configuration properties with spaces around = sign.

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 3438ac36cafdbea86c77a12f0ea14e148dd7873e
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Sep 21 12:02:31 2020 +0200

    CAMEL-15559: Fixed camel-catalog validate configuration properties with spaces around = sign.
---
 .../java/org/apache/camel/catalog/CamelCatalogTest.java    | 14 ++++++++++++++
 .../apache/camel/catalog/impl/AbstractCamelCatalog.java    | 10 ++++++++++
 2 files changed, 24 insertions(+)

diff --git a/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java b/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
index ad57b41..8e5694b 100644
--- a/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
+++ b/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
@@ -1476,6 +1476,20 @@ public class CamelCatalogTest {
         ConfigurationPropertiesValidationResult result = catalog.validateConfigurationProperty(text);
         assertTrue(result.isSuccess());
 
+        // spaces around
+        text = "camel.main.allow-use-original-message = true";
+        result = catalog.validateConfigurationProperty(text);
+        assertTrue(result.isSuccess());
+        text = "camel.main.allow-use-original-message= true";
+        result = catalog.validateConfigurationProperty(text);
+        assertTrue(result.isSuccess());
+        text = "camel.main.allow-use-original-message =true";
+        result = catalog.validateConfigurationProperty(text);
+        assertTrue(result.isSuccess());
+        text = "camel.main.allow-use-original-message  =   true";
+        result = catalog.validateConfigurationProperty(text);
+        assertTrue(result.isSuccess());
+
         text = "camel.main.allow-use-original-message=abc";
         result = catalog.validateConfigurationProperty(text);
         assertFalse(result.isSuccess());
diff --git a/core/camel-core-catalog/src/main/java/org/apache/camel/catalog/impl/AbstractCamelCatalog.java b/core/camel-core-catalog/src/main/java/org/apache/camel/catalog/impl/AbstractCamelCatalog.java
index 407ea4f..b34ca0e 100644
--- a/core/camel-core-catalog/src/main/java/org/apache/camel/catalog/impl/AbstractCamelCatalog.java
+++ b/core/camel-core-catalog/src/main/java/org/apache/camel/catalog/impl/AbstractCamelCatalog.java
@@ -960,6 +960,16 @@ public abstract class AbstractCamelCatalog {
         String longKey = CatalogHelper.before(line, "=");
         String key = longKey;
         String value = CatalogHelper.after(line, "=");
+        // trim values
+        if (longKey != null) {
+            longKey = longKey.trim();
+        }
+        if (key != null) {
+            key = key.trim();
+        }
+        if (value != null) {
+            value = value.trim();
+        }
 
         ConfigurationPropertiesValidationResult result = new ConfigurationPropertiesValidationResult();
         boolean accept = acceptConfigurationPropertyKey(key);