Skip to content

Commit 84e0695

Browse files
committed
forgot that Java must provide every parameter implicitly for the method
1 parent b27e494 commit 84e0695

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,6 @@ All suspend functions also provide a `CompletableFuture` variant,
7474
allowing you to call them directly from Java without dealing with coroutines.
7575

7676
```java
77-
CompletableFuture<JavaServerStatus> status = JavaServer.getStatusAsync("mc.hypixel.net");
77+
CompletableFuture<JavaServerStatus> status =
78+
JavaServer.getStatusAsync("mc.hypixel.net", 25565, 2000);
7879
```

src/main/kotlin/tech/aliorpse/mcutils/utils/DispatcherUtil.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ package tech.aliorpse.mcutils.utils
33
import kotlinx.coroutines.Dispatchers
44
import kotlinx.coroutines.currentCoroutineContext
55
import kotlinx.coroutines.withContext
6-
import kotlin.coroutines.CoroutineContext
76

87
suspend fun <T> withDispatcherIO(block: suspend () -> T): T {
9-
val currentContext: CoroutineContext = currentCoroutineContext()
8+
val currentContext = currentCoroutineContext()
109
return if (Dispatchers.IO.isDispatchNeeded(currentContext)) {
1110
withContext(Dispatchers.IO) { block() }
1211
} else {

0 commit comments

Comments
 (0)