andrea-patricelli commented on code in PR #1256:
URL: https://github.com/apache/syncope/pull/1256#discussion_r2592925191
##########
core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPAUser.java:
##########
@@ -334,8 +334,7 @@ public void addToPasswordHistory(final String password) {
@Override
public void removeOldestEntriesFromPasswordHistory(final int n) {
List<String> ph = getPasswordHistory();
- ph.subList(n, ph.size());
- passwordHistory = POJOHelper.serialize(ph);
+ passwordHistory = POJOHelper.serialize(new
ArrayList<>(ph.subList(Math.min(n, ph.size()), ph.size())));
Review Comment:
not necessarily, only to guarantee to serialize a clean list, but could be
removed.
--
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]