camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: CAMEL-11576 - Fixed a NPE bug
Date Sun, 23 Jul 2017 14:26:08 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.19.x f8d4c88f1 -> 2fc8c573e


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/2fc8c573
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2fc8c573
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2fc8c573

Branch: refs/heads/camel-2.19.x
Commit: 2fc8c573edc31cc16f30b16f8b6836716206de62
Parents: f8d4c88
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 16:25:51 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/2fc8c573/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/2fc8c573/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