Skip to content

Fix Jackson 2.21+ conflicting creators in AWT recipes#1007

Merged
timtebeek merged 1 commit intomainfrom
fix/jackson-2.21-conflicting-creators
Mar 10, 2026
Merged

Fix Jackson 2.21+ conflicting creators in AWT recipes#1007
timtebeek merged 1 commit intomainfrom
fix/jackson-2.21-conflicting-creators

Conversation

@timtebeek
Copy link
Member

@timtebeek timtebeek commented Mar 10, 2026

Summary

Test plan

  • Existing tests for ReplaceAWTGetPeerMethodTest pass
  • Existing tests for ReplaceComSunAWTUtilitiesMethodsTest pass

Remove `@AllArgsConstructor` from `ReplaceAWTGetPeerMethod` and
`ReplaceComSunAWTUtilitiesMethods` and replace the no-arg `@JsonCreator`
constructor with an all-args `@JsonCreator` constructor accepting
`@Nullable` parameters with defaults. This eliminates the conflicting
property-based creators caused by Lombok's `@ConstructorProperties`
annotation on the generated all-args constructor.

Closes #1003
@github-project-automation github-project-automation bot moved this to In Progress in OpenRewrite Mar 10, 2026
@timtebeek timtebeek merged commit 114a5a2 into main Mar 10, 2026
1 check passed
@timtebeek timtebeek deleted the fix/jackson-2.21-conflicting-creators branch March 10, 2026 12:26
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenRewrite Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Jackson 2.21+ compatibility: InvalidDefinitionException due to conflicting creators in ReplaceAWTGetPeerMethod and ReplaceComSunAWTUtilitiesMethods

1 participant