@@ -28,7 +28,7 @@ public class TransactionUtil2 {
2828 public static void inSession (SessionFactoryImplementor sfi , Consumer <SessionImplementor > action ) {
2929 log .trace ( "#inSession(SF,action)" );
3030
31- try (SessionImplementor session = ( SessionImplementor ) sfi .openSession ()) {
31+ try (SessionImplementor session = sfi .openSession ()) {
3232 log .trace ( "Session opened, calling action" );
3333 action .accept ( session );
3434 log .trace ( "called action" );
@@ -41,7 +41,7 @@ public static void inSession(SessionFactoryImplementor sfi, Consumer<SessionImpl
4141 public static <R > R fromSession (SessionFactoryImplementor sfi , Function <SessionImplementor ,R > action ) {
4242 log .trace ( "#inSession(SF,action)" );
4343
44- try (SessionImplementor session = ( SessionImplementor ) sfi .openSession ()) {
44+ try (SessionImplementor session = sfi .openSession ()) {
4545 log .trace ( "Session opened, calling action" );
4646 return action .apply ( session );
4747 }
@@ -54,7 +54,7 @@ public static <R> R inSessionReturn(SessionFactoryImplementor sfi, Function<Sess
5454 log .trace ( "#inSession(SF,action)" );
5555
5656 R result = null ;
57- try (SessionImplementor session = ( SessionImplementor ) sfi .openSession ()) {
57+ try (SessionImplementor session = sfi .openSession ()) {
5858 log .trace ( "Session opened, calling action" );
5959 result = action .apply ( session );
6060 log .trace ( "called action" );
0 commit comments