🎨 Reduce dependency on Node’s fields
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 26 Aug 2022 10:15:00 +0000 (12:15 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 26 Aug 2022 11:06:57 +0000 (13:06 +0200)
commit07643fdd510640d6c0b20963e4f4f36e06469fb5
tree20e71400a0af6eab7d3b6cfce973a8c3c4ef9ad3
parentfeb4aeda86e2c3d7deff163eda53191d6baa5650
🎨 Reduce dependency on Node’s fields

Using fields is getting increasingly hard to mock with more recent Java
versions. This change moves some of the necessary field access to the
dependency injection configuration so it’s restricted to a single place in the
source code and tests don’t have to mess with this.
src/main/java/net/pterodactylus/sone/core/FreenetInterface.java
src/main/kotlin/net/pterodactylus/sone/freenet/HighLevelSimpleClientCreator.kt [new file with mode: 0644]
src/main/kotlin/net/pterodactylus/sone/main/FreenetModule.kt
src/test/kotlin/net/pterodactylus/sone/core/FreenetInterfaceTest.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/test/FreenetObjects.kt [new file with mode: 0644]