You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2018/12/30 10:15:20 UTC
[camel] branch master updated (064bf63 -> 73865c8)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.
from 064bf63 "CAMEL-13023:Add camel-rest-swagger as Karaf feature" (#2693)
new d3afbd0 CAMEL-12974: Polished
new 4005d32 Fixed rest-dsl parser typo in attribute
new 73865c8 CAMEL-12974: XML DSL tree parser should skip when/otherwise to parse similar like the Java DSL does
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../apache/camel/parser/helper/CamelJavaRestDslParserHelper.java | 2 +-
.../org/apache/camel/parser/helper/CamelXmlTreeParserHelper.java | 6 ++++--
.../java/org/apache/camel/parser/helper/RouteCoverageHelper.java | 6 +++---
3 files changed, 8 insertions(+), 6 deletions(-)
[camel] 02/03: Fixed rest-dsl parser typo in attribute
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 4005d32e30e661ba1f2c8fdfdc0dc1f33b4e65be
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Dec 30 11:00:36 2018 +0100
Fixed rest-dsl parser typo in attribute
---
.../org/apache/camel/parser/helper/CamelJavaRestDslParserHelper.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaRestDslParserHelper.java b/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaRestDslParserHelper.java
index 8c3018f..08558e6 100644
--- a/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaRestDslParserHelper.java
+++ b/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaRestDslParserHelper.java
@@ -358,7 +358,7 @@ public final class CamelJavaRestDslParserHelper {
verb.setDescription(extractValueFromFirstArgument(clazz, block, mi));
} else if ("bindingMode".equals(name)) {
verb.setBindingMode(extractValueFromFirstArgument(clazz, block, mi));
- } else if ("skipBindingOnErrorcode".equals(name)) {
+ } else if ("skipBindingOnErrorCode".equals(name)) {
verb.setSkipBindingOnErrorCode(extractValueFromFirstArgument(clazz, block, mi));
} else if ("clientRequestValidation".equals(name)) {
verb.setClientRequestValidation(extractValueFromFirstArgument(clazz, block, mi));
[camel] 01/03: CAMEL-12974: Polished
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit d3afbd0d8d85668d22a7863891c5a6cbd71b1e41
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Dec 30 10:59:44 2018 +0100
CAMEL-12974: Polished
---
.../java/org/apache/camel/parser/helper/RouteCoverageHelper.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/RouteCoverageHelper.java b/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/RouteCoverageHelper.java
index 109a2a5..387f713 100644
--- a/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/RouteCoverageHelper.java
+++ b/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/RouteCoverageHelper.java
@@ -83,7 +83,7 @@ public final class RouteCoverageHelper {
}
public static Map<String, List<CoverageData>> parseDumpRouteCoverageByClassAndTestMethod(String directory) throws Exception {
- Map<String, List<CoverageData>> answer = new LinkedHashMap();
+ Map<String, List<CoverageData>> answer = new LinkedHashMap<>();
File[] files = new File(directory).listFiles(f -> f.getName().endsWith(".xml"));
if (files == null) {
@@ -138,10 +138,10 @@ public final class RouteCoverageHelper {
// only calculate for elements within the route or children of policy/transaction
if (!"route".equals(key) && !"policy".equals(key) && !"transacted".equals(key)) {
- Integer count = 0;
+ int count = 0;
Node total = node.getAttributes().getNamedItem("exchangesTotal");
if (total != null) {
- count = Integer.valueOf(total.getNodeValue());
+ count = Integer.parseInt(total.getNodeValue());
}
CoverageData holder = data.size() > counter.get() ? data.get(counter.get()) : null;
if (holder != null && holder.getNode().equals(key)) {
[camel] 03/03: CAMEL-12974: XML DSL tree parser should skip
when/otherwise to parse similar like the Java DSL does
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 73865c8814bf9f64960a4389697f3c774d1d9f56
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Dec 30 11:09:48 2018 +0100
CAMEL-12974: XML DSL tree parser should skip when/otherwise to parse similar like the Java DSL does
---
.../org/apache/camel/parser/helper/CamelXmlTreeParserHelper.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelXmlTreeParserHelper.java b/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelXmlTreeParserHelper.java
index 23c291b..ca24642 100644
--- a/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelXmlTreeParserHelper.java
+++ b/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelXmlTreeParserHelper.java
@@ -75,11 +75,13 @@ public final class CamelXmlTreeParserHelper {
boolean isRoute = "route".equals(name) || "from".equals(name);
// must be an eip model that has either input or output as we only want to track processors (also accept from)
boolean isEip = camelCatalog.findModelNames().contains(name) && (hasInput(name) || hasOutput(name));
+ // skip when/otherwise (as we do this in Java DSL)
+ boolean isWhenOrOtherwise = "when".equals(name) || "otherwise".equals(name);
// only include if its a known Camel model (dont include languages)
if (isRoute || isEip) {
- // skip route as we just keep from
- if (!"route".equals(name)) {
+ // skip route as we just keep from (and also skip when/otherwise)
+ if (!"route".equals(name) && !isWhenOrOtherwise) {
String lineNumber = (String) node.getUserData(XmlLineNumberParser.LINE_NUMBER);
String lineNumberEnd = (String) node.getUserData(XmlLineNumberParser.LINE_NUMBER_END);
newNode = nodeFactory.newNode(parent, name);