File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed
hibernate-reactive-core/src
main/java/org/hibernate/reactive/mutiny/impl
test/java/org/hibernate/reactive Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ <T> Uni<T> uni(Supplier<CompletionStage<T>> stageSupplier) {
54
54
@ Override
55
55
public Uni <Void > flush () {
56
56
// checkOpen();
57
- return uni ( () -> delegate . reactiveFlush () );
57
+ return uni ( delegate :: reactiveFlush );
58
58
}
59
59
60
60
@ Override
Original file line number Diff line number Diff line change @@ -74,9 +74,7 @@ public void withTransactionFindAfterFlushWithStages(TestContext context) {
74
74
.persist ( wc )
75
75
.thenCompose ( $ -> s .flush () )
76
76
.thenCompose ( $ -> s .find ( Webcomic .class , wc .getId () ) )
77
- .thenAccept ( found -> {
78
- context .assertEquals ( wc , found );
79
- } )
77
+ .thenAccept ( found -> context .assertEquals ( wc , found ) )
80
78
)
81
79
);
82
80
}
@@ -87,8 +85,8 @@ public void withTransactionFindAfterFlushWithMutiny(TestContext context) {
87
85
test ( context , getMutinySessionFactory ()
88
86
.withTransaction ( (s , tx ) -> s
89
87
.persist ( wc )
90
- .then ( () -> s .flush () )
91
- .then ( () -> s .find ( Webcomic .class , wc .getId () ) )
88
+ .call ( () -> s .flush () )
89
+ .chain ( () -> s .find ( Webcomic .class , wc .getId () ) )
92
90
.invoke ( found -> {
93
91
context .assertEquals ( wc , found );
94
92
} )
@@ -157,7 +155,7 @@ public int hashCode() {
157
155
158
156
@ Override
159
157
public String toString () {
160
- return new StringBuilder ( title ). append ( " by " ). append ( creator ). toString () ;
158
+ return title + " by " + creator ;
161
159
}
162
160
}
163
161
}
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ public void testDuplicateKeyException(TestContext context) {
54
54
}
55
55
56
56
@ Entity
57
- public class MyPerson {
57
+ public static class MyPerson {
58
58
59
59
@ Id
60
60
public String name ;
You can’t perform that action at this time.
0 commit comments