🚨 Suppress some warnings about unused parameters
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 9 Feb 2020 00:13:51 +0000 (01:13 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 9 Feb 2020 00:14:33 +0000 (01:14 +0100)
src/main/kotlin/net/pterodactylus/sone/main/TickerShutdown.kt
src/main/kotlin/net/pterodactylus/sone/web/notification/ConfigNotReadHandler.kt
src/main/kotlin/net/pterodactylus/sone/web/notification/FirstStartHandler.kt
src/main/kotlin/net/pterodactylus/sone/web/notification/StartupHandler.kt
src/main/kotlin/net/pterodactylus/sone/web/notification/WebOfTrustHandler.kt
src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustPingerTest.kt
src/test/kotlin/net/pterodactylus/sone/main/SonePluginTest.kt

index 5f96050..c95da09 100644 (file)
@@ -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()
        }
 
index 46961c0..4ad525b 100644 (file)
@@ -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)
        }
 
index aceda7e..dc9c507 100644 (file)
@@ -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)
        }
 
index 06acf94..4d81576 100644 (file)
@@ -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)
        }
index 924d395..f331643 100644 (file)
@@ -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)
        }
 
index cbd9172..6d302c5 100644 (file)
@@ -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()
        }
 }
index 0bb03af..d1e2cec 100644 (file)
@@ -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()
                }
        }