Skip to content

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 5 commits into from
Jul 14, 2025

Conversation

cppwfs
Copy link
Contributor

@cppwfs cppwfs commented Jul 9, 2025

  • 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?

@cppwfs cppwfs requested a review from artembilan July 9, 2025 12:48
Copy link
Member

@artembilan artembilan left a 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

cppwfs added 3 commits July 10, 2025 15:13
* 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
…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
…elAdapterParser` class.

Replace stock exception for NullAway to signal that `error` will throw an exception.
  With the message passed to the `error` method.
@artembilan artembilan merged commit 4dccefd into spring-projects:main Jul 14, 2025
2 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants