Skip to content

Commit 00ea9da

Browse files
committed
Small clean up
1 parent c247d46 commit 00ea9da

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • frameworks/Java/quarkus/resteasy-reactive-hibernate-reactive/src/main/java/io/quarkus/benchmark/repository

frameworks/Java/quarkus/resteasy-reactive-hibernate-reactive/src/main/java/io/quarkus/benchmark/repository/WorldRepository.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ public Uni<List<World>> findStateless(Mutiny.StatelessSession s, int count) {
5151
final List<World> worlds = new ArrayList<>(count);
5252
Uni<Void> loopRoot = Uni.createFrom().voidItem();
5353
for (int i = 0; i < count; i++) {
54-
loopRoot = loopRoot.chain(() -> s.get(World.class, localRandom.getNextRandom()).invoke(worlds::add).replaceWithVoid());
54+
loopRoot = loopRoot.call(() -> s.get(World.class, localRandom.getNextRandom()).invoke(worlds::add));
5555
}
56-
return loopRoot.map(v -> worlds);
56+
return loopRoot.replaceWith(worlds);
5757
}
5858

5959
public Uni<List<World>> findManaged(Mutiny.Session s, int count) {
@@ -65,9 +65,9 @@ public Uni<List<World>> findManaged(Mutiny.Session s, int count) {
6565
final LocalRandom localRandom = Randomizer.current();
6666
Uni<Void> loopRoot = Uni.createFrom().voidItem();
6767
for (int i = 0; i < count; i++) {
68-
loopRoot = loopRoot.chain(() -> s.find(World.class, localRandom.getNextRandom()).invoke(worlds::add).replaceWithVoid());
68+
loopRoot = loopRoot.call(() -> s.find(World.class, localRandom.getNextRandom()).invoke(worlds::add));
6969
}
70-
return loopRoot.map(v -> worlds);
70+
return loopRoot.replaceWith(worlds);
7171
}
7272

7373
public Uni<World> findStateless() {

0 commit comments

Comments
 (0)