Revisit Assert to avoid single-arg assert methods (with refined messages)

Issue: SPR-15196
This commit is contained in:
Juergen Hoeller
2017-01-30 22:15:53 +01:00
parent 768802fa96
commit 1b2dc3638f
118 changed files with 708 additions and 828 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,7 +26,6 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert;
/**
* {@link org.springframework.beans.factory.FactoryBean} that bootstraps
@@ -66,9 +65,8 @@ public class ResourceAdapterFactoryBean implements FactoryBean<ResourceAdapter>,
* through the "resourceAdapter" property.
* @see #setResourceAdapter
*/
public void setResourceAdapterClass(Class<?> resourceAdapterClass) {
Assert.isAssignable(ResourceAdapter.class, resourceAdapterClass);
this.resourceAdapter = (ResourceAdapter) BeanUtils.instantiateClass(resourceAdapterClass);
public void setResourceAdapterClass(Class<? extends ResourceAdapter> resourceAdapterClass) {
this.resourceAdapter = BeanUtils.instantiateClass(resourceAdapterClass);
}
/**