Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Commit

Permalink
Fix 'toObject' null issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
ParkJeongHwan committed Sep 24, 2019
1 parent b652569 commit e0cfe68
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/realtimetech/kson/KsonContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,12 @@ public Object addToObjectStack(Class<?> clazz, Object object) throws Deserialize
private Object createAtToObject(boolean first, Class<?> type, Object originalValue) throws DeserializeException {
Object primaryId = null;

if(originalValue == null)
return null;

if(type.isEnum())
return Enum.valueOf((Class<Enum>) type, originalValue.toString());


if (originalValue instanceof KsonObject) {
KsonObject wrappingObject = (KsonObject) originalValue;

Expand Down

0 comments on commit e0cfe68

Please sign in to comment.