Skip to content

Commit

Permalink
Merge pull request #149 from gneokleo/master
Browse files Browse the repository at this point in the history
Fix broken event deserializer
  • Loading branch information
gneokleo committed Dec 17, 2016
2 parents 21f177c + 9d5f166 commit c638dc1
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 c638dc1

Please sign in to comment.