diff --git a/server/src/main/java/access/lifecycle/UserLifeCycleController.java b/server/src/main/java/access/lifecycle/UserLifeCycleController.java index 4d6a9baf..2079afc3 100644 --- a/server/src/main/java/access/lifecycle/UserLifeCycleController.java +++ b/server/src/main/java/access/lifecycle/UserLifeCycleController.java @@ -70,7 +70,7 @@ private LifeCycleResult doDryRun(String userId, boolean dryRun) { return result; } User user = optionalUser.get(); - Set attributes = new HashSet<>(); + List attributes = new ArrayList<>(); attributes.add(new Attribute("email", user.getEmail())); attributes.add(new Attribute("eduPersonPrincipalName", user.getEduPersonPrincipalName())); attributes.add(new Attribute("schacHomeOrganization", user.getSchacHomeOrganization())); @@ -83,10 +83,10 @@ private LifeCycleResult doDryRun(String userId, boolean dryRun) { this.provisioningService.deleteUserRequest(user); userRepository.delete(user); } - result.setData(new ArrayList<>(attributes).stream() + result.setData(attributes.stream() .filter(attr -> StringUtils.hasText(attr.getValue())) .sorted(Comparator.comparing(Attribute::getName)) - .collect(Collectors.toList())); + .toList()); return result; }