From d3454e70a5855164d17c563fe15e8674b5a5ae2e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 22 Jul 2016 16:51:43 +0300 Subject: * drop jQuery dependency --- juick-www/src/main/java/ru/sape/SapePageLinks.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'juick-www/src/main/java/ru') 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(((Map) data.get(requestUri)).values()); + pageLinks = new ArrayList<>(((Map) 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(((Map) newUrl).values()); + pageLinks = new ArrayList<>(((Map) newUrl).values()); } else { - pageLinks = new ArrayList(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 pageLinks = new ArrayList(); + private List pageLinks = new ArrayList<>(); public String render() { return render(-1); -- cgit v1.2.3