Use Collections.emptyEnumeration() where appropriate

Closes gh-30803
This commit is contained in:
Patrick Strawderman
2023-07-03 19:03:35 -07:00
committed by Sam Brannen
parent 79df1da792
commit 372282457f
2 changed files with 2 additions and 3 deletions

View File

@@ -43,8 +43,7 @@ public class CandidateComponentsTestClassLoader extends ClassLoader {
* @see CandidateComponentsIndexLoader#COMPONENTS_RESOURCE_LOCATION
*/
public static ClassLoader disableIndex(ClassLoader classLoader) {
return new CandidateComponentsTestClassLoader(classLoader,
Collections.enumeration(Collections.emptyList()));
return new CandidateComponentsTestClassLoader(classLoader, Collections.emptyEnumeration());
}
/**

View File

@@ -170,7 +170,7 @@ public class SimpleServletPostProcessor implements
@Override
public Enumeration<String> getInitParameterNames() {
return Collections.enumeration(Collections.emptySet());
return Collections.emptyEnumeration();
}
}