projects
/
Sone.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea53134
)
Declare returned Core to always be non-null
author
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Thu, 5 Oct 2017 19:01:43 +0000
(21:01 +0200)
committer
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Thu, 5 Oct 2017 19:06:02 +0000
(21:06 +0200)
src/main/java/net/pterodactylus/sone/web/WebInterface.java
patch
|
blob
|
history
src/main/kotlin/net/pterodactylus/sone/web/pages/GetImagePage.kt
patch
|
blob
|
history
src/test/kotlin/net/pterodactylus/sone/web/pages/WebPageTest.kt
patch
|
blob
|
history
diff --git
a/src/main/java/net/pterodactylus/sone/web/WebInterface.java
b/src/main/java/net/pterodactylus/sone/web/WebInterface.java
index
49f1158
..
6401b43
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/web/WebInterface.java
+++ b/
src/main/java/net/pterodactylus/sone/web/WebInterface.java
@@
-410,6
+410,7
@@
public class WebInterface implements SessionProvider {
*
* @return The Sone core
*/
+ @Nonnull
public Core getCore() {
return sonePlugin.core();
}
diff --git
a/src/main/kotlin/net/pterodactylus/sone/web/pages/GetImagePage.kt
b/src/main/kotlin/net/pterodactylus/sone/web/pages/GetImagePage.kt
index
3e9eed0
..
932827e
100644
(file)
--- a/
src/main/kotlin/net/pterodactylus/sone/web/pages/GetImagePage.kt
+++ b/
src/main/kotlin/net/pterodactylus/sone/web/pages/GetImagePage.kt
@@
-11,7
+11,7
@@
import java.net.URI
*/
class GetImagePage(webInterface: WebInterface): FreenetPage {
- private val core = webInterface.core
!!
+ private val core = webInterface.core
override fun getPath(): String {
return "getImage.html"
diff --git
a/src/test/kotlin/net/pterodactylus/sone/web/pages/WebPageTest.kt
b/src/test/kotlin/net/pterodactylus/sone/web/pages/WebPageTest.kt
index
fc59639
..
a1fc2de
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/web/pages/WebPageTest.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/web/pages/WebPageTest.kt
@@
-47,7
+47,7
@@
open class WebPageTest(pageSupplier: (Template, WebInterface) -> SoneTemplatePag
val currentSone = mock<Sone>()
val template = mock<Template>()
val webInterface = deepMock<WebInterface>()
- val core = webInterface.core
!!
+ val core = webInterface.core
val eventBus = mock<EventBus>()
val preferences = Preferences(eventBus)
val l10n = webInterface.l10n!!