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

@@ -1397,7 +1397,7 @@ public class FileDeletingTasklet implements Tasklet, InitializingBean {
}
public void afterPropertiesSet() throws Exception {
Assert.notNull(directory, "directory must be set");
Assert.state(directory != null, "directory must be set");
}
}
----