From 93ad3ee53241b07a08334c4c70f8965cbdc856d5 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 28 Jun 2018 12:53:55 +0300 Subject: drop unused code --- juick-server/src/main/java/com/juick/server/Utils.java | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'juick-server/src/main/java/com/juick/server') diff --git a/juick-server/src/main/java/com/juick/server/Utils.java b/juick-server/src/main/java/com/juick/server/Utils.java index 853b79fc..4b864fec 100644 --- a/juick-server/src/main/java/com/juick/server/Utils.java +++ b/juick-server/src/main/java/com/juick/server/Utils.java @@ -16,9 +16,6 @@ */ package com.juick.server; -import javax.servlet.http.HttpServletRequest; -import java.util.Optional; - /** * * @author Ugnich Anton @@ -30,16 +27,4 @@ public class Utils { return str.replaceAll("@", "\\\\@") .replaceAll("\\'", "\\\\'"); } - - /** - * Returns the viewName to return for coming back to the sender url - * - * @param request Instance of {@link HttpServletRequest} or use an injected instance - * @return Optional with the view name. Recomended to use an alternativa url with - * {@link Optional#orElse(java.lang.Object)} - */ - public static Optional getPreviousPageByRequest(HttpServletRequest request) - { - return Optional.ofNullable(request.getHeader("Referer")).map(requestUrl -> "redirect:" + requestUrl); - } } -- cgit v1.2.3