From 20d4c0d294a5463446e06b0b3af2a7ee09eea5bc Mon Sep 17 00:00:00 2001 From: Martin Junghanns Date: Mon, 13 Nov 2023 11:37:52 +0100 Subject: [PATCH] Minor style improvements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Max Kießling --- .../main/java/org/neo4j/gds/core/concurrency/SyncBarrier.java | 4 ++-- .../java/org/neo4j/gds/core/concurrency/SyncBarrierTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/neo4j/gds/core/concurrency/SyncBarrier.java b/core/src/main/java/org/neo4j/gds/core/concurrency/SyncBarrier.java index e8d73e6db2..7946226552 100644 --- a/core/src/main/java/org/neo4j/gds/core/concurrency/SyncBarrier.java +++ b/core/src/main/java/org/neo4j/gds/core/concurrency/SyncBarrier.java @@ -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); } diff --git a/core/src/test/java/org/neo4j/gds/core/concurrency/SyncBarrierTest.java b/core/src/test/java/org/neo4j/gds/core/concurrency/SyncBarrierTest.java index 83a7e25665..66de8be9af 100644 --- a/core/src/test/java/org/neo4j/gds/core/concurrency/SyncBarrierTest.java +++ b/core/src/test/java/org/neo4j/gds/core/concurrency/SyncBarrierTest.java @@ -26,7 +26,7 @@ class SyncBarrierTest { @Test void shouldSync() { - var barrier = SyncBarrier.of(); + var barrier = SyncBarrier.create(); barrier.startWorker(); barrier.stopWorker();; barrier.sync(); @@ -34,7 +34,7 @@ void shouldSync() { @Test void shouldReject() { - var barrier = SyncBarrier.of(() -> { + var barrier = SyncBarrier.create(() -> { throw new IllegalStateException(); }); barrier.sync();