From 8cafb7ee13b68ce8f21b01c49d2feba7a818b1ed Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Wed, 12 Oct 2011 02:08:52 +0000 Subject: [PATCH] Fix warnings in DisposableBeanAdapter --- .../beans/factory/support/DisposableBeanAdapter.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/org.springframework.beans/src/main/java/org/springframework/beans/factory/support/DisposableBeanAdapter.java b/org.springframework.beans/src/main/java/org/springframework/beans/factory/support/DisposableBeanAdapter.java index c9283b0827..6ffea9d0d7 100644 --- a/org.springframework.beans/src/main/java/org/springframework/beans/factory/support/DisposableBeanAdapter.java +++ b/org.springframework.beans/src/main/java/org/springframework/beans/factory/support/DisposableBeanAdapter.java @@ -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;