Skip to content

Commit 777639a

Browse files
authored
Ensure the compatibility with old (2.8.8) Jackson versions (#1652)
1 parent 5c6ac25 commit 777639a

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

docker-java-core/src/main/java/com/github/dockerjava/core/DockerClientConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ protected JsonDeserializer<?> newDelegatingInstance(JsonDeserializer<?> newDeleg
127127
@Override
128128
@SuppressWarnings({"deprecation", "unchecked"})
129129
public Object deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
130-
JsonNode jsonNode = ctxt.readTree(p);
130+
JsonNode jsonNode = p.readValueAsTree();
131131

132132
Object deserializedObject = originalMapper.treeToValue(jsonNode, beanDescription.getBeanClass());
133133

docker-java/pom.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,23 @@
115115
<groupId>org.awaitility</groupId>
116116
<artifactId>awaitility</artifactId>
117117
<version>4.0.1</version>
118+
<scope>test</scope>
119+
</dependency>
120+
121+
<dependency>
122+
<groupId>com.fasterxml.jackson.core</groupId>
123+
<artifactId>jackson-databind</artifactId>
124+
<!-- Force the version to 2.8.8 to ensure the compatibility with old projects -->
125+
<version>2.8.8</version>
126+
<scope>test</scope>
127+
</dependency>
128+
129+
<dependency>
130+
<groupId>com.fasterxml.jackson.core</groupId>
131+
<artifactId>jackson-annotations</artifactId>
132+
<!-- Force the version to 2.8.8 to ensure the compatibility with old projects -->
133+
<version>2.8.8</version>
134+
<scope>test</scope>
118135
</dependency>
119136

120137
<dependency>

0 commit comments

Comments
 (0)