Skip to content

fix: update Jackson imports for Spring Boot 4.x / Jackson 3.x compatibility#66

Merged
JP-Ellis merged 2 commits intorenovate/org.springframework.boot-4.xfrom
copilot/sub-pr-57
Mar 4, 2026
Merged

fix: update Jackson imports for Spring Boot 4.x / Jackson 3.x compatibility#66
JP-Ellis merged 2 commits intorenovate/org.springframework.boot-4.xfrom
copilot/sub-pr-57

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

Spring Boot 4.x bundles Jackson 3.x, which relocated its core packages from com.fasterxml.jackson to tools.jackson, breaking compilation.

Changes

  • ProductClient.java: Update imports to tools.jackson namespace:
    • com.fasterxml.jackson.databind.ObjectMappertools.jackson.databind.ObjectMapper
    • com.fasterxml.jackson.core.type.TypeReferencetools.jackson.core.type.TypeReference
    • Remove JsonMappingException catch blocks — JacksonException in Jackson 3.x now extends RuntimeException (unchecked), eliminating the need to wrap and rethrow as IOException
// Before
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;

// ...
try {
    ObjectMapper mapper = new ObjectMapper();
    Product product = mapper.readValue(..., Product.class);
    return product;
} catch (JsonMappingException e) {
    throw new IOException(e);
}

// After
import tools.jackson.core.type.TypeReference;
import tools.jackson.databind.ObjectMapper;

// ...
ObjectMapper mapper = new ObjectMapper();
return mapper.readValue(..., Product.class);

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…bility

Co-authored-by: JP-Ellis <3196162+JP-Ellis@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 4, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.google-analytics.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -Dorg.gradle.internal.worker.tmpdir=/home/REDACTED/work/example-consumer-java-junit/example-consumer-java-junit/build/tmp/test/work @/home/REDACTED/.gradle/.tmp/gradle-worker-classpath17820009544874291802txt -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -ea worker.org.gradle.process.internal.worker.GradleWorkerMain &#39;Gradle Test Executor 1&#39; (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update Spring Boot plugin to version 4.0.3 fix: update Jackson imports for Spring Boot 4.x / Jackson 3.x compatibility Mar 4, 2026
@JP-Ellis JP-Ellis marked this pull request as ready for review March 4, 2026 00:49
@JP-Ellis JP-Ellis merged commit 1142fc4 into renovate/org.springframework.boot-4.x Mar 4, 2026
5 checks 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.

2 participants