From ac954740aa43ac9256543cb8e174e351f8a21e77 Mon Sep 17 00:00:00 2001 From: Tom Gross <itconsense@gmail.com> Date: Mon, 2 Dec 2019 11:46:38 +0100 Subject: [PATCH] Remove duplicate code in BasicController constructor --- .../gui/control/controller/BasicController.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/main/java/org/olat/core/gui/control/controller/BasicController.java b/src/main/java/org/olat/core/gui/control/controller/BasicController.java index 4022f3c64d4..415cbc40f96 100644 --- a/src/main/java/org/olat/core/gui/control/controller/BasicController.java +++ b/src/main/java/org/olat/core/gui/control/controller/BasicController.java @@ -84,15 +84,7 @@ public abstract class BasicController extends DefaultController { * @param wControl */ protected BasicController(UserRequest ureq, WindowControl wControl) { - super(wControl); - setLocale(ureq.getLocale()); - identity = ureq.getIdentity(); - - Class<?> cl = this.getClass(); - translator = Util.createPackageTranslator(cl, getLocale()); - fallbackTranslator = null; - velocity_root = Util.getPackageVelocityRoot(cl); - logger = Tracing.createLoggerFor(cl); + this(ureq, wControl, null); } /** @@ -112,9 +104,6 @@ public abstract class BasicController extends DefaultController { super(wControl); setLocale(ureq.getLocale()); identity = ureq.getIdentity(); - if (fallBackTranslator == null) { - throw new AssertException("please provide a fall translator if using this constructor!!"); - } Class<?> cl = this.getClass(); fallbackTranslator = fallBackTranslator; -- GitLab