Fix warnings in DisposableBeanAdapter

This commit is contained in:
Chris Beams 2011-10-12 02:08:52 +00:00
parent f0ded6a91f
commit 8cafb7ee13
1 changed files with 3 additions and 2 deletions

View File

@ -54,6 +54,7 @@ import org.springframework.util.ReflectionUtils;
* @see org.springframework.beans.factory.config.DestructionAwareBeanPostProcessor
* @see AbstractBeanDefinition#getDestroyMethodName()
*/
@SuppressWarnings("serial")
class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable {
private static final Log logger = LogFactory.getLog(DisposableBeanAdapter.class);
@ -106,7 +107,7 @@ class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable {
}
}
else {
Class[] paramTypes = this.destroyMethod.getParameterTypes();
Class<?>[] paramTypes = this.destroyMethod.getParameterTypes();
if (paramTypes.length > 1) {
throw new BeanDefinitionValidationException("Method '" + destroyMethodName + "' of bean '" +
beanName + "' has more than one parameter - not supported as destroy method");
@ -239,7 +240,7 @@ class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable {
* assuming a "force" parameter), else logging an error.
*/
private void invokeCustomDestroyMethod(final Method destroyMethod) {
Class[] paramTypes = destroyMethod.getParameterTypes();
Class<?>[] paramTypes = destroyMethod.getParameterTypes();
final Object[] args = new Object[paramTypes.length];
if (paramTypes.length == 1) {
args[0] = Boolean.TRUE;