Throw IllegalStateException from afterPropertiesSet
Consistently use Assert.state in the afterPropertiesSet() methods to throw IllegalStateException instead of IllegalArgumentException when some properties are missing and/or invalid. Resolves #2244
This commit is contained in:
committed by
Mahmoud Ben Hassine
parent
b9d6e26d61
commit
fc0ec01ff8
@@ -107,7 +107,7 @@ public class DataSourceInitializer implements InitializingBean, DisposableBean {
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
Assert.notNull(this.dataSource, "A DataSource is required");
|
||||
Assert.state(this.dataSource != null, "A DataSource is required");
|
||||
initialize();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user