From 74b2541d103fa358c3a16c42ab0490e696102419 Mon Sep 17 00:00:00 2001 From: Tero Saarni Date: Thu, 25 Aug 2022 09:11:15 +0300 Subject: [PATCH] Fix invalid method reference when compiling with JDK17 (#13621) Closes #13961 --- .../model/session/OfflineSessionPersistenceTest.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/testsuite/model/src/test/java/org/keycloak/testsuite/model/session/OfflineSessionPersistenceTest.java b/testsuite/model/src/test/java/org/keycloak/testsuite/model/session/OfflineSessionPersistenceTest.java index c8133d494a..d4ecc196db 100644 --- a/testsuite/model/src/test/java/org/keycloak/testsuite/model/session/OfflineSessionPersistenceTest.java +++ b/testsuite/model/src/test/java/org/keycloak/testsuite/model/session/OfflineSessionPersistenceTest.java @@ -176,12 +176,10 @@ public class OfflineSessionPersistenceTest extends KeycloakModelTest { @RequireProvider(value = UserSessionProvider.class, only = InfinispanUserSessionProviderFactory.PROVIDER_ID) public void testPersistenceMultipleNodesClientSessionAtSameNode() throws InterruptedException { int numClients = 2; - List clientIds = withRealm(realmId, (session, realm) -> { - return IntStream.range(0, numClients) + List clientIds = withRealm(realmId, (session, realm) -> IntStream.range(0, numClients) .mapToObj(cid -> session.clients().addClient(realm, "client-" + cid)) .map(ClientModel::getId) - .collect(Collectors.toList()); - }); + .collect(Collectors.toList())); // Shutdown factory -> enforce session persistence closeKeycloakSessionFactory(); @@ -234,12 +232,10 @@ public class OfflineSessionPersistenceTest extends KeycloakModelTest { @RequireProvider(UserSessionPersisterProvider.class) @RequireProvider(value = UserSessionProvider.class, only = InfinispanUserSessionProviderFactory.PROVIDER_ID) public void testPersistenceMultipleNodesClientSessionsAtRandomNode() throws InterruptedException { - List clientIds = withRealm(realmId, (session, realm) -> { - return IntStream.range(0, 5) + List clientIds = withRealm(realmId, (session, realm) -> IntStream.range(0, 5) .mapToObj(cid -> session.clients().addClient(realm, "client-" + cid)) .map(ClientModel::getId) - .collect(Collectors.toList()); - }); + .collect(Collectors.toList())); List offlineSessionIds = createOfflineSessions(realmId, userIds); // Shutdown factory -> enforce session persistence