-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add JSpecify Nullability to the xml package #10196
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
artembilan
requested changes
Jul 9, 2025
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 can discuss my review off-line if you prefer.
Thanks
...src/main/java/org/springframework/integration/cassandra/config/xml/CassandraParserUtils.java
Outdated
Show resolved
Hide resolved
...e/src/main/java/org/springframework/integration/config/xml/AbstractChannelAdapterParser.java
Show resolved
Hide resolved
...ion-core/src/main/java/org/springframework/integration/config/xml/AbstractChannelParser.java
Outdated
Show resolved
Hide resolved
...ion-core/src/main/java/org/springframework/integration/config/xml/AbstractChannelParser.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/springframework/integration/config/xml/AbstractConsumerEndpointParser.java
Outdated
Show resolved
Hide resolved
...integration-core/src/main/java/org/springframework/integration/config/xml/GatewayParser.java
Show resolved
Hide resolved
...core/src/main/java/org/springframework/integration/config/xml/IntegrationNamespaceUtils.java
Outdated
Show resolved
Hide resolved
...core/src/main/java/org/springframework/integration/config/xml/PointToPointChannelParser.java
Outdated
Show resolved
Hide resolved
...ation-core/src/test/java/org/springframework/integration/config/ChainParserTests-context.xml
Outdated
Show resolved
Hide resolved
...src/test/java/org/springframework/integration/config/xml/EndpointRoleParserTests-context.xml
Outdated
Show resolved
Hide resolved
artembilan
reviewed
Jul 10, 2025
...core/src/main/java/org/springframework/integration/config/xml/PointToPointChannelParser.java
Outdated
Show resolved
Hide resolved
* Tests were updated * Test XML files updated to handle non nullable attributes and parameters * In some cases I reformatted the whole xml file vs the changed section. If this is a problem I'll undo. * In many circumstances the chances of having null, should not happen, so `Objects.requireNonNull` was used. But wonder if we should use Assert.state and have a message. Thoughts?
* Removed @nullable from requested locations * Added requested @SuppressWarning("NullAway") to specified locations * Removed format changes from XML file that was mistakingly pushed. * Resolved Nullability compile time errors from where the @nullable was removed * PointToPointChannelParser requires a null check on line 82 because builder because it may not have been set. With this assert we can throw away the previous bogus exception
Remove CassandraParserUtilsTests. Other tests provide the coverage required. Readd method variable for readability
artembilan
requested changes
Jul 10, 2025
...core/src/main/java/org/springframework/integration/config/xml/PointToPointChannelParser.java
Show resolved
Hide resolved
...main/java/org/springframework/integration/config/xml/DefaultInboundChannelAdapterParser.java
Show resolved
Hide resolved
...main/java/org/springframework/integration/config/xml/DefaultInboundChannelAdapterParser.java
Show resolved
Hide resolved
...g-integration-core/src/main/java/org/springframework/integration/config/xml/ChainParser.java
Show resolved
Hide resolved
...a/org/springframework/integration/config/xml/AbstractPollingInboundChannelAdapterParser.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/springframework/integration/config/xml/AbstractConsumerEndpointParser.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/springframework/integration/cassandra/config/xml/CassandraParserUtils.java
Outdated
Show resolved
Hide resolved
…er andk KafkaChannelParser Add dummy exceptions to be applied below calls to .error so that NullAway knows that it will not return null Make sure dummy exceptions have a consistent message describing why they are there
artembilan
requested changes
Jul 11, 2025
...a/org/springframework/integration/config/xml/AbstractPollingInboundChannelAdapterParser.java
Outdated
Show resolved
Hide resolved
...a/org/springframework/integration/config/xml/AbstractPollingInboundChannelAdapterParser.java
Show resolved
Hide resolved
...g-integration-core/src/main/java/org/springframework/integration/config/xml/ChainParser.java
Outdated
Show resolved
Hide resolved
…elAdapterParser` class. Replace stock exception for NullAway to signal that `error` will throw an exception. With the message passed to the `error` method.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objects.requireNonNull
was used. But wonder if we should use Assert.state and have a message. Thoughts?