From 4af887c75667793c197b564f16b7e95b1f63cbc7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 9 Feb 2020 01:13:51 +0100 Subject: [PATCH] =?utf8?q?=F0=9F=9A=A8=20Suppress=20some=20warnings=20abou?= =?utf8?q?t=20unused=20parameters?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/net/pterodactylus/sone/main/TickerShutdown.kt | 2 +- .../pterodactylus/sone/web/notification/ConfigNotReadHandler.kt | 2 +- .../net/pterodactylus/sone/web/notification/FirstStartHandler.kt | 2 +- .../net/pterodactylus/sone/web/notification/StartupHandler.kt | 2 +- .../net/pterodactylus/sone/web/notification/WebOfTrustHandler.kt | 4 ++-- .../net/pterodactylus/sone/freenet/wot/WebOfTrustPingerTest.kt | 4 ++-- src/test/kotlin/net/pterodactylus/sone/main/SonePluginTest.kt | 8 ++++---- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/kotlin/net/pterodactylus/sone/main/TickerShutdown.kt b/src/main/kotlin/net/pterodactylus/sone/main/TickerShutdown.kt index 5f96050..c95da09 100644 --- a/src/main/kotlin/net/pterodactylus/sone/main/TickerShutdown.kt +++ b/src/main/kotlin/net/pterodactylus/sone/main/TickerShutdown.kt @@ -29,7 +29,7 @@ import javax.inject.* class TickerShutdown @Inject constructor(@Named("notification") private val notificationTicker: ScheduledExecutorService) { @Subscribe - fun shutdown(shutdown: Shutdown) { + fun shutdown(@Suppress("UNUSED_PARAMETER") shutdown: Shutdown) { notificationTicker.shutdown() } diff --git a/src/main/kotlin/net/pterodactylus/sone/web/notification/ConfigNotReadHandler.kt b/src/main/kotlin/net/pterodactylus/sone/web/notification/ConfigNotReadHandler.kt index 46961c0..4ad525b 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/notification/ConfigNotReadHandler.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/notification/ConfigNotReadHandler.kt @@ -28,7 +28,7 @@ import javax.inject.* class ConfigNotReadHandler @Inject constructor(private val notificationManager: NotificationManager, @Named("configNotRead") private val notification: TemplateNotification) { @Subscribe - fun configNotRead(configNotRead: ConfigNotRead) { + fun configNotRead(@Suppress("UNUSED_PARAMETER") configNotRead: ConfigNotRead) { notificationManager.addNotification(notification) } diff --git a/src/main/kotlin/net/pterodactylus/sone/web/notification/FirstStartHandler.kt b/src/main/kotlin/net/pterodactylus/sone/web/notification/FirstStartHandler.kt index aceda7e..dc9c507 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/notification/FirstStartHandler.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/notification/FirstStartHandler.kt @@ -28,7 +28,7 @@ import javax.inject.* class FirstStartHandler @Inject constructor(private val notificationManager: NotificationManager, @Named("firstStart") private val notification: TemplateNotification) { @Subscribe - fun firstStart(firstStart: FirstStart) { + fun firstStart(@Suppress("UNUSED_PARAMETER") firstStart: FirstStart) { notificationManager.addNotification(notification) } diff --git a/src/main/kotlin/net/pterodactylus/sone/web/notification/StartupHandler.kt b/src/main/kotlin/net/pterodactylus/sone/web/notification/StartupHandler.kt index 06acf94..4d81576 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/notification/StartupHandler.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/notification/StartupHandler.kt @@ -33,7 +33,7 @@ class StartupHandler @Inject constructor( @Named("notification") private val ticker: ScheduledExecutorService) { @Subscribe - fun startup(startup: Startup) { + fun startup(@Suppress("UNUSED_PARAMETER") startup: Startup) { notificationManager.addNotification(notification) ticker.schedule({ notificationManager.removeNotification(notification) }, 2, MINUTES) } diff --git a/src/main/kotlin/net/pterodactylus/sone/web/notification/WebOfTrustHandler.kt b/src/main/kotlin/net/pterodactylus/sone/web/notification/WebOfTrustHandler.kt index 924d395..f331643 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/notification/WebOfTrustHandler.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/notification/WebOfTrustHandler.kt @@ -29,12 +29,12 @@ import javax.inject.* class WebOfTrustHandler @Inject constructor(private val notificationManager: NotificationManager, @Named("webOfTrust") private val notification: TemplateNotification) { @Subscribe - fun webOfTrustAppeared(webOfTrustAppeared: WebOfTrustAppeared) { + fun webOfTrustAppeared(@Suppress("UNUSED_PARAMETER") webOfTrustAppeared: WebOfTrustAppeared) { notificationManager.removeNotification(notification) } @Subscribe - fun webOfTrustDisappeared(webOfTrustDisappeared: WebOfTrustDisappeared) { + fun webOfTrustDisappeared(@Suppress("UNUSED_PARAMETER") webOfTrustDisappeared: WebOfTrustDisappeared) { notificationManager.addNotification(notification) } 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 cbd9172..6d302c5 100644 --- a/src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustPingerTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustPingerTest.kt @@ -105,14 +105,14 @@ class WebOfTrustPingerTest { 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 - fun webOfTrustDisappeared(webOfTrustDisappeared: WebOfTrustDisappeared) { + fun webOfTrustDisappeared(@Suppress("UNUSED_PARAMETER") webOfTrustDisappeared: WebOfTrustDisappeared) { received() } } diff --git a/src/test/kotlin/net/pterodactylus/sone/main/SonePluginTest.kt b/src/test/kotlin/net/pterodactylus/sone/main/SonePluginTest.kt index 0bb03af..d1e2cec 100644 --- a/src/test/kotlin/net/pterodactylus/sone/main/SonePluginTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/main/SonePluginTest.kt @@ -110,7 +110,7 @@ class SonePluginTest { private class FirstStartListener(private val firstStartReceived: AtomicBoolean) { @Subscribe - fun firstStart(firstStart: FirstStart) { + fun firstStart(@Suppress("UNUSED_PARAMETER") firstStart: FirstStart) { firstStartReceived.set(true) } } @@ -141,7 +141,7 @@ class SonePluginTest { private class ConfigNotReadListener(private val configNotReadReceiver: AtomicBoolean) { @Subscribe - fun configNotRead(configNotRead: ConfigNotRead) { + fun configNotRead(@Suppress("UNUSED_PARAMETER") configNotRead: ConfigNotRead) { configNotReadReceiver.set(true) } } @@ -185,7 +185,7 @@ class SonePluginTest { private class StartupListener(private val startupReceived: () -> Unit) { @Subscribe - fun startup(startup: Startup) { + fun startup(@Suppress("UNUSED_PARAMETER") startup: Startup) { startupReceived() } } @@ -202,7 +202,7 @@ class SonePluginTest { private class ShutdownListener(private val shutdownReceived: () -> Unit) { @Subscribe - fun shutdown(shutdown: Shutdown) { + fun shutdown(@Suppress("UNUSED_PARAMETER") shutdown: Shutdown) { shutdownReceived() } } -- 2.7.4