Fix unnecessary casts in Servlet*PropertySource
This commit is contained in:
@@ -16,8 +16,6 @@
|
||||
|
||||
package org.springframework.web.context.support;
|
||||
|
||||
import java.util.Enumeration;
|
||||
|
||||
import javax.servlet.ServletConfig;
|
||||
|
||||
import org.springframework.core.env.EnumerablePropertySource;
|
||||
@@ -38,10 +36,9 @@ public class ServletConfigPropertySource extends EnumerablePropertySource<Servle
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public String[] getPropertyNames() {
|
||||
return CollectionUtils.toArray(
|
||||
(Enumeration<String>)this.source.getInitParameterNames(), EMPTY_NAMES_ARRAY);
|
||||
this.source.getInitParameterNames(), EMPTY_NAMES_ARRAY);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
package org.springframework.web.context.support;
|
||||
|
||||
import java.util.Enumeration;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import org.springframework.core.env.EnumerablePropertySource;
|
||||
@@ -38,10 +36,9 @@ public class ServletContextPropertySource extends EnumerablePropertySource<Servl
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public String[] getPropertyNames() {
|
||||
return CollectionUtils.toArray(
|
||||
(Enumeration<String>)this.source.getInitParameterNames(), EMPTY_NAMES_ARRAY);
|
||||
this.source.getInitParameterNames(), EMPTY_NAMES_ARRAY);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user