gnodet-bot commented on code in PR #29832:
URL: https://github.com/apache/camel/pull/29832#discussion_r4562824720


##########
components/camel-opa/src/main/java/org/apache/camel/component/opa/OpaPolicyEvaluator.java:
##########
@@ -289,6 +320,12 @@ protected Map<String, Object> buildInput(Exchange 
exchange) {
      * the element as the body so every element is authorized against the same 
shared headers and properties.
      */
     protected Map<String, Object> buildInput(Exchange exchange, Object body, 
boolean withBody) {
+        if (inputExpression != null) {
+            Exchange element = exchange.copy();
+            element.getIn().setBody(body);

Review Comment:
   In CamelĀ 4, `getIn()` is an alias for `getMessage()`, so this call is a 
redundant duplicate of the next line. It also uses the deprecated spelling. 
Drop it:
   
   ```suggestion
               Exchange element = exchange.copy();
               element.getMessage().setBody(body);
   ```



-- 
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]

Reply via email to