Skip to content

Overridden nullable methods are not annotated as @Nullable JSR-305 [BATCH-2839] #774

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Aug 28, 2019 · 1 comment
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

mikeldpl opened BATCH-2839 and commented

I have some problems to use Kotlin with spring batch. Kotlin has strict validation on nullable vs nonnullable methods/parameters. But in spring-batch we have a lot of mistakes in JSR-305 annotations usage.

e.g. org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader#read method does not have @Nullable annotation. But org.springframework.batch.item.support package annotated as @NonNullApi. So "read" method is not nullable (but returns null).


Affects: 4.1.2

Referenced from: pull request #726, and commits a7092a2

@spring-projects-issues
Copy link
Collaborator Author

Mahmoud Ben Hassine commented

According to SPR-15896, this is a valid point. Let's plan this to 4.2 GA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant