From b725dc4f2025d77733ad44c92c4cdaef75eb304f Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Thu, 12 Jan 2023 11:37:58 +0000 Subject: [PATCH] Prefer using asEntityInitializer() over direct cast --- .../results/internal/domain/CircularBiDirectionalFetchImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hibernate-core/src/main/java/org/hibernate/sql/results/internal/domain/CircularBiDirectionalFetchImpl.java b/hibernate-core/src/main/java/org/hibernate/sql/results/internal/domain/CircularBiDirectionalFetchImpl.java index 15e29c8531..e70b718159 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/results/internal/domain/CircularBiDirectionalFetchImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/results/internal/domain/CircularBiDirectionalFetchImpl.java @@ -248,7 +248,7 @@ public class CircularBiDirectionalFetchImpl implements BiDirectionalFetch { return null; } - return (EntityInitializer) parentInitializer; + return parentInitializer.asEntityInitializer(); } @Override