Skip to content

Conversation

@jkschneider
Copy link
Member

@jkschneider jkschneider commented Jan 26, 2026

Summary

  • Adds ChangeType to migrate com.sun.istack.NotNulljakarta.validation.constraints.NotNull
  • Adds test coverage for the JavaxValidationMigrationToJakartaValidation recipe

Motivation

  • This addresses the third sub-issue in moderneinc/customer-requests#1526 where Spring Boot upgrade migrations were leaving com.sun.istack.NotNull imports unchanged, causing compilation errors.

The com.sun.istack.NotNull annotation is an internal Sun JAXB implementation annotation that developers sometimes used inadvertently. When migrating to Jakarta EE, this annotation needs to be replaced with the standard @jakarta.validation.constraints.NotNull.

Test plan

  • Added new test class JavaxValidationMigrationToJakartaValidationTest
  • Tests verify migration of com.sun.istack.NotNulljakarta.validation.constraints.NotNull
  • Tests verify standard javax.validationjakarta.validation migration still works
  • All tests pass locally

…migration

This adds a ChangeType to the JavaxValidationMigrationToJakartaValidation recipe
to migrate usages of the internal Sun JAXB annotation @com.sun.istack.NotNull
to @jakarta.validation.constraints.NotNull.

This addresses the third sub-issue in customer-requests#1526 where SpringBoot
upgrade migrations were leaving com.sun.istack.NotNull imports unchanged,
causing compilation errors.

Fixes: moderneinc/customer-requests#1526
@jkschneider jkschneider merged commit 7c3842e into main Jan 26, 2026
2 checks passed
@jkschneider jkschneider deleted the migrate-sun-istack-notnull branch January 26, 2026 03:10
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenRewrite Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants