Skip to content

Commit 8cafb7e

Browse files
committed
Fix warnings in DisposableBeanAdapter
1 parent f0ded6a commit 8cafb7e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

org.springframework.beans/src/main/java/org/springframework/beans/factory/support/DisposableBeanAdapter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
* @see org.springframework.beans.factory.config.DestructionAwareBeanPostProcessor
5555
* @see AbstractBeanDefinition#getDestroyMethodName()
5656
*/
57+
@SuppressWarnings("serial")
5758
class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable {
5859

5960
private static final Log logger = LogFactory.getLog(DisposableBeanAdapter.class);
@@ -106,7 +107,7 @@ public DisposableBeanAdapter(Object bean, String beanName, RootBeanDefinition be
106107
}
107108
}
108109
else {
109-
Class[] paramTypes = this.destroyMethod.getParameterTypes();
110+
Class<?>[] paramTypes = this.destroyMethod.getParameterTypes();
110111
if (paramTypes.length > 1) {
111112
throw new BeanDefinitionValidationException("Method '" + destroyMethodName + "' of bean '" +
112113
beanName + "' has more than one parameter - not supported as destroy method");
@@ -239,7 +240,7 @@ private Method findDestroyMethod() {
239240
* assuming a "force" parameter), else logging an error.
240241
*/
241242
private void invokeCustomDestroyMethod(final Method destroyMethod) {
242-
Class[] paramTypes = destroyMethod.getParameterTypes();
243+
Class<?>[] paramTypes = destroyMethod.getParameterTypes();
243244
final Object[] args = new Object[paramTypes.length];
244245
if (paramTypes.length == 1) {
245246
args[0] = Boolean.TRUE;

0 commit comments

Comments
 (0)