This is an automated email from the ASF dual-hosted git repository. gnodet pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit c725911c2b01927e9420a198773e79694a2922f7 Author: Guillaume Nodet <gno...@gmail.com> AuthorDate: Tue May 14 11:02:37 2024 +0200 Remove redundant initialization --- .../language/simple/SimplePredicateParser.java | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimplePredicateParser.java b/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimplePredicateParser.java index 49695a93d8f..b7df246923b 100644 --- a/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimplePredicateParser.java +++ b/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimplePredicateParser.java @@ -664,13 +664,13 @@ public class SimplePredicateParser extends BaseSimpleParser { // based on the parameter types the binary operator support, we need to set this state into // the following booleans so we know how to proceed in the grammar - boolean literalWithFunctionsSupported = false; - boolean literalSupported = false; - boolean functionSupported = false; - boolean numericSupported = false; - boolean booleanSupported = false; - boolean nullSupported = false; - boolean minusSupported = false; + boolean literalWithFunctionsSupported; + boolean literalSupported; + boolean functionSupported; + boolean numericSupported; + boolean booleanSupported; + boolean nullSupported; + boolean minusSupported; if (types == null || types.length == 0) { literalWithFunctionsSupported = true; // favor literal with functions over literals without functions @@ -681,6 +681,13 @@ public class SimplePredicateParser extends BaseSimpleParser { nullSupported = true; minusSupported = true; } else { + literalWithFunctionsSupported = false; + literalSupported = false; + functionSupported = false; + numericSupported = false; + booleanSupported = false; + nullSupported = false; + minusSupported = false; for (BinaryOperatorType.ParameterType parameterType : types) { literalSupported |= parameterType.isLiteralSupported(); literalWithFunctionsSupported |= parameterType.isLiteralWithFunctionSupport();