aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorPer-Åke Minborg <minborg@speedment.com>2016-10-28 15:23:52 -0700
committerHenri Sara <hesara@vaadin.com>2016-11-07 09:04:38 +0200
commitefbcb4e7b0017cf030060276ca912863cd922890 (patch)
treedd5cfafc5ecd29dd8e41499d6932e9b22f13aafc /server
parent25eba3c79655287027301b844d74a92812fc741a (diff)
downloadvaadin-framework-efbcb4e7b0017cf030060276ca912863cd922890.tar.gz
vaadin-framework-efbcb4e7b0017cf030060276ca912863cd922890.zip
Replace EMPTY_SET and EMPTY_LIST with emptySet() and emptyList()
Change-Id: I80b73b653e97904605dc62484a7448f3bfbf722c
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/server/AbstractClientConnector.java3
-rw-r--r--server/src/main/java/com/vaadin/ui/Upload.java18
-rw-r--r--server/src/test/java/com/vaadin/server/MockServletContext.java4
3 files changed, 12 insertions, 13 deletions
diff --git a/server/src/main/java/com/vaadin/server/AbstractClientConnector.java b/server/src/main/java/com/vaadin/server/AbstractClientConnector.java
index b1c543b46e..f3e79d6579 100644
--- a/server/src/main/java/com/vaadin/server/AbstractClientConnector.java
+++ b/server/src/main/java/com/vaadin/server/AbstractClientConnector.java
@@ -30,7 +30,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
-import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
@@ -998,7 +997,7 @@ public abstract class AbstractClientConnector
*/
public Collection<?> getListeners(Class<?> eventType) {
if (eventRouter == null) {
- return Collections.EMPTY_LIST;
+ return Collections.emptyList();
}
return eventRouter.getListeners(eventType);
diff --git a/server/src/main/java/com/vaadin/ui/Upload.java b/server/src/main/java/com/vaadin/ui/Upload.java
index 11eb553018..2ab409f9d3 100644
--- a/server/src/main/java/com/vaadin/ui/Upload.java
+++ b/server/src/main/java/com/vaadin/ui/Upload.java
@@ -229,14 +229,14 @@ public class Upload extends AbstractComponent
static {
try {
- UPLOAD_FINISHED_METHOD = FinishedListener.class.getDeclaredMethod(
- "uploadFinished", FinishedEvent.class);
- UPLOAD_FAILED_METHOD = FailedListener.class.getDeclaredMethod(
- "uploadFailed", FailedEvent.class);
- UPLOAD_STARTED_METHOD = StartedListener.class.getDeclaredMethod(
- "uploadStarted", StartedEvent.class);
- UPLOAD_SUCCEEDED_METHOD = SucceededListener.class.getDeclaredMethod(
- "uploadSucceeded", SucceededEvent.class);
+ UPLOAD_FINISHED_METHOD = FinishedListener.class
+ .getDeclaredMethod("uploadFinished", FinishedEvent.class);
+ UPLOAD_FAILED_METHOD = FailedListener.class
+ .getDeclaredMethod("uploadFailed", FailedEvent.class);
+ UPLOAD_STARTED_METHOD = StartedListener.class
+ .getDeclaredMethod("uploadStarted", StartedEvent.class);
+ UPLOAD_SUCCEEDED_METHOD = SucceededListener.class
+ .getDeclaredMethod("uploadSucceeded", SucceededEvent.class);
} catch (final java.lang.NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
@@ -1118,7 +1118,7 @@ public class Upload extends AbstractComponent
public java.util.Collection<?> getListeners(java.lang.Class<?> eventType) {
if (StreamingProgressEvent.class.isAssignableFrom(eventType)) {
if (progressListeners == null) {
- return Collections.EMPTY_LIST;
+ return Collections.emptyList();
} else {
return Collections.unmodifiableCollection(progressListeners);
}
diff --git a/server/src/test/java/com/vaadin/server/MockServletContext.java b/server/src/test/java/com/vaadin/server/MockServletContext.java
index 65d294d3ae..e00d142fc0 100644
--- a/server/src/test/java/com/vaadin/server/MockServletContext.java
+++ b/server/src/test/java/com/vaadin/server/MockServletContext.java
@@ -154,7 +154,7 @@ public class MockServletContext implements ServletContext {
*/
@Override
public Enumeration getServlets() {
- return Collections.enumeration(Collections.EMPTY_SET);
+ return Collections.enumeration(Collections.emptySet());
}
/*
@@ -233,7 +233,7 @@ public class MockServletContext implements ServletContext {
*/
@Override
public Enumeration getInitParameterNames() {
- return Collections.enumeration(Collections.EMPTY_LIST);
+ return Collections.enumeration(Collections.emptyList());
}
/*