camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [8/9] camel git commit: Fixed json parser for component docs
Date Fri, 19 Jun 2015 15:32:43 GMT
Fixed json parser for component docs


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

Branch: refs/heads/master
Commit: 3b6631d8673ea51f189dba52bf8d8944aae00f72
Parents: 969a5f7
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Fri Jun 19 17:26:40 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Jun 19 17:38:10 2015 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/util/JsonSchemaHelper.java     | 2 +-
 .../src/main/java/org/apache/camel/catalog/JSonSchemaHelper.java  | 2 +-
 .../main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java    | 2 +-
 .../java/org/apache/camel/maven/packaging/JSonSchemaHelper.java   | 3 +--
 4 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/3b6631d8/camel-core/src/main/java/org/apache/camel/util/JsonSchemaHelper.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/util/JsonSchemaHelper.java b/camel-core/src/main/java/org/apache/camel/util/JsonSchemaHelper.java
index 3c48267..336bf85 100644
--- a/camel-core/src/main/java/org/apache/camel/util/JsonSchemaHelper.java
+++ b/camel-core/src/main/java/org/apache/camel/util/JsonSchemaHelper.java
@@ -135,7 +135,7 @@ public final class JsonSchemaHelper {
             // we need to find the group first
             if (!found) {
                 String s = line.trim();
-                found = s.startsWith("\"" + group + "\":");
+                found = s.startsWith("\"" + group + "\":") && s.endsWith("{");
                 continue;
             }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/3b6631d8/platforms/catalog/src/main/java/org/apache/camel/catalog/JSonSchemaHelper.java
----------------------------------------------------------------------
diff --git a/platforms/catalog/src/main/java/org/apache/camel/catalog/JSonSchemaHelper.java
b/platforms/catalog/src/main/java/org/apache/camel/catalog/JSonSchemaHelper.java
index f9f628a..17e0f85 100644
--- a/platforms/catalog/src/main/java/org/apache/camel/catalog/JSonSchemaHelper.java
+++ b/platforms/catalog/src/main/java/org/apache/camel/catalog/JSonSchemaHelper.java
@@ -52,7 +52,7 @@ public final class JSonSchemaHelper {
             // we need to find the group first
             if (!found) {
                 String s = line.trim();
-                found = s.startsWith("\"" + group + "\":");
+                found = s.startsWith("\"" + group + "\":") && s.endsWith("{");
                 continue;
             }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/3b6631d8/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java
----------------------------------------------------------------------
diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java b/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java
index a67e2ca..0df1eb1 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java
@@ -285,7 +285,7 @@ final class JsonSchemaHelper {
             // we need to find the group first
             if (!found) {
                 String s = line.trim();
-                found = s.startsWith("\"" + group + "\":");
+                found = s.startsWith("\"" + group + "\":") && s.endsWith("{");
                 continue;
             }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/3b6631d8/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/JSonSchemaHelper.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/JSonSchemaHelper.java
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/JSonSchemaHelper.java
index 0d2c7f8..9b6732e 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/JSonSchemaHelper.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/JSonSchemaHelper.java
@@ -52,7 +52,7 @@ public final class JSonSchemaHelper {
             // we need to find the group first
             if (!found) {
                 String s = line.trim();
-                found = s.startsWith("\"" + group + "\":");
+                found = s.startsWith("\"" + group + "\":") && s.endsWith("{");
                 continue;
             }
 
@@ -112,5 +112,4 @@ public final class JSonSchemaHelper {
         return value;
     }
 
-
 }


Mime
View raw message