aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/ru
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-07-22 16:51:43 +0300
committerGravatar Vitaly Takmazov2016-07-27 13:52:02 +0300
commitd3454e70a5855164d17c563fe15e8674b5a5ae2e (patch)
treefda0c9da5e44de736f0215b3d6c63872329b0544 /juick-www/src/main/java/ru
parentdbc48e0d220107ac0887d21f2144665f4eea5aab (diff)
* drop jQuery dependency
Diffstat (limited to 'juick-www/src/main/java/ru')
-rw-r--r--juick-www/src/main/java/ru/sape/SapePageLinks.java14
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);