github-advanced-security[bot] commented on code in PR #544:
URL: https://github.com/apache/syncope/pull/544#discussion_r1382533500


##########
ext/elasticsearch/client-elasticsearch/src/main/java/org/apache/syncope/ext/elasticsearch/client/ElasticsearchUtils.java:
##########
@@ -193,6 +198,21 @@
     protected void customizeDocument(final Map<String, Object> builder, final 
User user) {
     }
 
+    public Map<String, Object> document(final Realm realm) {
+        Map<String, Object> builder = new HashMap<>();
+        builder.put("id", realm.getKey());
+        builder.put("name", realm.getName());
+        builder.put("parent_id", realm.getParent() == null ? null : 
realm.getParent().getKey());
+        builder.put("fullPath", realm.getFullPath());
+
+        customizeDocument(builder, realm);
+
+        return builder;
+    }
+
+    protected void customizeDocument(final Map<String, Object> builder, final 
Realm realm) {

Review Comment:
   ## Useless parameter
   
   The parameter 'builder' is never used.
   
   [Show more 
details](https://github.com/apache/syncope/security/code-scanning/1401)



##########
ext/elasticsearch/client-elasticsearch/src/main/java/org/apache/syncope/ext/elasticsearch/client/ElasticsearchUtils.java:
##########
@@ -193,6 +198,21 @@
     protected void customizeDocument(final Map<String, Object> builder, final 
User user) {
     }
 
+    public Map<String, Object> document(final Realm realm) {
+        Map<String, Object> builder = new HashMap<>();
+        builder.put("id", realm.getKey());
+        builder.put("name", realm.getName());
+        builder.put("parent_id", realm.getParent() == null ? null : 
realm.getParent().getKey());
+        builder.put("fullPath", realm.getFullPath());
+
+        customizeDocument(builder, realm);
+
+        return builder;
+    }
+
+    protected void customizeDocument(final Map<String, Object> builder, final 
Realm realm) {

Review Comment:
   ## Useless parameter
   
   The parameter 'realm' is never used.
   
   [Show more 
details](https://github.com/apache/syncope/security/code-scanning/1402)



-- 
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-unsubscr...@syncope.apache.org

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

Reply via email to