Fix unnecessary casts in Servlet*PropertySource

This commit is contained in:
Chris Beams
2011-06-30 22:34:08 +00:00
parent 1eb5811347
commit fecd6edf75
2 changed files with 2 additions and 8 deletions

View File

@@ -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

View File

@@ -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