fix incorrect field initialization order default tip

Thu, 01 Jan 2026 17:12:22 +0100

author
Mike Becker <universe@uap-core.de>
date
Thu, 01 Jan 2026 17:12:22 +0100
changeset 407
fa8274466c70
parent 406
2c0c9a4f81e2

fix incorrect field initialization order

src/main/kotlin/de/uapcore/lightpit/RequestMapping.kt file | annotate | diff | comparison | revisions
--- a/src/main/kotlin/de/uapcore/lightpit/RequestMapping.kt	Thu Jan 01 16:52:53 2026 +0100
+++ b/src/main/kotlin/de/uapcore/lightpit/RequestMapping.kt	Thu Jan 01 17:12:22 2026 +0100
@@ -133,11 +133,6 @@
         }
 
     /**
-     * The sanitized referer link, if any.
-     */
-    val referer: String? = this.sanitizeReferer(request.getAttribute(Constants.REQ_ATTR_REFERER) as String?)
-
-    /**
      * The view object.
      *
      * @see Constants#REQ_ATTR_VIEWMODEL
@@ -159,7 +154,12 @@
     /**
      * The base path of this application.
      */
-    val baseHref get() = "${request.scheme}://${request.serverName}$portInfo${request.contextPath}/"
+    val baseHref = "${request.scheme}://${request.serverName}$portInfo${request.contextPath}/"
+
+    /**
+     * The sanitized referer link, if any.
+     */
+    val referer: String? = this.sanitizeReferer(request.getAttribute(Constants.REQ_ATTR_REFERER) as String?)
 
     init {
         request.setAttribute(Constants.REQ_ATTR_BASE_HREF, baseHref)

mercurial