Skip to content

Upgrade jackson from 2.22.0 to 3.2.0#1677

Open
sabieber wants to merge 1 commit into
mainfrom
feature/sbi/SIRI-1149
Open

Upgrade jackson from 2.22.0 to 3.2.0#1677
sabieber wants to merge 1 commit into
mainfrom
feature/sbi/SIRI-1149

Conversation

@sabieber

Copy link
Copy Markdown
Member

BREAKING CHANGES

Upgrades Jackson from 2.22.0 to 3.2.0 across the sirius stack. Jackson 3 uses new Maven coordinates and Java packages — see the official Jackson 3 migration guide and release notes for the complete list of renames and behavioral changes.

What applications using the sirius framework have to change:

  • Rename imports com.fasterxml.jackson.*tools.jackson.* (annotations stay on com.fasterxml.jackson.annotation); drop jackson-datatype-jsr310 and JavaTimeModule registrations (built-in now).
  • Fix the resulting compile errors: unchecked exceptions (JsonProcessingExceptionJacksonException, dead catch (IOException) blocks), method renames (asText()asString() etc., writeFieldName()writeName() etc.), builder-based mapper/generator configuration — see the migration guide for details.

Additional Notes

Checklist

  • Code change has been tested and works locally
  • Code was formatted via IntelliJ and follows SonarLint & best practices
  • Patch Tasks: Is local execution of Patch Tasks necessary? If so, please also mark the PR with the tag.

Renames all imports from com.fasterxml.jackson to the new tools.jackson packages; annotations remain on the 2.x line. Applies the accompanying API renames: JsonProcessingException becomes the unchecked JacksonException and the text accessors are replaced by their string counterparts (asText() -> asString()).

No structural or behavioral changes are required as the shared object mapper in sirius-kernel retains its Jackson 2 compatible configuration.

Assisted-by: Claude Fable 5
Fixes: SIRI-1149
@sabieber
sabieber requested a review from Copilot July 13, 2026 13:31
@sabieber sabieber added 💣 BREAKING CHANGE Contains non-backwards compatible changes to public methods or changes the behavior of existing code ⬆️ Dependencies Pull requests that update a dependency file 🛠️ Maintenance Translations, Code Cleanup, ... 🤖 AI-Assisted Created with significant assistance of artificial intelligence tools labels Jul 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request migrates sirius-web to Jackson 3 APIs as part of the wider stack upgrade (new tools.jackson.* packages and renamed tree/node accessors), keeping the codebase compiling and tests aligned with the new API surface.

Changes:

  • Updated Jackson imports from com.fasterxml.jackson.* to tools.jackson.* in main and test code.
  • Migrated JsonNode string extraction from asText() to asString() in Kotlin tests and OAuth JSON parsing.
  • Updated JSON pretty-print error handling to catch JacksonException instead of JsonProcessingException.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/test/kotlin/sirius/web/util/CaptchaControllerTest.kt Updates JSON node string accessors to Jackson 3 (asString).
src/test/kotlin/sirius/web/http/WebServerTest.kt Updates JSON assertions to use asString throughout.
src/test/kotlin/sirius/web/http/WebServerNightlyTest.kt Updates JSON assertion to use asString.
src/test/kotlin/sirius/web/health/ConsoleControllerTest.kt Migrates JsonPointer import to Jackson 3 package.
src/test/java/sirius/web/service/JSONStructuredOutputTest.java Migrates Jackson tree node imports to tools.jackson.
src/test/java/sirius/web/http/TestResponse.java Migrates ObjectNode import to tools.jackson.
src/test/java/sirius/web/http/TestRequest.java Migrates ObjectNode import to tools.jackson.
src/main/java/sirius/web/templates/pdf/TagliatellePdfViaGotenbergChromiumContentHandler.java Migrates ObjectNode import to tools.jackson.
src/main/java/sirius/web/services/JSONStructuredOutput.java Migrates JsonNode import to tools.jackson.
src/main/java/sirius/web/services/JSONCall.java Updates exception type to JacksonException and migrates node imports.
src/main/java/sirius/web/security/oauth/ReceivedTokens.java Migrates ObjectNode import and asTextasString token parsing.
src/main/java/sirius/web/security/oauth/OAuthAuthentication.java Migrates ObjectNode import and asTextasString error parsing.
src/main/java/sirius/web/http/WebContext.java Migrates ObjectNode import to tools.jackson.
src/main/java/sirius/pasta/noodle/macros/JsonMacro.java Migrates ObjectNode import to tools.jackson.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖 AI-Assisted Created with significant assistance of artificial intelligence tools 💣 BREAKING CHANGE Contains non-backwards compatible changes to public methods or changes the behavior of existing code ⬆️ Dependencies Pull requests that update a dependency file 🛠️ Maintenance Translations, Code Cleanup, ...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants