Consistent use of empty enumerations

This commit is contained in:
Juergen Hoeller
2016-03-11 15:07:59 +01:00
parent 8852a5e178
commit d124a13eb4
9 changed files with 30 additions and 50 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@ package org.springframework.web.portlet.handler;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Locale;
import java.util.Map;
import java.util.ResourceBundle;
@@ -175,7 +174,7 @@ public class SimplePortletPostProcessor
@Override
public Enumeration<String> getInitParameterNames() {
return Collections.enumeration(new HashSet<String>());
return Collections.enumeration(Collections.<String>emptySet());
}
@Override
@@ -185,7 +184,7 @@ public class SimplePortletPostProcessor
@Override
public Enumeration<String> getPublicRenderParameterNames() {
return Collections.enumeration(new HashSet<String>());
return Collections.enumeration(Collections.<String>emptySet());
}
@Override
@@ -195,17 +194,17 @@ public class SimplePortletPostProcessor
@Override
public Enumeration<QName> getPublishingEventQNames() {
return Collections.enumeration(new HashSet<QName>());
return Collections.enumeration(Collections.<QName>emptySet());
}
@Override
public Enumeration<QName> getProcessingEventQNames() {
return Collections.enumeration(new HashSet<QName>());
return Collections.enumeration(Collections.<QName>emptySet());
}
@Override
public Enumeration<Locale> getSupportedLocales() {
return Collections.enumeration(new HashSet<Locale>());
return Collections.enumeration(Collections.<Locale>emptySet());
}
@Override

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@ package org.springframework.web.portlet.mvc;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
@@ -288,7 +287,7 @@ public class PortletWrappingController extends AbstractController
@Override
public Enumeration<String> getPublicRenderParameterNames() {
return Collections.enumeration(new HashSet<String>());
return Collections.enumeration(Collections.<String>emptySet());
}
@Override
@@ -298,17 +297,17 @@ public class PortletWrappingController extends AbstractController
@Override
public Enumeration<QName> getPublishingEventQNames() {
return Collections.enumeration(new HashSet<QName>());
return Collections.enumeration(Collections.<QName>emptySet());
}
@Override
public Enumeration<QName> getProcessingEventQNames() {
return Collections.enumeration(new HashSet<QName>());
return Collections.enumeration(Collections.<QName>emptySet());
}
@Override
public Enumeration<Locale> getSupportedLocales() {
return Collections.enumeration(new HashSet<Locale>());
return Collections.enumeration(Collections.<Locale>emptySet());
}
@Override

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,6 @@ import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Set;
import javax.portlet.PortletContext;
import javax.portlet.PortletRequestDispatcher;
@@ -35,7 +34,7 @@ import org.springframework.util.Assert;
*
* @author Juergen Hoeller
* @since 3.0
* @see org.springframework.mock.web.portlet.MockPortletContext
* @see MockPortletContext
*/
public class ServletWrappingPortletContext implements PortletContext {
@@ -156,7 +155,7 @@ public class ServletWrappingPortletContext implements PortletContext {
@Override
public Enumeration<String> getContainerRuntimeOptions() {
return Collections.enumeration(new HashSet<String>());
return Collections.enumeration(Collections.<String>emptySet());
}
}