github-advanced-security[bot] commented on code in PR #981:
URL: https://github.com/apache/syncope/pull/981#discussion_r1942658154
##########
common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/GroupTO.java:
##########
@@ -157,6 +159,21 @@
return typeExtensions;
}
+ @JsonIgnore
+ @Override
+ public Optional<RelationshipTO> getRelationship(final String type, final
String otherKey) {
+ return relationships.stream().filter(
+ relationship -> type.equals(relationship.getType()) &&
otherKey.equals(relationship.getOtherEndKey())).
+ findFirst();
+ }
+
+ @JacksonXmlElementWrapper(localName = "relationships")
+ @JacksonXmlProperty(localName = "relationship")
+ @Override
+ public List<RelationshipTO> getRelationships() {
Review Comment:
## Exposing internal representation
getRelationships exposes the internal representation stored in field
relationships. The value may be modified [after this call to
getRelationships](1).
[Show more
details](https://github.com/apache/syncope/security/code-scanning/1781)
--
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]