Sun, 17 May 2020 16:00:13 +0200
fixes duplicated trailing slash if index path has a menu entry
src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java | file | annotate | diff | comparison | revisions |
--- a/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java Sun May 17 15:24:58 2020 +0200 +++ b/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java Sun May 17 16:00:13 2020 +0200 @@ -166,8 +166,10 @@ || DataAccessObjects.class.isAssignableFrom(param); } if (paramsInjectible) { - final String requestPath = "/" + mapping.get().requestPath() - + (mapping.get().menuKey().isBlank() ? "" : "/"); + String requestPath = "/" + mapping.get().requestPath(); + if (!mapping.get().requestPath().isBlank() && !mapping.get().menuKey().isBlank()) { + requestPath += "/"; + } if (mappings .computeIfAbsent(mapping.get().method(), k -> new HashMap<>())