Skip to content

Commit b2e71c8

Browse files
authored
Merge pull request #1141 from purecloudlabs/DEVTOOLING-1367
[DEVTOOLING-1367] Adding necessary jsr310 dependency for java.time.Duration parsing
2 parents d7c2507 + c26081e commit b2e71c8

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

resources/sdk/purecloudjava/templates/ApiClient.mustache

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
77
import com.fasterxml.jackson.databind.SerializationFeature;
88
import com.fasterxml.jackson.databind.module.SimpleModule;
99
import com.fasterxml.jackson.datatype.joda.JodaModule;
10+
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
1011

1112
import java.io.ByteArrayInputStream;
1213
import java.io.InputStream;
@@ -182,6 +183,7 @@ public class ApiClient implements AutoCloseable {
182183
objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
183184
objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
184185
objectMapper.registerModule(new JodaModule());
186+
objectMapper.registerModule(new JavaTimeModule());
185187
objectMapper.setDateFormat(dateFormat);
186188
SimpleModule localDateModule = new SimpleModule();
187189
localDateModule.addSerializer(LocalDate.class, new LocalDateSerializer());

resources/sdk/purecloudjava/templates/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,11 @@
308308
<artifactId>jackson-datatype-joda</artifactId>
309309
<version>${jackson-version}</version>
310310
</dependency>
311+
<dependency>
312+
<groupId>com.fasterxml.jackson.datatype</groupId>
313+
<artifactId>jackson-datatype-jsr310</artifactId>
314+
<version>${jackson-version}</version>
315+
</dependency>
311316
<dependency>
312317
<groupId>joda-time</groupId>
313318
<artifactId>joda-time</artifactId>

0 commit comments

Comments
 (0)