@@ -28,7 +28,7 @@ public class TransactionUtil2 {
28
28
public static void inSession (SessionFactoryImplementor sfi , Consumer <SessionImplementor > action ) {
29
29
log .trace ( "#inSession(SF,action)" );
30
30
31
- try (SessionImplementor session = ( SessionImplementor ) sfi .openSession ()) {
31
+ try (SessionImplementor session = sfi .openSession ()) {
32
32
log .trace ( "Session opened, calling action" );
33
33
action .accept ( session );
34
34
log .trace ( "called action" );
@@ -41,7 +41,7 @@ public static void inSession(SessionFactoryImplementor sfi, Consumer<SessionImpl
41
41
public static <R > R fromSession (SessionFactoryImplementor sfi , Function <SessionImplementor ,R > action ) {
42
42
log .trace ( "#inSession(SF,action)" );
43
43
44
- try (SessionImplementor session = ( SessionImplementor ) sfi .openSession ()) {
44
+ try (SessionImplementor session = sfi .openSession ()) {
45
45
log .trace ( "Session opened, calling action" );
46
46
return action .apply ( session );
47
47
}
@@ -54,7 +54,7 @@ public static <R> R inSessionReturn(SessionFactoryImplementor sfi, Function<Sess
54
54
log .trace ( "#inSession(SF,action)" );
55
55
56
56
R result = null ;
57
- try (SessionImplementor session = ( SessionImplementor ) sfi .openSession ()) {
57
+ try (SessionImplementor session = sfi .openSession ()) {
58
58
log .trace ( "Session opened, calling action" );
59
59
result = action .apply ( session );
60
60
log .trace ( "called action" );
0 commit comments