From 4bc67c4c5f2fce684b3eafb13113e8bf2b5899c9 Mon Sep 17 00:00:00 2001 From: Carlos Amengual Date: Thu, 14 Sep 2023 21:24:12 +0200 Subject: [PATCH] Use diamond operator --- src/io/sf/carte/doc/agent/net/DefaultOriginPolicy.java | 6 +++--- src/io/sf/carte/doc/agent/net/ResourceDownloader.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/io/sf/carte/doc/agent/net/DefaultOriginPolicy.java b/src/io/sf/carte/doc/agent/net/DefaultOriginPolicy.java index 8c1beaa..abf515d 100644 --- a/src/io/sf/carte/doc/agent/net/DefaultOriginPolicy.java +++ b/src/io/sf/carte/doc/agent/net/DefaultOriginPolicy.java @@ -34,9 +34,9 @@ public class DefaultOriginPolicy implements OriginPolicy { private static final List SUFFIX_WILDCARDS; static { - TOP_LEVEL_SUFFIX = new ArrayList(); - SUFFIX_EXCEPTIONS = new ArrayList(); - SUFFIX_WILDCARDS = new ArrayList(); + TOP_LEVEL_SUFFIX = new ArrayList<>(); + SUFFIX_EXCEPTIONS = new ArrayList<>(); + SUFFIX_WILDCARDS = new ArrayList<>(); readSuffixes(); } diff --git a/src/io/sf/carte/doc/agent/net/ResourceDownloader.java b/src/io/sf/carte/doc/agent/net/ResourceDownloader.java index 861497a..0c5d07f 100644 --- a/src/io/sf/carte/doc/agent/net/ResourceDownloader.java +++ b/src/io/sf/carte/doc/agent/net/ResourceDownloader.java @@ -37,7 +37,7 @@ abstract public class ResourceDownloader extends Thread { private final URL url; protected C nativeContent = null; - protected List> listeners = new LinkedList>(); + protected List> listeners = new LinkedList<>(); private String contentType = null; private boolean done = false; @@ -75,7 +75,7 @@ private static URL[] extractURL(CSSValue src) { return new URL[]{url}; } } else if (type == CSSValue.CssType.LIST) { - LinkedList urlist = new LinkedList(); + LinkedList urlist = new LinkedList<>(); ValueList list = (ValueList) src; for (int i = 0; i < list.getLength(); i++) { URL[] url = extractURL(list.item(i));