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
@@ -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");
|
||||
}
|
||||
}
|
||||
----
|
||||
|
||||
Reference in New Issue
Block a user