šŸ”„ Fix some compiler warnings
authorDavid ā€˜Bombeā€™ Roden <bombe@pterodactylus.net>
Sat, 28 Sep 2024 21:24:47 +0000 (23:24 +0200)
committerDavid ā€˜Bombeā€™ Roden <bombe@pterodactylus.net>
Sun, 29 Sep 2024 07:56:42 +0000 (09:56 +0200)
commit2e088cfcfb40fe9379b305bd833130eca7b4675e
treed7bd04a20e4024ed599e05206dc4c482a7b02bcd
parent4d6646e442b3422d346e7329a46b1e972b9f7d88
šŸ”„ Fix some compiler warnings

The following warnings have been taken care of:

- Unused ā€œeventā€ parameters, used by Guavaā€™s EventBus to identify event
  listener methods; reworked as extension methods
- A type mismatch caused by an unbounded type parameter
- Deprecated usages of String.capitalize() and .toLowerCase()
- Replace usage of Guavaā€™s deprecated Files.write()
- Unchecked cast (solved by removing the whole piece of code, which was
  unused)
- Some unused parameters and variables
- Uses of ExpectedException in tests; replaced by assertThrows()
- Warning about usage of deprecated getPluginTalker() method was
  suppressed
- Suppressed some more warnings about unchecked casts
- Change a number of casts to wildcard types
- Specified some type parameters explicitely

The warning on the RenderFilter has been intentionally left in, because
at some point I need to figure out _why_ I thought that this expression
could be null.
35 files changed:
src/main/kotlin/net/pterodactylus/sone/freenet/wot/IdentityManagerImpl.kt
src/main/kotlin/net/pterodactylus/sone/main/SoneModule.kt
src/main/kotlin/net/pterodactylus/sone/template/HistogramRenderer.kt
src/main/kotlin/net/pterodactylus/sone/utils/Requests.kt
src/main/kotlin/net/pterodactylus/sone/web/NewElements.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/CreateSonePage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/LoggedInPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/LoginPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/NewPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/SearchPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/SoneTemplatePage.kt
src/test/java/net/pterodactylus/sone/main/DebugLoadersTest.java
src/test/kotlin/net/pterodactylus/sone/core/ConfigurationSoneParserTest.kt
src/test/kotlin/net/pterodactylus/sone/core/FreenetInterfaceTest.kt
src/test/kotlin/net/pterodactylus/sone/database/memory/ConfigurationLoaderTest.kt
src/test/kotlin/net/pterodactylus/sone/fcp/GetSoneCommandTest.kt
src/test/kotlin/net/pterodactylus/sone/fcp/LikePostCommandTest.kt
src/test/kotlin/net/pterodactylus/sone/fcp/LikeReplyCommandTest.kt
src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt
src/test/kotlin/net/pterodactylus/sone/main/FreenetModuleTest.kt
src/test/kotlin/net/pterodactylus/sone/main/SonePluginTest.kt
src/test/kotlin/net/pterodactylus/sone/notify/DefaultListNotificationFilterTest.kt
src/test/kotlin/net/pterodactylus/sone/template/FilesystemTemplateTest.kt
src/test/kotlin/net/pterodactylus/sone/template/PostAccessorTest.kt
src/test/kotlin/net/pterodactylus/sone/template/RenderFilterTest.kt
src/test/kotlin/net/pterodactylus/sone/test/Mockotlin.kt
src/test/kotlin/net/pterodactylus/sone/utils/ObjectsTest.kt
src/test/kotlin/net/pterodactylus/sone/web/PageToadletRegistryTest.kt
src/test/kotlin/net/pterodactylus/sone/web/ajax/JsonPageBaseTest.kt
src/test/kotlin/net/pterodactylus/sone/web/ajax/TestObjects.kt
src/test/kotlin/net/pterodactylus/sone/web/page/TemplateRendererTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/DebugPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/KnownSonesPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/SearchPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/WebPageTest.kt