-
Notifications
You must be signed in to change notification settings - Fork 1.1k
GH-10083: Apply Nullability to core dispatcher package #10272
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
GH-10083: Apply Nullability to core dispatcher package #10272
Conversation
PartititonDispatcher.partition will always return at least 1 partition. So return value is wrapped with Objects.requireNonNull, for nullaway Related to: spring-projects#10083
...ion-core/src/main/java/org/springframework/integration/dispatcher/PartitionedDispatcher.java
Outdated
Show resolved
Hide resolved
… the `NullAway` error, than take the performance hit of using `requiresNonNull`
} | ||
|
||
@Override | ||
@SuppressWarnings("NullAway") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we state in the comment to this annotation the reason?
Something similar to what I suggested in the review, but might be more specific to this situation.
…essWarning` is needed.
|
||
@Override | ||
@SuppressWarnings("NullAway") | ||
@SuppressWarnings("NullAway") // Dataflow analysis limitation! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah... That's not what I meant, especially not with a !
😉
How about this?
@SuppressWarnings("NullAway") // Dataflow analysis limitation! | |
@SuppressWarnings("NullAway") // The partitions map never returns null according to partition hash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the clarification. I thought that message was a bit terse. will update.
…nsMap is never null
PartititonDispatcher.partition will always return at least 1 partition. So return value is wrapped with Objects.requireNonNull, for nullaway
Related to: #10083