Skip to content

GH-10083: Implement Nullability in XML module #10161

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 1 commit into from
Jun 24, 2025

Conversation

EddieChoCho
Copy link
Contributor

Related to: #10083

  • Add @org.jspecify.annotations.NullMarked to all the packages in the XML module
  • Apply JSpecify null safety annotation improvements

Related to: spring-projects#10083

* Add @org.jspecify.annotations.NullMarked to all the packages in the XML module
* Apply JSpecify null safety annotation improvements

Signed-off-by: Eddie Cho <[email protected]>
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.

Just one doubt.
Everything else is great.

@@ -230,6 +233,7 @@ protected void onInit() {
this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(getBeanFactory());
if (this.templates == null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You marked it as @SuppressWarnings("NullAway.Init"), and I understand why.
But doesn't this if complain that the property is never null?
Thanks

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, looks like that work.
Just did something similar in Zip module: e21d843#diff-9f1c53dcaacbf6eb4a502eeb67a286da470aabb2b9401c05c50f5bc0788fa76dR64
And only what I see is a complain from my IntelliJ IDEA.
JSpecify compiler plugin is good with that.
So, merging your contribution as is.

Thank you!

@artembilan artembilan added this to the 7.0.0-M1 milestone Jun 24, 2025
@artembilan artembilan merged commit 336b366 into spring-projects:main Jun 24, 2025
3 checks passed
@EddieChoCho EddieChoCho deleted the xml_module_nulability branch June 24, 2025 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants