Fix trying to modify immutable collection

This commit is contained in:
Andreas Svanberg 2025-03-26 18:38:51 +01:00
parent 220a8a454d
commit c30ed02659
Signed by: ansv7779
GPG Key ID: 729B051CFFD42F92

@ -14,6 +14,7 @@ import se.su.dsv.oauth2.admin.repository.ClientRow;
import java.security.Principal;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Optional;
@ -94,7 +95,7 @@ public class ClientManager implements RegisteredClientRepository, ClientManageme
private Client toClient(final ClientRow clientRow) {
List<String> owners = clientRepository.getOwners(clientRow.id());
List<String> owners = new ArrayList<>(clientRepository.getOwners(clientRow.id()));
owners.sort(Comparator.naturalOrder());
Set<String> scopes = clientRow.scopeSet();
boolean isPublic = clientRow.isPublic();