diff options
author | Vitaly Takmazov | 2016-07-22 16:51:43 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-07-27 13:52:02 +0300 |
commit | d3454e70a5855164d17c563fe15e8674b5a5ae2e (patch) | |
tree | fda0c9da5e44de736f0215b3d6c63872329b0544 /juick-www/src/main/java/ru | |
parent | dbc48e0d220107ac0887d21f2144665f4eea5aab (diff) |
* drop jQuery dependency
Diffstat (limited to 'juick-www/src/main/java/ru')
-rw-r--r-- | juick-www/src/main/java/ru/sape/SapePageLinks.java | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/juick-www/src/main/java/ru/sape/SapePageLinks.java b/juick-www/src/main/java/ru/sape/SapePageLinks.java index 498aeac0..458358b8 100644 --- a/juick-www/src/main/java/ru/sape/SapePageLinks.java +++ b/juick-www/src/main/java/ru/sape/SapePageLinks.java @@ -1,10 +1,6 @@ package ru.sape; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; -import java.util.Map; +import java.util.*; import javax.servlet.http.Cookie; public class SapePageLinks { @@ -28,7 +24,7 @@ public class SapePageLinks { } if (data.containsKey(requestUri)) { - pageLinks = new ArrayList<String>(((Map<Object, String>) data.get(requestUri)).values()); + pageLinks = new ArrayList<>(((Map<Object, String>) data.get(requestUri)).values()); } if (data.containsKey("__sape_new_url__")) { @@ -36,9 +32,9 @@ public class SapePageLinks { Object newUrl = data.get("__sape_new_url__"); if (newUrl instanceof Map) { - pageLinks = new ArrayList<String>(((Map<Object, String>) newUrl).values()); + pageLinks = new ArrayList<>(((Map<Object, String>) newUrl).values()); } else { - pageLinks = new ArrayList<String>(Arrays.asList((String) newUrl)); + pageLinks = new ArrayList<>(Collections.singletonList((String) newUrl)); } } } @@ -46,7 +42,7 @@ public class SapePageLinks { this.showCode = showCode; } private String linkDelimiter = "."; - private List<String> pageLinks = new ArrayList<String>(); + private List<String> pageLinks = new ArrayList<>(); public String render() { return render(-1); |