Skip to content

Commit

Permalink
Minor style improvements
Browse files Browse the repository at this point in the history
Co-Authored-By: Max Kießling <[email protected]>
  • Loading branch information
s1ck and DarthMax committed Nov 15, 2023
1 parent 7c2c7ff commit 20d4c0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ public class SyncBarrier {
private final BackoffIdleStrategy idleStrategy;
private final Runnable rejectAction;

public static SyncBarrier of() {
public static SyncBarrier create() {
return new SyncBarrier(() -> {});
}

public static SyncBarrier of(Runnable rejectAction) {
public static SyncBarrier create(Runnable rejectAction) {
return new SyncBarrier(rejectAction);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ class SyncBarrierTest {

@Test
void shouldSync() {
var barrier = SyncBarrier.of();
var barrier = SyncBarrier.create();
barrier.startWorker();
barrier.stopWorker();;
barrier.sync();
}

@Test
void shouldReject() {
var barrier = SyncBarrier.of(() -> {
var barrier = SyncBarrier.create(() -> {
throw new IllegalStateException();
});
barrier.sync();
Expand Down

0 comments on commit 20d4c0d

Please sign in to comment.