remove unnecessary casts

This commit is contained in:
Gavin King 2024-11-30 15:16:50 +01:00
parent 5f516cb350
commit 687e5cdd0e
1 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ public class TransactionUtil2 {
public static void inSession(SessionFactoryImplementor sfi, Consumer<SessionImplementor> 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> R fromSession(SessionFactoryImplementor sfi, Function<SessionImplementor,R> 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" );