Merge pull request #11759 from dreis2211

* pr/11759:
  Remove usage of Vector collection
pull/11764/head
Phillip Webb 7 years ago
commit f8cdc01474

@ -20,7 +20,6 @@ import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Vector;
import java.util.function.Supplier;
import javax.servlet.FilterRegistration;
@ -75,9 +74,9 @@ public class MappingsEndpointTests {
public void servletWebMappings() {
ServletContext servletContext = mock(ServletContext.class);
given(servletContext.getInitParameterNames())
.willReturn(new Vector<String>().elements());
.willReturn(Collections.emptyEnumeration());
given(servletContext.getAttributeNames())
.willReturn(new Vector<String>().elements());
.willReturn(Collections.emptyEnumeration());
FilterRegistration filterRegistration = mock(FilterRegistration.class);
given((Map<String, FilterRegistration>) servletContext.getFilterRegistrations())
.willReturn(Collections.singletonMap("testFilter", filterRegistration));

@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 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,10 +20,10 @@ import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.Arrays;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import java.util.Map;
import java.util.Vector;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
@ -336,7 +336,7 @@ public class HibernateJpaAutoConfigurationTests
@Override
public Enumeration<URL> getResources(String name) throws IOException {
if (HIDDEN_RESOURCES.contains(name)) {
return new Vector<URL>().elements();
return Collections.emptyEnumeration();
}
return super.getResources(name);
}

Loading…
Cancel
Save