-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iif expression (ternary) for (c)simple language #14888
Conversation
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🤖 CI automation will test this PR automatically. 🐫 Apache Camel Committers, please review the following items:
|
...l-core-languages/src/main/java/org/apache/camel/language/simple/SimpleExpressionBuilder.java
Outdated
Show resolved
Hide resolved
core/camel-core-languages/src/main/docs/modules/languages/pages/simple-language.adoc
Outdated
Show resolved
Hide resolved
core/camel-core-languages/src/main/docs/modules/languages/pages/simple-language.adoc
Outdated
Show resolved
Hide resolved
core/camel-core-languages/src/main/docs/modules/languages/pages/simple-language.adoc
Outdated
Show resolved
Hide resolved
core/camel-core-languages/src/main/docs/modules/languages/pages/simple-language.adoc
Outdated
Show resolved
Hide resolved
core/camel-core-languages/src/main/docs/modules/languages/pages/simple-language.adoc
Outdated
Show resolved
Hide resolved
core/camel-core-languages/src/main/docs/modules/languages/pages/simple-language.adoc
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few javadoc improvements and this empty method which needs to be removed I think.
Oh the simple language is as its name intended for simpler programming. We do not have control loops in the language, so adding I guess the java standard with How often do you need this and do you have real-world use-cases where it would be good to have. The groovy language is already support and works great for more power. |
I'm proposing this change because I've been working with a lot of projects that are using the Choice DSL to set headers/properties variables on a ternary-like fashion. Refactoring the choice block as a Groovy expression is definitely an option, but I was looking for a solution that did not requires extra dependencies. |
Okay I created a ticket - its good to have this functionality (see JIRA) |
Replaced by new PR: #15168 |
Description
This pull request adds a new expression to Simple language, IIF, which works as a ternary.
Target
camel-3.x
, whereas Camel 4 uses themain
branch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTests
locally and I have committed all auto-generated changes