github-advanced-security[bot] commented on code in PR #544: URL: https://github.com/apache/syncope/pull/544#discussion_r1383348360
########## ext/opensearch/client-opensearch/src/main/java/org/apache/syncope/ext/opensearch/client/OpenSearchUtils.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/1403) ########## ext/opensearch/client-opensearch/src/main/java/org/apache/syncope/ext/opensearch/client/OpenSearchUtils.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/1404) -- 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