Mercurial > hg > Database > Alice
changeset 650:4289b232b3fd
nulValue
author | suruga |
---|---|
date | Fri, 02 Feb 2018 18:26:49 +0900 |
parents | b8527d1032c4 |
children | 058bff2123c8 |
files | src/main/java/alice/datasegment/ReceiveData.java |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/alice/datasegment/ReceiveData.java Fri Feb 02 18:06:46 2018 +0900 +++ b/src/main/java/alice/datasegment/ReceiveData.java Fri Feb 02 18:26:49 2018 +0900 @@ -6,6 +6,7 @@ import java.util.zip.*; import org.msgpack.MessagePack; +import org.msgpack.type.NilValue; import org.msgpack.type.Value; @@ -33,7 +34,11 @@ * @param obj DS本体(Object) */ public ReceiveData(Object obj) { - clazz = obj.getClass(); + if (obj == null) { + clazz = NilValue.class; + } else { + clazz = obj.getClass(); + } val = obj; }