diff --git a/org.springframework.beans/src/main/java/org/springframework/beans/factory/support/StaticListableBeanFactory.java b/org.springframework.beans/src/main/java/org/springframework/beans/factory/support/StaticListableBeanFactory.java index 68ec1cba6ac..864c0f81e82 100644 --- a/org.springframework.beans/src/main/java/org/springframework/beans/factory/support/StaticListableBeanFactory.java +++ b/org.springframework.beans/src/main/java/org/springframework/beans/factory/support/StaticListableBeanFactory.java @@ -112,8 +112,7 @@ public class StaticListableBeanFactory implements ListableBeanFactory { return (T) bean; } - @SuppressWarnings("unchecked") - public Object getBean(String name, Object[] args) throws BeansException { + public Object getBean(String name, Object... args) throws BeansException { if (args != null) { throw new UnsupportedOperationException( "StaticListableBeanFactory does not support explicit bean creation arguments)"); diff --git a/org.springframework.context/src/main/java/org/springframework/jndi/support/SimpleJndiBeanFactory.java b/org.springframework.context/src/main/java/org/springframework/jndi/support/SimpleJndiBeanFactory.java index a016839a949..cddc2b043a7 100644 --- a/org.springframework.context/src/main/java/org/springframework/jndi/support/SimpleJndiBeanFactory.java +++ b/org.springframework.context/src/main/java/org/springframework/jndi/support/SimpleJndiBeanFactory.java @@ -118,7 +118,7 @@ public class SimpleJndiBeanFactory extends JndiLocatorSupport implements BeanFac } } - public Object getBean(String name, Object[] args) throws BeansException { + public Object getBean(String name, Object... args) throws BeansException { if (args != null) { throw new UnsupportedOperationException( "SimpleJndiBeanFactory does not support explicit bean creation arguments)");