You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by GitBox <gi...@apache.org> on 2022/06/27 16:21:39 UTC

[GitHub] [syncope] github-code-scanning[bot] commented on a diff in pull request #356: [SYNCOPE-1685] Powering up JexlUtils and JEXLItemTransformerImpl

github-code-scanning[bot] commented on code in PR #356:
URL: https://github.com/apache/syncope/pull/356#discussion_r907568951


##########
core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/JEXLItemTransformerImpl.java:
##########
@@ -56,40 +60,79 @@
         this.pullJEXL = pullJEXL;
     }
 
+    protected AttrSchemaType beforePropagation(
+            final PlainAttrValue value, final Any<?> any, final AttrSchemaType schemaType) {
+
+        JexlContext jexlContext = new MapContext();
+        if (any != null) {
+            JexlUtils.addFieldsToContext(any, jexlContext);
+            JexlUtils.addPlainAttrsToContext(any.getPlainAttrs(), jexlContext);
+            JexlUtils.addDerAttrsToContext(any, derAttrHandler, jexlContext);
+        }
+        jexlContext.set("value", value.getValue());
+
+        Object tValue = JexlUtils.evaluate(propagationJEXL, jexlContext);
+        AttrSchemaType tType = schemaType;

Review Comment:
   ## Unread local variable
   
   Variable 'AttrSchemaType tType' is never read.
   
   [Show more details](https://github.com/apache/syncope/security/code-scanning/1060)



-- 
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: dev-unsubscribe@syncope.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org