diff options
author | Vitaly Takmazov | 2018-06-28 12:53:55 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-06-28 12:53:55 +0300 |
commit | 93ad3ee53241b07a08334c4c70f8965cbdc856d5 (patch) | |
tree | 46a5cf0e95a9d29d02aa9eaf7d27949af0f80553 /juick-server/src/main/java/com/juick/server | |
parent | f14de2df1bdf4a3667241549a42a1dd80166cae8 (diff) |
drop unused code
Diffstat (limited to 'juick-server/src/main/java/com/juick/server')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/Utils.java | 15 |
1 files changed, 0 insertions, 15 deletions
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<String> getPreviousPageByRequest(HttpServletRequest request) - { - return Optional.ofNullable(request.getHeader("Referer")).map(requestUrl -> "redirect:" + requestUrl); - } } |