I'm testing my upgrade to 2.11 and noticed a bug in how beanMethod
invocations are parsed.
I'm using Spring to define my routes.
The following invocation expression: exec(*, '', 'arg3') gets parsed as
arg1: *
arg2: ""
arg3: ",arg3" (notice the comma).
I tracked down the bug to the class org.apache.camel.util.StringQuoteHelper.
The code-block
} else if (ch == separator) {
// add as answer if we are not in a quote
if (!singleQuoted & !doubleQuoted & sb.length() > 0) {
String text = sb.toString();
if (trim) {
text = text.trim();
answer.add(text);
sb.setLength(0);
continue;
Should instead be
} else if (ch == separator) {
// add as answer if we are not in a quote
if (!singleQuoted & !doubleQuoted) {
if (sb.length() > 0) {
String text = sb.toString();
if (trim) {
text = text.trim();
answer.add(text);
sb.setLength(0);
continue; //always skip separator if not in quotes
invocations are parsed.
I'm using Spring to define my routes.
The following invocation expression: exec(*, '', 'arg3') gets parsed as
arg1: *
arg2: ""
arg3: ",arg3" (notice the comma).
I tracked down the bug to the class org.apache.camel.util.StringQuoteHelper.
The code-block
} else if (ch == separator) {
// add as answer if we are not in a quote
if (!singleQuoted & !doubleQuoted & sb.length() > 0) {
String text = sb.toString();
if (trim) {
text = text.trim();
answer.add(text);
sb.setLength(0);
continue;
Should instead be
} else if (ch == separator) {
// add as answer if we are not in a quote
if (!singleQuoted & !doubleQuoted) {
if (sb.length() > 0) {
String text = sb.toString();
if (trim) {
text = text.trim();
answer.add(text);
sb.setLength(0);
continue; //always skip separator if not in quotes