From: David ‘Bombe’ Roden Date: Fri, 6 Oct 2017 20:48:42 +0000 (+0200) Subject: Make some methods final that shouldn’t need to be overridden X-Git-Tag: 0.9.7^2~10 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=cec099ef08feaff5332b81885ad989dbcb0fdfba;p=Sone.git Make some methods final that shouldn’t need to be overridden --- diff --git a/src/main/java/net/pterodactylus/sone/web/page/FreenetTemplatePage.java b/src/main/java/net/pterodactylus/sone/web/page/FreenetTemplatePage.java index 209019b..9cfd026 100644 --- a/src/main/java/net/pterodactylus/sone/web/page/FreenetTemplatePage.java +++ b/src/main/java/net/pterodactylus/sone/web/page/FreenetTemplatePage.java @@ -119,7 +119,7 @@ public class FreenetTemplatePage implements FreenetPage, LinkEnabledCallback { * {@inheritDoc} */ @Override - public Response handleRequest(FreenetRequest request, Response response) throws IOException { + public final Response handleRequest(FreenetRequest request, Response response) throws IOException { String redirectTarget = getRedirectTarget(request); if (redirectTarget != null) { return new RedirectResponse(redirectTarget); diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/SoneTemplatePage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/SoneTemplatePage.kt index 4d0fa3f..6f5de15 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/SoneTemplatePage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/SoneTemplatePage.kt @@ -58,7 +58,7 @@ open class SoneTemplatePage( "href" to "http://${request.httpRequest.getHeader("host")}/Sone/OpenSearch.xml" )) - override public fun processTemplate(freenetRequest: FreenetRequest, templateContext: TemplateContext) { + final override public fun processTemplate(freenetRequest: FreenetRequest, templateContext: TemplateContext) { super.processTemplate(freenetRequest, templateContext) templateContext["preferences"] = core.preferences templateContext["currentSone"] = getCurrentSone(freenetRequest.toadletContext)