Make some methods final that shouldn’t need to be overridden
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 6 Oct 2017 20:48:42 +0000 (22:48 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 6 Oct 2017 20:48:42 +0000 (22:48 +0200)
src/main/java/net/pterodactylus/sone/web/page/FreenetTemplatePage.java
src/main/kotlin/net/pterodactylus/sone/web/pages/SoneTemplatePage.kt

index 209019b..9cfd026 100644 (file)
@@ -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);
index 4d0fa3f..6f5de15 100644 (file)
@@ -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)