From e3c64387fa32554580e474061245d20b98c15755 Mon Sep 17 00:00:00 2001 From: Stephen Allen Date: Tue, 24 Sep 2024 12:16:12 -0400 Subject: [PATCH] HHH-18610 - Fix SingleTableNativeQueryTest to only use Java 11 --- .../orm/test/inheritance/SingleTableNativeQueryTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/SingleTableNativeQueryTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/SingleTableNativeQueryTest.java index 4ae376f0ca..b3d7f251a8 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/SingleTableNativeQueryTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/SingleTableNativeQueryTest.java @@ -10,6 +10,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; import jakarta.persistence.CascadeType; import jakarta.persistence.Column; @@ -66,7 +67,7 @@ public class SingleTableNativeQueryTest extends BaseEntityManagerFunctionalTestC doInHibernate(this::entityManagerFactory, session -> { loadData(session); List results = session.createNativeQuery("select {p.*} from person p order by p.name", Object.class).addEntity("p", Person.class).list(); - assertThat( results.stream().map(p -> ((Person)p).getName()).toList(), contains("Jane", "John", "Mark", "Susan") ); + assertThat( results.stream().map(p -> ((Person)p).getName()).collect(Collectors.toList()), contains("Jane", "John", "Mark", "Susan") ); } ); }