-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Migrate spring-batch-infrastructure
to JSpecify annotations
#4864
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
Conversation
35c9da1
to
c737967
Compare
38292b1
to
fee88d7
Compare
8e2edf2
to
abeb820
Compare
...re/src/main/java/org/springframework/batch/item/adapter/AbstractMethodInvokingDelegator.java
Outdated
Show resolved
Hide resolved
...re/src/main/java/org/springframework/batch/item/adapter/AbstractMethodInvokingDelegator.java
Outdated
Show resolved
Hide resolved
f7c8989
to
3be2fa5
Compare
...ng-batch-infrastructure/src/main/java/org/springframework/batch/item/KeyValueItemWriter.java
Outdated
Show resolved
Hide resolved
This is a huge amount of work.. thank you very much for contributing this PR! I REALLY appreciate your time and effort on this 🙏 I am targeting the migration to jSpecify for v6.0.0-M3 (planned for Sep 17th), so I will start working on this right after releasing 6.0.0-M2. I see that the PR is still in draft status, which is ok, but is there a module I can I start reviewing? Just as a (self) reminder, we need to get rid of the |
be5225b
to
1b8c51d
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Thank you for the update and for narrowing down the PR's scope to Take your time and let me know when you think it is ready, no rush we can postpone to 6.0.0-M4 if necessary. I can also take it from where it is if needed. |
348cacc
to
2295d49
Compare
6943f20
to
889cc4a
Compare
This comment was marked as outdated.
This comment was marked as outdated.
a0d2ce0
to
28ffd60
Compare
Signed-off-by: Stefano Cordio <[email protected]>
@fmbenhassine sorry for the delay, I'm happy to mention that this is finally ready for review! 🙂 |
Sadly, the CI job went into timeout, but it should be unrelated to the changes (locally, everything looks fine). |
Great thank you for all these updates! I will take a look asap.
Yes, this is a known issue and I will bissect that for RC1. |
LGTM! Thank you very much.
That's how I would do it as well 👍
I came across this in #4984 as well. The approach I try to follow is to use constructor arguments for mandatory dependencies and setters for optional ones. I will take care of this refactoring. |
@fmbenhassine If conflicts arise due to other commits on |
Closing this in favour of #4990 |
This PR migrates
spring-batch-infrastructure
to JSpecify annotations and introduces NullAway to verify@NullMarked
annotated packages (productive code only).I used the following strategy to handle cases of null-safety mismatch detected by NullAway:
@SuppressWarnings("DataFlowIssue")
, which is recognized by both IntelliJ IDEA and NullAwayMany classes could benefit from a more aggressive refactoring, where a constructor with parameters could be favored instead of relying on the default constructor + setters +
afterPropertiesSet
implementation. I'll work on a proposal in a separate PR.