Browse Source

Fix unnecessary casts in Servlet*PropertySource

pull/7/head
Chris Beams 14 years ago
parent
commit
fecd6edf75
  1. 5
      org.springframework.web/src/main/java/org/springframework/web/context/support/ServletConfigPropertySource.java
  2. 5
      org.springframework.web/src/main/java/org/springframework/web/context/support/ServletContextPropertySource.java

5
org.springframework.web/src/main/java/org/springframework/web/context/support/ServletConfigPropertySource.java

@ -16,8 +16,6 @@ @@ -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 @@ -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

5
org.springframework.web/src/main/java/org/springframework/web/context/support/ServletContextPropertySource.java

@ -16,8 +16,6 @@ @@ -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 @@ -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

Loading…
Cancel
Save