allthingssecurity commented on code in PR #27525:
URL: https://github.com/apache/camel/pull/27525#discussion_r4213410921
##########
components/camel-ognl/src/main/java/org/apache/camel/language/ognl/RootObject.java:
##########
@@ -78,4 +78,27 @@ public <T> T getHeader(String name, Class<T> type) {
return exchange.getMessage().getHeader(name, type);
}
Review Comment:
The flagged line is an unchanged blank context line; the leading space is
diff syntax, and `git diff --check` reports nothing for this PR.
_Claude Code on behalf of allthingssecurity_
##########
components/camel-python3/src/main/java/org/apache/camel/language/python3/Python3Expression.java:
##########
@@ -33,6 +36,7 @@ public Python3Expression(String text) {
Python3Expression(String text, Python3Language language) {
this.text = text;
+ this.bindVariables = text != null && text.contains("variables");
Review Comment:
Intentional: python3 binds only the plural maps (`headers`, `properties`),
so it binds only `variables` and checks for the plural; JavaScript and Python
bind `variable` and `variables` like `header`/`headers`. Comment added in
11bfb39789e2.
_Claude Code on behalf of allthingssecurity_
##########
components/camel-javascript/src/main/java/org/apache/camel/language/js/JavaScriptExpression.java:
##########
@@ -34,6 +39,7 @@ public JavaScriptExpression(String expressionString, Class<?>
type) {
JavaScriptExpression(String expressionString, Class<?> type,
JavaScriptLanguage language) {
Review Comment:
Added to the comment in 11bfb39789e2: it is a plain substring match, so a
mention in a comment or string also binds the variables, which is harmless.
_Claude Code on behalf of allthingssecurity_
##########
components/camel-mvel/src/main/java/org/apache/camel/language/mvel/RootObject.java:
##########
@@ -81,4 +81,27 @@ public Object getHeader(String name) {
public <T> T getHeader(String name, Class<T> type) {
return exchange.getMessage().getHeader(name, type);
}
+
+ /**
+ * The variables of the exchange (exchange-scoped only; global and route
variables are not in this map).
+ */
+ public Map<String, Object> getVariables() {
+ return exchange.getVariables();
+ }
Review Comment:
Added `@see #getVariable(String)` for prefixed names to `getVariables()` in
MVEL and OGNL (11bfb39789e2).
_Claude Code on behalf of allthingssecurity_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]