-
Notifications
You must be signed in to change notification settings - Fork 1.1k
GH-10083: Nullability for graph in core module #10371
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
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.
This looks hard: thank you for the effort!
And let's hope we will nail all the quirks together!
...gration-core/src/main/java/org/springframework/integration/graph/IntegrationGraphServer.java
Outdated
Show resolved
Hide resolved
...gration-core/src/main/java/org/springframework/integration/graph/IntegrationGraphServer.java
Outdated
Show resolved
Hide resolved
...on-core/src/main/java/org/springframework/integration/graph/CompositeMessageHandlerNode.java
Outdated
Show resolved
Hide resolved
...n-core/src/main/java/org/springframework/integration/graph/DiscardingMessageHandlerNode.java
Outdated
Show resolved
Hide resolved
...main/java/org/springframework/integration/graph/ErrorCapableCompositeMessageHandlerNode.java
Outdated
Show resolved
Hide resolved
...ntegration-core/src/main/java/org/springframework/integration/graph/MessageProducerNode.java
Outdated
Show resolved
Hide resolved
...-integration-core/src/main/java/org/springframework/integration/graph/MessageSourceNode.java
Outdated
Show resolved
Hide resolved
...tion-core/src/main/java/org/springframework/integration/graph/RoutingMessageHandlerNode.java
Outdated
Show resolved
Hide resolved
...gration-core/src/main/java/org/springframework/integration/graph/MicrometerNodeEnhancer.java
Outdated
Show resolved
Hide resolved
...gration-core/src/main/java/org/springframework/integration/graph/IntegrationGraphServer.java
Outdated
Show resolved
Hide resolved
3fa3972
to
10af742
Compare
* Add Nullability to core module's graph package. * `buildGraph` and `getGraph` methods in the `IntegrationGraphServer` because Nullify could not see the creation of the graph * `IntegrationGraphServer.receiptListRoutingHandler` required a change where the messageChannel could not be null in the `map` portion of expression. So it was extracted into a var and the var was checked for null.
* Set AppContext to not be nullable * Consumer's inbound channels are never null. Update to remove nullable * Update outbound channels so they are not nullable * Use local variable trick to work past Nullables inability to see a new above return value * Add contract to channelToBeanName in IntegrationGraphServer
0c03a42
to
ec20eb0
Compare
...gration-core/src/main/java/org/springframework/integration/graph/IntegrationGraphServer.java
Outdated
Show resolved
Hide resolved
@@ -119,8 +123,12 @@ private <T extends IntegrationNode> Timer obtainTimer(T node, String type, boole | |||
} | |||
} | |||
|
|||
@Nullable | |||
private <T extends IntegrationNode> Timer observationTimer(T node, String type, boolean success) { | |||
private RequiredSearch getRegistry(String name) { |
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.
We don't need this method any more after that NullAway.Init
.
And therefore everything else.
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.
LGTM.
Taking locally for final review, cleanup and merge.
Thank you!
buildGraph
andgetGraph
methods in theIntegrationGraphServer
because Nullify could not see the creation of the graphIntegrationGraphServer.receiptListRoutingHandler
required a change where the messageChannel could not be null in themap
portion of expression. So it was extracted into a var and the var was checked for null.