Skip to content

Commit 85e1753

Browse files
GH-230 removing unused cloudevent serializer and deserializer and hence dependency (#231)
* removing unwanted/unneeded/unused cloudevent serializer and deserializer and hence dependency * It was introduced here #126 * not sure why * reminder: ISO Date formatting is coming for free in Jackson when using `@JsonFormat` * we still have this #16 pending * but for now I propose we remove this annoying dependency
1 parent 75adbd9 commit 85e1753

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

core/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@
7171
<groupId>io.openapitools.jackson.dataformat</groupId>
7272
<artifactId>jackson-dataformat-hal</artifactId>
7373
</dependency>
74-
<dependency>
75-
<groupId>io.cloudevents</groupId>
76-
<artifactId>cloudevents-api</artifactId>
77-
</dependency>
7874

7975
<dependency>
8076
<groupId>org.junit.jupiter</groupId>

core/src/main/java/com/adobe/aio/util/JacksonUtil.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,9 @@
1717
import com.fasterxml.jackson.databind.JsonNode;
1818
import com.fasterxml.jackson.databind.ObjectMapper;
1919
import com.fasterxml.jackson.databind.json.JsonMapper;
20-
import com.fasterxml.jackson.databind.module.SimpleModule;
2120
import com.fasterxml.jackson.databind.node.TextNode;
2221
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
23-
import io.cloudevents.json.ZonedDateTimeDeserializer;
24-
import io.cloudevents.json.ZonedDateTimeSerializer;
2522
import io.openapitools.jackson.dataformat.hal.JacksonHALModule;
26-
import java.time.ZonedDateTime;
2723
import org.apache.commons.lang3.StringUtils;
2824

2925
public class JacksonUtil {
@@ -35,10 +31,6 @@ private JacksonUtil() {
3531
JsonMapper.builder()
3632
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
3733
.serializationInclusion(Include.NON_NULL)
38-
.addModule(new SimpleModule()
39-
.addSerializer(ZonedDateTime.class, new ZonedDateTimeSerializer())
40-
.addDeserializer(ZonedDateTime.class, new ZonedDateTimeDeserializer()))
41-
// let's stick to CloudEvents v1 ISO_OFFSET_DATE_TIME date format
4234
.addModule(new JacksonHALModule())
4335
.addModule(new Jdk8Module())
4436
.build();

pom.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@
104104
<jackson.version>2.13.4</jackson.version>
105105
<jjwt.version>0.11.5</jjwt.version>
106106

107-
<cloudevents.version>1.2.0</cloudevents.version>
108-
<!-- we'll stick to this CloudEvents v1 version for now -->
109-
110107
<!-- https://github.com/openapi-tools/jackson-dataformat-hal/blob/v1.0.9/pom.xml -->
111108
<jackson-dataformat-hal.version>1.0.9</jackson-dataformat-hal.version>
112109

@@ -124,12 +121,6 @@
124121
<version>${commons-text.version}</version>
125122
</dependency>
126123

127-
<dependency>
128-
<groupId>io.cloudevents</groupId>
129-
<artifactId>cloudevents-api</artifactId>
130-
<version>${cloudevents.version}</version>
131-
</dependency>
132-
133124
<dependency>
134125
<groupId>org.apache.commons</groupId>
135126
<artifactId>commons-lang3</artifactId>

0 commit comments

Comments
 (0)