From 1b7fc08a2a111a4cdb7e095c45838da41c95d475 Mon Sep 17 00:00:00 2001 From: hqq2023623 <371209704@qq.com> Date: Mon, 19 Feb 2018 19:17:01 +0800 Subject: [PATCH] fix #1245 --- .../com/caucho/hessian/io/JavaDeserializer.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/JavaDeserializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/JavaDeserializer.java index e75b2115544..0240d3861eb 100644 --- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/JavaDeserializer.java +++ b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/JavaDeserializer.java @@ -134,19 +134,19 @@ protected static Object getParamArg(Class cl) { else if (boolean.class.equals(cl)) return Boolean.FALSE; else if (byte.class.equals(cl)) - return new Byte((byte) 0); + return 0; else if (short.class.equals(cl)) - return new Short((short) 0); + return 0; else if (char.class.equals(cl)) - return new Character((char) 0); + return 0; else if (int.class.equals(cl)) - return Integer.valueOf(0); + return 0; else if (long.class.equals(cl)) - return Long.valueOf(0); + return 0L; else if (float.class.equals(cl)) - return Float.valueOf(0); + return 0F; else if (double.class.equals(cl)) - return Double.valueOf(0); + return 0D; else throw new UnsupportedOperationException(); }