From 687e5cdd0e5e7917bac05bd4cfe3a3281ca74508 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Sat, 30 Nov 2024 15:16:50 +0100 Subject: [PATCH] remove unnecessary casts --- .../org/hibernate/testing/transaction/TransactionUtil2.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hibernate-testing/src/main/java/org/hibernate/testing/transaction/TransactionUtil2.java b/hibernate-testing/src/main/java/org/hibernate/testing/transaction/TransactionUtil2.java index a5629bc64b..7bd0c8a059 100644 --- a/hibernate-testing/src/main/java/org/hibernate/testing/transaction/TransactionUtil2.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/transaction/TransactionUtil2.java @@ -28,7 +28,7 @@ public class TransactionUtil2 { public static void inSession(SessionFactoryImplementor sfi, Consumer action) { log.trace( "#inSession(SF,action)" ); - try (SessionImplementor session = (SessionImplementor) sfi.openSession()) { + try (SessionImplementor session = sfi.openSession()) { log.trace( "Session opened, calling action" ); action.accept( session ); log.trace( "called action" ); @@ -41,7 +41,7 @@ public class TransactionUtil2 { public static R fromSession(SessionFactoryImplementor sfi, Function action) { log.trace( "#inSession(SF,action)" ); - try (SessionImplementor session = (SessionImplementor) sfi.openSession()) { + try (SessionImplementor session = sfi.openSession()) { log.trace( "Session opened, calling action" ); return action.apply( session ); } @@ -54,7 +54,7 @@ public class TransactionUtil2 { log.trace( "#inSession(SF,action)" ); R result = null; - try (SessionImplementor session = (SessionImplementor) sfi.openSession()) { + try (SessionImplementor session = sfi.openSession()) { log.trace( "Session opened, calling action" ); result = action.apply( session ); log.trace( "called action" );