diff --git a/model/jpa/src/main/java/org/keycloak/events/jpa/JpaAdminEventQuery.java b/model/jpa/src/main/java/org/keycloak/events/jpa/JpaAdminEventQuery.java index d0a892baf7..90ae955577 100755 --- a/model/jpa/src/main/java/org/keycloak/events/jpa/JpaAdminEventQuery.java +++ b/model/jpa/src/main/java/org/keycloak/events/jpa/JpaAdminEventQuery.java @@ -160,7 +160,7 @@ public class JpaAdminEventQuery implements AdminEventQuery { query.setMaxResults(maxResults); } - return closing(query.getResultStream().map(JpaEventStoreProvider::convertAdminEvent)); + return closing(query.getResultList().stream().map(JpaEventStoreProvider::convertAdminEvent)); } } diff --git a/model/jpa/src/main/java/org/keycloak/events/jpa/JpaEventQuery.java b/model/jpa/src/main/java/org/keycloak/events/jpa/JpaEventQuery.java index c3e2035c42..f6f96cc3a9 100644 --- a/model/jpa/src/main/java/org/keycloak/events/jpa/JpaEventQuery.java +++ b/model/jpa/src/main/java/org/keycloak/events/jpa/JpaEventQuery.java @@ -134,7 +134,7 @@ public class JpaEventQuery implements EventQuery { } - return closing(query.getResultStream().map(JpaEventStoreProvider::convertEvent)); + return closing(query.getResultList().stream().map(JpaEventStoreProvider::convertEvent)); } }