Skip to content

Commit

Permalink
GH-686: Handle tombstones in Json Ser/Deser
Browse files Browse the repository at this point in the history
Fixes #686

**Cherry-pick to 2.1.x, 2.0.x, 1.3.x**

(cherry picked from commit 8dc1dcd)

# Conflicts:
#	spring-kafka/src/main/java/org/springframework/kafka/support/serializer/JsonDeserializer.java
#	spring-kafka/src/main/java/org/springframework/kafka/support/serializer/JsonSerializer.java

(cherry picked from commit 02d4a45)
  • Loading branch information
garyrussell authored and artembilan committed Jun 13, 2018
1 parent 2472224 commit 4811ea8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ public void configure(Map<String, ?> configs, boolean isKey) {
}

public T deserialize(String topic, byte[] data) {
if (data == null) {
return null;
}
if (this.reader == null) {
this.reader = this.objectMapper.readerFor(this.targetType);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public void configure(Map<String, ?> configs, boolean isKey) {
}

public byte[] serialize(String topic, T data) {
if (data == null) {
return null;
}
try {
byte[] result = null;
if (data != null) {
Expand Down

0 comments on commit 4811ea8

Please sign in to comment.