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.servlet.handler;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashSet;
import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
@@ -164,7 +163,7 @@ public class SimpleServletPostProcessor implements
@Override
public Enumeration<String> getInitParameterNames() {
return Collections.enumeration(new HashSet<String>());
return Collections.enumeration(Collections.<String>emptySet());
}
}

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.
@@ -20,7 +20,6 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Locale;
import java.util.Map;
import javax.servlet.GenericServlet;
@@ -406,7 +405,7 @@ public class FreeMarkerView extends AbstractTemplateView {
@Override
public Enumeration<String> getInitParameterNames() {
return Collections.enumeration(new HashSet<String>());
return Collections.enumeration(Collections.<String>emptySet());
}
}