You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't like @Required, and I don't think it's appropriate for framework classes, since it requires the user to add a bean post processor for it to work. InitializingBean is better for my money.
@Iwein Fuld I also agree. However, there are some places in the code base that use Assert.state (like AbstractJob and AbstractStep) while other places use Assert.notNull as you mentioned. It would be great to make this consistent across the whole code base and not only for the FlatFileItemReader. Feel free to open a PR if you want, contributions are welcome!
Consistently use Assert.state in the afterPropertiesSet() methods to
throw IllegalStateException instead of IllegalArgumentException when
some properties are missing and/or invalid.
Issue spring-projects#2244
fmbenhassine
changed the title
IllegalArgumentException thrown from FlatFileItemReader where IllegalState would be more appropriate [BATCH-1337]
IllegalArgumentException thrown from afterPropertiesSet where IllegalStateException would be more appropriate
Nov 23, 2022
Iwein Fuld opened BATCH-1337 and commented
Should use Assert.state instead imo.
Affects: 2.0.1
The text was updated successfully, but these errors were encountered: