projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🚨 Suppress some warnings about unused parameters
[Sone.git]
/
src
/
test
/
kotlin
/
net
/
pterodactylus
/
sone
/
freenet
/
wot
/
WebOfTrustPingerTest.kt
diff --git
a/src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustPingerTest.kt
b/src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustPingerTest.kt
index
894b9ef
..
6d302c5
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustPingerTest.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustPingerTest.kt
@@
-24,6
+24,7
@@
import net.pterodactylus.sone.utils.*
import org.hamcrest.MatcherAssert.*
import org.hamcrest.Matchers.*
import java.util.concurrent.atomic.*
import org.hamcrest.MatcherAssert.*
import org.hamcrest.Matchers.*
import java.util.concurrent.atomic.*
+import java.util.function.*
import kotlin.test.*
/**
import kotlin.test.*
/**
@@
-33,9
+34,9
@@
class WebOfTrustPingerTest {
private val eventBus = EventBus()
private val webOfTrustReachable = AtomicBoolean()
private val eventBus = EventBus()
private val webOfTrustReachable = AtomicBoolean()
- private val webOfTrustReacher
: () -> Unit =
{ webOfTrustReachable.get().onFalse { throw PluginException() } }
+ private val webOfTrustReacher
= Runnable
{ webOfTrustReachable.get().onFalse { throw PluginException() } }
private val rescheduled = AtomicBoolean()
private val rescheduled = AtomicBoolean()
- private val reschedule:
() -> Unit = {
rescheduled.set(true) }
+ private val reschedule:
Consumer<Runnable> = Consumer { if (it == pinger)
rescheduled.set(true) }
private val pinger = WebOfTrustPinger(eventBus, webOfTrustReacher, reschedule)
@Test
private val pinger = WebOfTrustPinger(eventBus, webOfTrustReacher, reschedule)
@Test
@@
-104,14
+105,14
@@
class WebOfTrustPingerTest {
private class WebOfTrustAppearedCatcher(private val received: () -> Unit) {
@Subscribe
private class WebOfTrustAppearedCatcher(private val received: () -> Unit) {
@Subscribe
- fun webOfTrustAppeared(webOfTrustAppeared: WebOfTrustAppeared) {
+ fun webOfTrustAppeared(
@Suppress("UNUSED_PARAMETER")
webOfTrustAppeared: WebOfTrustAppeared) {
received()
}
}
private class WebOfTrustDisappearedCatcher(private val received: () -> Unit) {
@Subscribe
received()
}
}
private class WebOfTrustDisappearedCatcher(private val received: () -> Unit) {
@Subscribe
- fun webOfTrustDisappeared(webOfTrustDisappeared: WebOfTrustDisappeared) {
+ fun webOfTrustDisappeared(
@Suppress("UNUSED_PARAMETER")
webOfTrustDisappeared: WebOfTrustDisappeared) {
received()
}
}
received()
}
}