camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [5/7] camel git commit: CAMEL-11576 - Fixed a NPE bug
Date Sun, 23 Jul 2017 14:20:51 GMT
CAMEL-11576 - Fixed a NPE bug


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

Branch: refs/heads/master
Commit: 49c3c024d4f8de9b89da5b7c738e123011a74180
Parents: cf46c8f
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sun Jul 23 15:29:03 2017 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun Jul 23 15:29:03 2017 +0200

----------------------------------------------------------------------
 .../org/apache/camel/runtimecatalog/AbstractCamelCatalog.java  | 6 ++++--
 .../java/org/apache/camel/catalog/AbstractCamelCatalog.java    | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/49c3c024/camel-core/src/main/java/org/apache/camel/runtimecatalog/AbstractCamelCatalog.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/runtimecatalog/AbstractCamelCatalog.java
b/camel-core/src/main/java/org/apache/camel/runtimecatalog/AbstractCamelCatalog.java
index eeab211..9500634 100644
--- a/camel-core/src/main/java/org/apache/camel/runtimecatalog/AbstractCamelCatalog.java
+++ b/camel-core/src/main/java/org/apache/camel/runtimecatalog/AbstractCamelCatalog.java
@@ -898,11 +898,13 @@ public abstract class AbstractCamelCatalog {
         rows = JSonSchemaHelper.parseJsonSchema("properties", json, true);
 
         // clip the scheme from the syntax
-        originalSyntax = after(originalSyntax, ":");
+        String syntax = "";
+        if (originalSyntax.contains(":")) {
+            originalSyntax = after(originalSyntax, ":");
+        }
 
         // build at first according to syntax (use a tree map as we want the uri options
sorted)
         Map<String, String> copy = new TreeMap<>(properties);
-        String syntax = "";
         Matcher syntaxMatcher = COMPONENT_SYNTAX_PARSER.matcher(originalSyntax);
         while (syntaxMatcher.find()) {
             syntax += syntaxMatcher.group(1);

http://git-wip-us.apache.org/repos/asf/camel/blob/49c3c024/platforms/camel-catalog/src/main/java/org/apache/camel/catalog/AbstractCamelCatalog.java
----------------------------------------------------------------------
diff --git a/platforms/camel-catalog/src/main/java/org/apache/camel/catalog/AbstractCamelCatalog.java
b/platforms/camel-catalog/src/main/java/org/apache/camel/catalog/AbstractCamelCatalog.java
index 3a97691..78333c2 100644
--- a/platforms/camel-catalog/src/main/java/org/apache/camel/catalog/AbstractCamelCatalog.java
+++ b/platforms/camel-catalog/src/main/java/org/apache/camel/catalog/AbstractCamelCatalog.java
@@ -898,11 +898,13 @@ public abstract class AbstractCamelCatalog {
         rows = JSonSchemaHelper.parseJsonSchema("properties", json, true);
 
         // clip the scheme from the syntax
-        originalSyntax = after(originalSyntax, ":");
+        String syntax = "";
+        if (originalSyntax.contains(":")) {
+            originalSyntax = after(originalSyntax, ":");
+        }
 
         // build at first according to syntax (use a tree map as we want the uri options
sorted)
         Map<String, String> copy = new TreeMap<>(properties);
-        String syntax = "";
         Matcher syntaxMatcher = COMPONENT_SYNTAX_PARSER.matcher(originalSyntax);
         while (syntaxMatcher.find()) {
             syntax += syntaxMatcher.group(1);


Mime
View raw message