CAMEL-22894: extract math and string Simple functions into dedicated factories#23388
Merged
Conversation
a2e589f to
07fc057
Compare
…factories Extract abs/floor/ceil/sum/max/min/average into MathFunctionFactory and replace/substring/substringBefore/substringAfter/substringBetween/contains/ trim/val/capitalize/pad/concat/quote/safeQuote/unquote/uppercase/lowercase/ length/size/normalizeWhitespace into StringFunctionFactory. Consolidates the full codeSplitSafe implementation into SimpleFunctionHelper (deprecating the delegation stub on SimpleFunctionExpression). Reduces SimpleFunctionExpression from ~3600 to ~2300 lines. Also fix a few typos present on the Simple language documentation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
davsclaus
approved these changes
May 21, 2026
Contributor
|
🧪 CI tested the following changed modules:
Build reactor — dependencies compiled but only changed modules were tested (2 modules)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Extract Simple language math and string functions from the monolithic
SimpleFunctionExpressioninto dedicatedSimpleLanguageFunctionFactoryimplementations, continuing the refactoring started in #23382.MathFunctionFactory: handlesabs,floor,ceil,sum,max,min,average(both expression and CSimple code-gen paths)StringFunctionFactory: handlesreplace,substring,substringBefore,substringAfter,substringBetween,contains,trim,val,capitalize,pad,concat,quote,safeQuote,unquote,uppercase,lowercase,length,size,normalizeWhitespace(both paths)codeSplitSafeimplementation intoSimpleFunctionHelper, deprecating the delegation stub onSimpleFunctionExpressionSimpleFunctionDispatcher.BUILT_INSSimpleFunctionExpressionfrom ~3600 to ~2300 linesDocumentation fixes (
simple-language.adoc)substring(num1,num2)andsubstring(num1,num2,exp)table descriptions: explicitly states thatnum1clips from the beginning andnum2clips from the ending.contains(text),contains(exp,text), andiif(predicate,trueExp,falseExp)table entries.substringBetween(after,before)andsubstringBetween(exp,after,before)table entries.isAlpha()andisAlpha(exp)descriptions: changed "numeric value" to "alphabetic value".Claude Code on behalf of Adriano Machado
Target
mainbranch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.🤖 Generated with Claude Code