mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-10-09 00:29:04 +00:00
Fix unnecessary casts in Servlet*PropertySource
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4644 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
+1
-4
@@ -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
|
||||
|
||||
+1
-4
@@ -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