From 86128ed6159f2f62d936a1c07c9e556740b51691 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Mar 2026 00:38:43 +0000 Subject: [PATCH 1/2] Initial plan From 041548e50fcd308d6ee3e0dd8d376392d79bf453 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Mar 2026 00:44:20 +0000 Subject: [PATCH 2/2] fix: update Jackson imports for Spring Boot 4.x / Jackson 3.x compatibility Co-authored-by: JP-Ellis <3196162+JP-Ellis@users.noreply.github.com> --- .../com/example/products/ProductClient.java | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/example/products/ProductClient.java b/src/main/java/com/example/products/ProductClient.java index 1db0106..f55c0c3 100644 --- a/src/main/java/com/example/products/ProductClient.java +++ b/src/main/java/com/example/products/ProductClient.java @@ -2,9 +2,8 @@ import org.apache.http.client.fluent.Request; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.core.type.TypeReference; +import tools.jackson.databind.ObjectMapper; import java.io.IOException; import java.util.List; @@ -22,14 +21,8 @@ public Product getProduct(String id) throws IOException { return (Product) Request.Get(this.url + "/product/" + id) .addHeader("Accept", "application/json") .execute().handleResponse(httpResponse -> { - try { - ObjectMapper mapper = new ObjectMapper(); - Product product = mapper.readValue(httpResponse.getEntity().getContent(), Product.class); - - return product; - } catch (JsonMappingException e) { - throw new IOException(e); - } + ObjectMapper mapper = new ObjectMapper(); + return mapper.readValue(httpResponse.getEntity().getContent(), Product.class); }); } @@ -37,14 +30,8 @@ public List getProducts() throws IOException { return (List) Request.Get(this.url + "/products") .addHeader("Accept", "application/json") .execute().handleResponse(httpResponse -> { - try { - ObjectMapper mapper = new ObjectMapper(); - List products = mapper.readValue(httpResponse.getEntity().getContent(), new TypeReference>(){}); - - return products; - } catch (JsonMappingException e) { - throw new IOException(e); - } + ObjectMapper mapper = new ObjectMapper(); + return mapper.readValue(httpResponse.getEntity().getContent(), new TypeReference>(){}); }); } }