Mercurial > hg > Database > Alice
changeset 651:058bff2123c8
fix getValue
author | suruga |
---|---|
date | Wed, 07 Feb 2018 19:02:56 +0900 |
parents | 4289b232b3fd |
children | fb1ddc5696ca |
files | src/main/java/alice/datasegment/ReceiveData.java src/main/java/alice/datasegment/Receiver.java |
diffstat | 2 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/alice/datasegment/ReceiveData.java Fri Feb 02 18:26:49 2018 +0900 +++ b/src/main/java/alice/datasegment/ReceiveData.java Wed Feb 07 19:02:56 2018 +0900 @@ -119,7 +119,7 @@ return packer.read(messagePack, clazz); - } catch (IOException e) {// | DataFormatException e + } catch (IOException e) {// | DataFormatExceptione e.printStackTrace(); return null; }
--- a/src/main/java/alice/datasegment/Receiver.java Fri Feb 02 18:26:49 2018 +0900 +++ b/src/main/java/alice/datasegment/Receiver.java Wed Feb 07 19:02:56 2018 +0900 @@ -3,6 +3,9 @@ import alice.codesegment.InputDataSegment; import javassist.compiler.ast.ASTree; +import org.msgpack.type.NilValue; +import org.msgpack.type.Value; +import org.omg.CORBA.Object; /** * idsコマンド(create, setKey)の処理をする。コマンドの定義はids/LDSM内にある。 @@ -115,8 +118,12 @@ return data.getObj(); } - public Object getVal() { - return data.getVal(); + public Value getVal() { + Value obj = data.getVal(); + if (obj.getClass() == NilValue.class) + return null; + else + return obj; } public ReceiveData getReceiveData() {