summaryrefslogtreecommitdiffstats
path: root/client/src
diff options
context:
space:
mode:
Diffstat (limited to 'client/src')
-rw-r--r--client/src/main/java/com/vaadin/client/ResourceLoader.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/main/java/com/vaadin/client/ResourceLoader.java b/client/src/main/java/com/vaadin/client/ResourceLoader.java
index c52e6f16d0..69cb11dc9f 100644
--- a/client/src/main/java/com/vaadin/client/ResourceLoader.java
+++ b/client/src/main/java/com/vaadin/client/ResourceLoader.java
@@ -16,6 +16,7 @@
package com.vaadin.client;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
@@ -401,12 +402,12 @@ public class ResourceLoader {
if (rules === undefined) {
rules = sheet.rules;
}
-
+
if (rules === null) {
// Style sheet loaded, but can't access length because of XSS -> assume there's something there
return 1;
}
-
+
// Return length so we can distinguish 0 (probably 404 error) from normal case.
return rules.length;
} catch (err) {
@@ -423,7 +424,7 @@ public class ResourceLoader {
Map<String, Collection<ResourceLoadListener>> listenerMap) {
Collection<ResourceLoadListener> listeners = listenerMap.get(url);
if (listeners == null) {
- listeners = new HashSet<>();
+ listeners = new ArrayList<>();
listeners.add(listener);
listenerMap.put(url, listeners);
return true;