From 2a72f274c9622196a7c2dc9cf1531135eaf8ed9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Fri, 17 Jul 2020 18:00:08 +0200 Subject: [PATCH] Fix failed merge --- .../core/util/task/ObjectTaskRunnable.java | 3 +-- .../plotsquared/core/util/task/TaskManager.java | 16 ++++++---------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/util/task/ObjectTaskRunnable.java b/Core/src/main/java/com/plotsquared/core/util/task/ObjectTaskRunnable.java index 467265967..d09cc83e0 100644 --- a/Core/src/main/java/com/plotsquared/core/util/task/ObjectTaskRunnable.java +++ b/Core/src/main/java/com/plotsquared/core/util/task/ObjectTaskRunnable.java @@ -36,10 +36,9 @@ public class ObjectTaskRunnable implements Runnable { private final RunnableVal task; public ObjectTaskRunnable(final Iterator iterator, - final RunnableVal task, final Runnable whenDone) { + final RunnableVal task) { this.iterator = iterator; this.task = task; - this.whenDone = whenDone; } public CompletableFuture getCompletionFuture() { diff --git a/Core/src/main/java/com/plotsquared/core/util/task/TaskManager.java b/Core/src/main/java/com/plotsquared/core/util/task/TaskManager.java index a5bbbc77f..81d4e9d11 100644 --- a/Core/src/main/java/com/plotsquared/core/util/task/TaskManager.java +++ b/Core/src/main/java/com/plotsquared/core/util/task/TaskManager.java @@ -25,9 +25,6 @@ */ package com.plotsquared.core.util.task; -import com.plotsquared.core.PlotSquared; -import com.plotsquared.core.util.RuntimeExceptionRunnableVal; - import javax.annotation.Nonnegative; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -72,7 +69,7 @@ public abstract class TaskManager { * Remove a string from the teleport queue * * @param string String to remove - * return {@code true} if the value was stored in the map, or {@code false} + * return {@code true} if the value was stored in the map, or {@code false} */ public static boolean removeFromTeleportQueue(@Nonnull final String string) { return teleportQueue.remove(string); @@ -200,15 +197,14 @@ public abstract class TaskManager { return taskRunnable.getCompletionFuture(); } - @Nonnull public static TaskManager getPlatformImplementation() { - return implementation; + @Nullable public static TaskManager getPlatformImplementation() { + return platformImplementation; } - @Nonnull public static void setPlatformImplementation(TaskManager implementation) { - implementation = implementation; + public static void setPlatformImplementation(@Nonnull final TaskManager implementation) { + platformImplementation = implementation; } - public T sync(final RunnableVal function) { /** * Make a synchronous method call and return the result * @@ -217,7 +213,7 @@ public abstract class TaskManager { * @return Method result * @throws Exception If the call fails */ - public T sync(@Nonnull final Callable function) throws Exception { + public T sync(@Nonnull final Callablefunction) throws Exception { return sync(function, Integer.MAX_VALUE); }