Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
6238ea0
DEVX-796: updating Java version to 17
ShipilA May 26, 2026
b0883bd
DEVX-796: verifying SDK HTTP clients compatibility with virtual threads
ShipilA May 26, 2026
299827b
DEVX-796 updated jackson
ShipilA May 29, 2026
1ca395c
DEVX-796: fixing SphereJsonUtils due to jackson 2->3 update
ShipilA May 29, 2026
383b1b8
spotless: Fix code style
ct-sdks[bot] May 29, 2026
227f88f
spotless: add commit to blame ignore revs file
ct-sdks[bot] May 29, 2026
748d5bc
TASK: Updating license information
ct-sdks[bot] May 29, 2026
c017b63
DEVX-796: fixing jackson version in file names due to jackson 2->3 up…
ShipilA May 29, 2026
03b509c
Merge remote-tracking branch 'origin/DEVX-796-Spring-Boot-supportabil…
ShipilA May 29, 2026
b7c1b41
DEVX-796: changing setSerializationInclusion to changeDefaultProperty…
ShipilA May 29, 2026
f6aab9d
spotless: Fix code style
ct-sdks[bot] May 29, 2026
b4dd7e1
spotless: add commit to blame ignore revs file
ct-sdks[bot] May 29, 2026
766074d
DEVX-796: BREAKING CHANGE
ShipilA May 29, 2026
558ed75
Merge remote-tracking branch 'origin/DEVX-796-Spring-Boot-supportabil…
ShipilA May 29, 2026
adb14fc
TASK: Updating license information
ct-sdks[bot] May 29, 2026
3060ce0
DEVX-796: fixing internal docs
ShipilA May 29, 2026
e285482
Merge remote-tracking branch 'origin/DEVX-796-Spring-Boot-supportabil…
ShipilA May 29, 2026
9693c76
DEVX-796: fixing internal docs
ShipilA May 29, 2026
092d062
DEVX-796: testing examples
ShipilA Jun 1, 2026
d653cae
DEVX-796: testing examples
ShipilA Jun 1, 2026
1f82eac
DEVX-796: fixing examples tests
ShipilA Jun 2, 2026
853add6
DEVX-796: fixing jackson annotations in examples
ShipilA Jun 2, 2026
da1684b
DEVX-796: fixing jackson datatype in examples
ShipilA Jun 2, 2026
aa66904
DEVX-796: fixing 'groupId' with 'com.fasterxml.jackson.core'
ShipilA Jun 2, 2026
dc48916
DEVX-796: fixing build.gradle
ShipilA Jun 2, 2026
2af2911
DEVX-796: fixing build.gradle
ShipilA Jun 3, 2026
d40e516
DEVX-796: merging main
ShipilA Jun 3, 2026
a0c43e8
DEVX-796: fixing ProductUtil
ShipilA Jun 3, 2026
b9d48af
DEVX-796: fixing spotless
ShipilA Jun 3, 2026
7e8b86b
TASK: Updating license information
ct-sdks[bot] Jun 3, 2026
75dfccf
DEVX-796: updating jackson 3 for updates from main
ShipilA Jun 5, 2026
df3636b
Exclude generated files for review
ShipilA Jun 8, 2026
b6c90b6
Remove .DS_Store files
ShipilA Jun 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ c4e2bf407aa0b7a3d34605134791013ba8a2d376
f00f4fe6ed5e22cdd2e3f68370c2da96e6bbc8e7
899ed51a7b6607161fcda5c1000115a076cc4fe7
53b9d9cc4fc4091b89f84effb6e526371d3bae68
383b1b8dee10fbed5dab6566ea0fe49caf9e15b4
f6aab9d10212756b1d71a0568c706a9df51c322d
4822581aeff072b7649c7aec56a13a95bd58c249
eb09ce06943ccb460981afaa6b5ecfd54f8f87e2
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ jobs:
CTP_PROJECT_KEY: ${{ secrets.CTP_PROJECT_KEY }}
SOURCE_TAG: ${{ github.ref_name }}
CTP_JVM_SDK_LOG_LEVEL: OFF

- name: Debug Jackson classpath
run: mvn dependency:tree -f examples/maven-okhttp3/pom.xml | grep -i jackson
- name: Test examples
run: |
cd examples/maven-okhttp3 && mvn verify --no-transfer-progress
Expand Down
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ subprojects { project ->

java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
languageVersion = JavaLanguageVersion.of(17)
}
}
tasks.withType(JavaCompile).configureEach {
Expand Down Expand Up @@ -136,6 +136,7 @@ subprojects { project ->
javaLauncher = javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(17)
}
jvmArgs '-Djdk.tracePinnedThreads=full'
}
}

Expand Down Expand Up @@ -173,7 +174,8 @@ generateLicenseReport {
}

def excludeProjects = [
'internal-docs'
'internal-docs',
'commercetools-sdk-compat-v1'
]
subprojects { project ->
if (project.file("build.gradle").exists() && !excludeProjects.contains(project.name)) {
Expand Down Expand Up @@ -223,7 +225,7 @@ def documentationProjects= [
":commercetools:commercetools-okhttp-client3",
":commercetools:commercetools-okhttp-client4",
":commercetools:commercetools-reactornetty-client",
":commercetools:commercetools-sdk-compat-v1",
//":commercetools:commercetools-sdk-compat-v1",
":commercetools:commercetools-sdk-java-api",
":commercetools:commercetools-sdk-java-history",
":commercetools:commercetools-sdk-java-importapi",
Expand Down
6 changes: 3 additions & 3 deletions commercetools/commercetools-graphql-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies {
api graphql.java
api jackson_core.databind
api jackson_core.core
api jackson_core.datatype
//api jackson_core.datatype
api 'com.netflix.graphql.dgs.codegen:graphql-dgs-codegen-shared-core:8.5.0'

}
Expand All @@ -55,8 +55,8 @@ generateJava {
"Country": "String",
"Locale": "String",
"Long": "Long",
"Json": "com.fasterxml.jackson.databind.JsonNode",
"JsonPrimitive": "com.fasterxml.jackson.databind.node.ValueNode",
"Json": "tools.jackson.databind.JsonNode",
"JsonPrimitive": "tools.jackson.databind.node.ValueNode",
"KeyReferenceInput": "String",
"Set": "Object",
"Time": "String",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import com.commercetools.api.models.graph_ql.GraphQLError;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

import jakarta.validation.Valid;
import tools.jackson.databind.annotation.JsonDeserialize;

/**
* GraphQLResponse
Expand Down Expand Up @@ -141,8 +141,8 @@ default <T> T withGraphQLDataResponse(Function<GraphQLDataResponse, T> helper) {
* gives a TypeReference for usage with Jackson DataBind
* @return TypeReference
*/
public static com.fasterxml.jackson.core.type.TypeReference<GraphQLDataResponse> typeReference() {
return new com.fasterxml.jackson.core.type.TypeReference<GraphQLDataResponse>() {
public static tools.jackson.core.type.TypeReference<GraphQLDataResponse> typeReference() {
return new tools.jackson.core.type.TypeReference<GraphQLDataResponse>() {
@Override
public String toString() {
return "TypeReference<GraphQLDataResponse>";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
package com.commercetools.graphql.api;

import com.commercetools.api.models.graph_ql.GraphQLResponse;
import com.fasterxml.jackson.databind.module.SimpleModule;

import tools.jackson.databind.module.SimpleModule;

public class GraphQLModule extends SimpleModule {
private static final long serialVersionUID = 0L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
package com.commercetools.graphql.api;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

import tools.jackson.databind.annotation.JsonDeserialize;

public interface GraphQLResponseMixin {
@JsonProperty("data")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@
import com.commercetools.api.models.product.ProductProjection;
import com.commercetools.api.models.product.ProductProjectionImpl;
import com.commercetools.importapi.models.productvariants.*;
import com.fasterxml.jackson.databind.ObjectMapper;

import io.vrap.rmf.base.client.utils.json.JsonUtils;

import org.junit.jupiter.api.Test;

import tools.jackson.databind.ObjectMapper;
import tools.jackson.databind.json.JsonMapper;

public class ProductUtilTest {
String productProjectionExample = "src/test/resources/product-projection.example.json";
private final ObjectMapper objectMapper = new ObjectMapper();
private final ObjectMapper objectMapper = new JsonMapper();
ProductUtil util = new ProductUtil();

@Test
Expand Down
2 changes: 1 addition & 1 deletion commercetools/commercetools-javanet-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ dependencies {

java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
languageVersion = JavaLanguageVersion.of(17)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.v2.api.MetricsApi;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JavaType;

import io.vrap.rmf.base.client.ApiHttpResponse;
import io.vrap.rmf.base.client.ResponseSerializer;

import tools.jackson.core.JacksonException;
import tools.jackson.core.type.TypeReference;
import tools.jackson.databind.JavaType;

/**
* This serializer uses API to submit metrics to datadog.
* If you are using dogstatsd, use {@link com.commercetools.monitoring.datadog.statsd.DatadogResponseSerializer} to submit metrics to datadog with statsd.
Expand Down Expand Up @@ -83,7 +84,7 @@ public <O> ApiHttpResponse<O> convertResponse(ApiHttpResponse<byte[]> response,
}

@Override
public byte[] toJsonByteArray(Object value) throws JsonProcessingException {
public byte[] toJsonByteArray(Object value) throws JacksonException {
Instant start = Instant.now();
byte[] result = serializer.toJsonByteArray(value);
double durationInMillis = Duration.between(start, Instant.now()).toNanos() / 1_000_000.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
import java.util.*;
import java.util.stream.Collectors;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JavaType;
import com.timgroup.statsd.StatsDClient;

import io.vrap.rmf.base.client.ApiHttpResponse;
import io.vrap.rmf.base.client.ResponseSerializer;

import tools.jackson.core.JacksonException;
import tools.jackson.core.type.TypeReference;
import tools.jackson.databind.JavaType;

/**
* This serializer uses dogstatsd library to submit metrics to datadog.
* If you are not using statsd, use {@link com.commercetools.monitoring.datadog.DatadogResponseSerializer} to submit metrics to datadog with API.
Expand Down Expand Up @@ -82,7 +83,7 @@ public <O> ApiHttpResponse<O> convertResponse(ApiHttpResponse<byte[]> response,
}

@Override
public byte[] toJsonByteArray(Object value) throws JsonProcessingException {
public byte[] toJsonByteArray(Object value) throws JacksonException {
Instant start = Instant.now();
byte[] result = serializer.toJsonByteArray(value);
double durationInMillis = Duration.between(start, Instant.now()).toNanos() / 1_000_000.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.commercetools.monitoring.datadog.DatadogResponseSerializer;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.MetricsApi;
import com.fasterxml.jackson.core.JsonProcessingException;

import io.vrap.rmf.base.client.ApiHttpHeaders;
import io.vrap.rmf.base.client.ApiHttpResponse;
Expand All @@ -19,10 +18,12 @@
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;

import tools.jackson.core.JacksonException;

public class ResponseSerializerTest {

@Test
public void testSerialize() throws ApiException, JsonProcessingException {
public void testSerialize() throws ApiException, JacksonException {
MetricsApi metricsApi = Mockito.mock(MetricsApi.class);
Mockito.when(metricsApi.submitMetrics(Mockito.any())).thenReturn(null);
DatadogResponseSerializer serializer = new DatadogResponseSerializer(ResponseSerializer.of(), metricsApi);
Expand All @@ -40,7 +41,7 @@ public void testSerialize() throws ApiException, JsonProcessingException {
}

@Test
public void testSerializeWithAttributes() throws ApiException, JsonProcessingException {
public void testSerializeWithAttributes() throws ApiException, JacksonException {
MetricsApi metricsApi = Mockito.mock(MetricsApi.class);
Mockito.when(metricsApi.submitMetrics(Mockito.any())).thenReturn(null);
Map<String, String> tags = new HashMap<>();
Expand All @@ -66,7 +67,7 @@ public void testSerializeWithAttributes() throws ApiException, JsonProcessingExc
}

@Test
public void testDeserialize() throws ApiException, JsonProcessingException {
public void testDeserialize() throws ApiException, JacksonException {
MetricsApi metricsApi = Mockito.mock(MetricsApi.class);
Mockito.when(metricsApi.submitMetrics(Mockito.any())).thenReturn(null);
DatadogResponseSerializer serializer = new DatadogResponseSerializer(ResponseSerializer.of(), metricsApi);
Expand All @@ -86,7 +87,7 @@ public void testDeserialize() throws ApiException, JsonProcessingException {
}

@Test
public void testDeserializeWithAttributes() throws ApiException, JsonProcessingException {
public void testDeserializeWithAttributes() throws ApiException, JacksonException {
MetricsApi metricsApi = Mockito.mock(MetricsApi.class);
Mockito.when(metricsApi.submitMetrics(Mockito.any())).thenReturn(null);
Map<String, String> tags = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
import java.util.Collections;
import java.util.Map;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JavaType;
import com.newrelic.api.agent.NewRelic;

import io.vrap.rmf.base.client.ApiHttpResponse;
import io.vrap.rmf.base.client.ResponseSerializer;

import tools.jackson.core.JacksonException;
import tools.jackson.core.type.TypeReference;
import tools.jackson.databind.JavaType;

/**
* This serializer uses API to submit metrics to newrelic.
*/
Expand Down Expand Up @@ -64,7 +65,7 @@ public <O> ApiHttpResponse<O> convertResponse(ApiHttpResponse<byte[]> response,
}

@Override
public byte[] toJsonByteArray(Object value) throws JsonProcessingException {
public byte[] toJsonByteArray(Object value) throws JacksonException {
Instant start = Instant.now();
byte[] result = serializer.toJsonByteArray(value);
double durationInMillis = Duration.between(start, Instant.now()).toNanos() / 1_000_000.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
import java.util.Collections;
import java.util.Map;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JavaType;

import io.opentelemetry.api.OpenTelemetry;
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.api.common.AttributesBuilder;
Expand All @@ -18,6 +14,10 @@
import io.vrap.rmf.base.client.ApiHttpResponse;
import io.vrap.rmf.base.client.ResponseSerializer;

import tools.jackson.core.JacksonException;
import tools.jackson.core.type.TypeReference;
import tools.jackson.databind.JavaType;

/**
* <p>The OpenTelemetry ResponseSerializer can be used to report metrics about the De-/Serialization performance.
* It can be registered as a {@link ResponseSerializer} to the {@link io.vrap.rmf.base.client.ClientBuilder#withSerializer(ResponseSerializer)} ClientBuilder
Expand Down Expand Up @@ -99,7 +99,7 @@ public <O> ApiHttpResponse<O> convertResponse(ApiHttpResponse<byte[]> response,
}

@Override
public byte[] toJsonByteArray(Object value) throws JsonProcessingException {
public byte[] toJsonByteArray(Object value) throws JacksonException {
Instant start = Instant.now();
byte[] result = serializer.toJsonByteArray(value);
Attributes attributes = this.attributes.toBuilder()
Expand Down
4 changes: 2 additions & 2 deletions commercetools/commercetools-sdk-java-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,10 @@ publishing {
def jacksonAnno = dependenciesNode.appendNode('dependency')
jacksonAnno.appendNode('groupId', 'com.fasterxml.jackson.core')
jacksonAnno.appendNode('artifactId', 'jackson-annotations')
jacksonAnno.appendNode('version', jackson_core.version)
jacksonAnno.appendNode('version', 2.21)
jacksonAnno.appendNode('scope', 'compile')
def jacksonDB = dependenciesNode.appendNode('dependency')
jacksonDB.appendNode('groupId', 'com.fasterxml.jackson.core')
jacksonDB.appendNode('groupId', 'tools.jackson.core')
jacksonDB.appendNode('artifactId', 'jackson-databind')
jacksonDB.appendNode('version', jackson_core.version)
jacksonDB.appendNode('scope', 'compile')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

import com.commercetools.api.models.custom_object.*;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.type.TypeFactory;
import commercetools.utils.CommercetoolsTestUtils;
import commercetools.utils.ValueObject;

Expand All @@ -20,6 +17,10 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import tools.jackson.core.type.TypeReference;
import tools.jackson.databind.JavaType;
import tools.jackson.databind.type.TypeFactory;

public class CustomObjectIntegrationTests {

@Test
Expand Down Expand Up @@ -117,7 +118,7 @@ public void updateWithClass() {
Assertions.assertEquals(typeRefCustomObject.getValue().getBars().get(1).getName(), "Winchester");
Assertions.assertEquals(typeRefCustomObject.getValue().getBars().get(1).getNumber(), 2);

JavaType javaType = TypeFactory.defaultInstance()
JavaType javaType = TypeFactory.createDefaultInstance()
.constructParametricType(GenericCustomObject.class, Foo.class);
GenericCustomObject<Foo> javaTypeCustomObject = (GenericCustomObject<Foo>) CommercetoolsTestUtils
.getProjectApiRoot()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@
import com.commercetools.api.client.ProjectApiRoot;
import com.commercetools.api.models.graph_ql.GraphQLRequest;
import com.commercetools.api.models.graph_ql.GraphQLResponse;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import commercetools.utils.CommercetoolsTestUtils;

import io.vrap.rmf.base.client.ApiHttpResponse;

import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;

import tools.jackson.databind.JsonNode;
import tools.jackson.databind.node.ObjectNode;

public class GraphQLTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

package com.commercetools.api;

import com.fasterxml.jackson.databind.module.SimpleModule;

import io.vrap.rmf.base.client.utils.json.modules.ModuleOptions;

import tools.jackson.databind.module.SimpleModule;

public interface SimpleModuleMixin {
public void mixin(SimpleModule module, ModuleOptions options);
}
Loading
Loading