github-advanced-security[bot] commented on code in PR #743:
URL: https://github.com/apache/syncope/pull/743#discussion_r1633139486
##########
common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/AnyOperations.java:
##########
@@ -494,17 +494,16 @@
}
// 1. relationships
- anyObjectUR.getRelationships().
- forEach(relPatch -> {
- if (relPatch.getRelationshipTO() == null) {
- LOG.warn("Invalid {} specified: {}",
RelationshipUR.class.getName(), relPatch);
- } else {
-
result.getRelationships().remove(relPatch.getRelationshipTO());
- if (relPatch.getOperation() ==
PatchOperation.ADD_REPLACE) {
-
result.getRelationships().add(relPatch.getRelationshipTO());
- }
- }
- });
+ anyObjectUR.getRelationships().forEach(relPatch -> {
+ if (relPatch.getRelationshipTO() == null) {
+ LOG.warn("Invalid {} specified: {}",
RelationshipUR.class.getName(), relPatch);
Review Comment:
## Use of default toString()
Default toString(): RelationshipUR inherits toString() from Object, and so
is not suitable for printing.
[Show more
details](https://github.com/apache/syncope/security/code-scanning/1604)
--
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]