Fix failed merge

This commit is contained in:
Alexander Söderberg 2020-07-17 18:00:08 +02:00
parent 3a1b56494a
commit 2a72f274c9
2 changed files with 7 additions and 12 deletions

View File

@ -36,10 +36,9 @@ public class ObjectTaskRunnable<T> implements Runnable {
private final RunnableVal<T> task; private final RunnableVal<T> task;
public ObjectTaskRunnable(final Iterator<T> iterator, public ObjectTaskRunnable(final Iterator<T> iterator,
final RunnableVal<T> task, final Runnable whenDone) { final RunnableVal<T> task) {
this.iterator = iterator; this.iterator = iterator;
this.task = task; this.task = task;
this.whenDone = whenDone;
} }
public CompletableFuture<Void> getCompletionFuture() { public CompletableFuture<Void> getCompletionFuture() {

View File

@ -25,9 +25,6 @@
*/ */
package com.plotsquared.core.util.task; package com.plotsquared.core.util.task;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.util.RuntimeExceptionRunnableVal;
import javax.annotation.Nonnegative; import javax.annotation.Nonnegative;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@ -200,15 +197,14 @@ public abstract class TaskManager {
return taskRunnable.getCompletionFuture(); return taskRunnable.getCompletionFuture();
} }
@Nonnull public static TaskManager getPlatformImplementation() { @Nullable public static TaskManager getPlatformImplementation() {
return implementation; return platformImplementation;
} }
@Nonnull public static void setPlatformImplementation(TaskManager implementation) { public static void setPlatformImplementation(@Nonnull final TaskManager implementation) {
implementation = implementation; platformImplementation = implementation;
} }
public <T> T sync(final RunnableVal<T> function) {
/** /**
* Make a synchronous method call and return the result * Make a synchronous method call and return the result
* *
@ -217,7 +213,7 @@ public abstract class TaskManager {
* @return Method result * @return Method result
* @throws Exception If the call fails * @throws Exception If the call fails
*/ */
public <T> T sync(@Nonnull final Callable<T> function) throws Exception { public <T> T sync(@Nonnull final Callable<T>function) throws Exception {
return sync(function, Integer.MAX_VALUE); return sync(function, Integer.MAX_VALUE);
} }