Created
July 27, 2015 22:26
-
-
Save leothekim/0e52f0a7e71ba9150e3d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/main/java/com/stripe/model/EventDataDeserializer.java b/src/main/java/com/stripe/model/EventDataDeserializer.java | |
| index 9489b98..f4106f4 100644 | |
| --- a/src/main/java/com/stripe/model/EventDataDeserializer.java | |
| +++ b/src/main/java/com/stripe/model/EventDataDeserializer.java | |
| @@ -99,7 +99,9 @@ public class EventDataDeserializer implements JsonDeserializer<EventData> { | |
| JsonElement element = entry.getValue(); | |
| if("previous_attributes".equals(key)) { | |
| Map<String, Object> previousAttributes = new HashMap<String, Object>(); | |
| - populateMapFromJSONObject(previousAttributes, element.getAsJsonObject()); | |
| + if (element.getAsJsonObject() != null) { | |
| + populateMapFromJSONObject(previousAttributes, element.getAsJsonObject()); | |
| + } | |
| eventData.setPreviousAttributes(previousAttributes); | |
| } else if ("object".equals(key)) { | |
| String type = element.getAsJsonObject().get("object").getAsString(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment