diff options
Diffstat (limited to 'juick-www/src/main/java/ru/sape')
-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); |