Skip to content

Replace deprecated PropertyNamingStrategy with PropertyNamingStrategies#120

Merged
linusnorton merged 1 commit intomasterfrom
fix/jackson-property-naming-strategy
Mar 31, 2026
Merged

Replace deprecated PropertyNamingStrategy with PropertyNamingStrategies#120
linusnorton merged 1 commit intomasterfrom
fix/jackson-property-naming-strategy

Conversation

@linusnorton
Copy link
Copy Markdown
Contributor

Summary

  • Replace all uses of PropertyNamingStrategy.SnakeCaseStrategy with PropertyNamingStrategies.SnakeCaseStrategy across 11 files
  • Jackson 2.21 removed the deprecated inner classes from PropertyNamingStrategy, causing ClassNotFoundException in downstream projects that upgrade to Jackson 2.21+ (e.g. via Spring Boot 3.5.13+)
  • The replacement PropertyNamingStrategies class has been available since Jackson 2.12, so this is fully backwards-compatible

Context

This is blocking hmcts/pcs-api#1597 (Spring Boot 3.5.10 → 3.5.13 upgrade), where pact consumer tests fail with:

java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.PropertyNamingStrategy$SnakeCaseStrategy

Test plan

  • CI build passes
  • Verify no remaining references to deprecated PropertyNamingStrategy class

Jackson 2.21 removed the deprecated inner classes from
PropertyNamingStrategy (e.g. SnakeCaseStrategy). This breaks
any downstream project that upgrades to Jackson 2.21+ (via
Spring Boot 3.5.13+) with a ClassNotFoundException.

Migrate all @JsonNaming annotations to use the replacement
PropertyNamingStrategies class, which has been available since
Jackson 2.12.
@linusnorton linusnorton merged commit 734c97d into master Mar 31, 2026
1 check 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.

1 participant