camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [07/10] camel git commit: Camel component docs. Fixed Catalog validator.
Date Wed, 06 Jan 2016 16:46:13 GMT
Camel component docs. Fixed Catalog validator.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2fc82556
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2fc82556
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2fc82556

Branch: refs/heads/camel-2.16.x
Commit: 2fc825566c89bb97ea8e1b1054ae23aa76d2630f
Parents: cd7c592
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Wed Jan 6 14:11:37 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Wed Jan 6 17:43:32 2016 +0100

----------------------------------------------------------------------
 .../apache/camel/component/box/BoxConfiguration.java |  2 +-
 .../apache/camel/catalog/DefaultCamelCatalog.java    | 15 +++++----------
 2 files changed, 6 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2fc82556/components/camel-box/src/main/java/org/apache/camel/component/box/BoxConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-box/src/main/java/org/apache/camel/component/box/BoxConfiguration.java
b/components/camel-box/src/main/java/org/apache/camel/component/box/BoxConfiguration.java
index fe3900f..278a52b 100644
--- a/components/camel-box/src/main/java/org/apache/camel/component/box/BoxConfiguration.java
+++ b/components/camel-box/src/main/java/org/apache/camel/component/box/BoxConfiguration.java
@@ -51,7 +51,7 @@ public class BoxConfiguration {
     @UriParam
     private IAuthSecureStorage authSecureStorage;
 
-    @UriParam @Metadata(required = "true")
+    @UriParam
     private String userName;
 
     @UriParam

http://git-wip-us.apache.org/repos/asf/camel/blob/2fc82556/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java
----------------------------------------------------------------------
diff --git a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java
b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java
index 5a619bc..db0f5ef 100644
--- a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java
+++ b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java
@@ -779,18 +779,8 @@ public class DefaultCamelCatalog implements CamelCatalog {
             }
         }
 
-        // validate all the options
-        boolean first = true;
         for (Map.Entry<String, String> property : properties.entrySet()) {
             String value = property.getValue();
-            if (first) {
-                // skip any leading double slash in first property from uri as that is from
the scheme part
-                if (value != null && value.startsWith("//")) {
-                    value = value.substring(2);
-                }
-            }
-            first = false;
-
             String originalName = property.getKey();
             String name = property.getKey();
             // the name may be using an optional prefix, so lets strip that because the options
@@ -970,6 +960,11 @@ public class DefaultCamelCatalog implements CamelCatalog {
         uri = after(uri, ":");
         String uriPath = stripQuery(uri);
 
+        // strip double slash in the start
+        if (uriPath != null && uriPath.startsWith("//")) {
+            uriPath = uriPath.substring(2);
+        }
+
         // parse the syntax and find the names of each option
         Matcher matcher = SYNTAX_PATTERN.matcher(syntax);
         List<String> word = new ArrayList<String>();


Mime
View raw message