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:
Danilo Piazzalunga
2022-02-07 08:17:38 +01:00
committed by Mahmoud Ben Hassine
parent b9d6e26d61
commit fc0ec01ff8
96 changed files with 188 additions and 178 deletions

View File

@@ -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();
}