Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DCAAE200CCE for ; Sun, 23 Jul 2017 16:20:49 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DB3FB1646FC; Sun, 23 Jul 2017 14:20:49 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 371BC16471D for ; Sun, 23 Jul 2017 16:20:49 +0200 (CEST) Received: (qmail 20360 invoked by uid 500); 23 Jul 2017 14:20:48 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 20271 invoked by uid 99); 23 Jul 2017 14:20:48 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Jul 2017 14:20:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2216EDFA6C; Sun, 23 Jul 2017 14:20:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davsclaus@apache.org To: commits@camel.apache.org Date: Sun, 23 Jul 2017 14:20:51 -0000 Message-Id: <2d7edbd123164b289d7e775b46f59034@git.apache.org> In-Reply-To: <25361a5c13ec4f57b851fce0dbd0d887@git.apache.org> References: <25361a5c13ec4f57b851fce0dbd0d887@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [5/7] camel git commit: CAMEL-11576 - Fixed a NPE bug archived-at: Sun, 23 Jul 2017 14:20:50 -0000 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 Authored: Sun Jul 23 15:29:03 2017 +0200 Committer: Claus Ibsen 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 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 copy = new TreeMap<>(properties); - String syntax = ""; Matcher syntaxMatcher = COMPONENT_SYNTAX_PARSER.matcher(originalSyntax); while (syntaxMatcher.find()) { syntax += syntaxMatcher.group(1);