Skip to content

Commit

Permalink
Fix broken event deserializer
Browse files Browse the repository at this point in the history
- The ChatAlyticsEventDeserializer was broken because a ChatAlyticsEvent doesn't receive a Serializable anymore
  • Loading branch information
Giannis Neokleous committed Dec 17, 2016
1 parent 19eb4fc commit 9d5f166
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.chatalytics.core.model.data;

import com.fasterxml.jackson.annotation.JsonIgnore;

import org.joda.time.DateTime;

import lombok.Data;
Expand All @@ -22,6 +20,5 @@ public ChatAlyticsEvent(DateTime eventTime, String type, Object event) {
}

@Setter // null out clazz when it leaves the service
@JsonIgnore
private Class<?> clazz;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import org.joda.time.DateTime;

import java.io.IOException;
import java.io.Serializable;

/**
* Deserializer specific to {@link ChatAlyticsEvent}s. This exists because it understands how to
Expand Down Expand Up @@ -43,7 +42,7 @@ public ChatAlyticsEvent deserialize(JsonParser jp, DeserializationContext ctxt)
}

JsonParser eventParser = node.get("event").traverse();
Serializable event = (Serializable) oc.readValue(eventParser, clazz);
Object event = oc.readValue(eventParser, clazz);

return new ChatAlyticsEvent(eventTime, type, event);
}
Expand Down

0 comments on commit 9d5f166

Please sign in to comment.