diff --git a/src/net/KNet/Specific/Serialization/KNetSerialization.cs b/src/net/KNet/Specific/Serialization/KNetSerialization.cs index 9323bf5dd5..0cf003b115 100644 --- a/src/net/KNet/Specific/Serialization/KNetSerialization.cs +++ b/src/net/KNet/Specific/Serialization/KNetSerialization.cs @@ -263,7 +263,7 @@ public static ByteBuffer DeserializeByteBuffer(string topic, byte[] data) /// public static Bytes DeserializeBytes(string topic, byte[] data) { - return JVMBridgeBase.Wraps< Bytes>(_BytesDeserializer.Deserialize(topic, data) as IJavaObject); + return JVMBridgeBase.Wraps(_BytesDeserializer.Deserialize(topic, data) as IJavaObject); } static readonly DoubleDeserializer _DoubleDeserializer = new DoubleDeserializer(); @@ -272,7 +272,7 @@ public static Bytes DeserializeBytes(string topic, byte[] data) /// public static double DeserializeDouble(string topic, byte[] data) { - return (double)_DoubleDeserializer.Deserialize(topic, data); + return JVMBridgeBase.Wraps(_DoubleDeserializer.Deserialize(topic, data) as IJavaObject); } static readonly FloatDeserializer _FloatDeserializer = new FloatDeserializer(); @@ -281,7 +281,7 @@ public static double DeserializeDouble(string topic, byte[] data) /// public static float DeserializeFloat(string topic, byte[] data) { - return (float)_FloatDeserializer.Deserialize(topic, data); + return JVMBridgeBase.Wraps(_FloatDeserializer.Deserialize(topic, data) as IJavaObject); } static readonly IntegerDeserializer _IntDeserializer = new IntegerDeserializer(); @@ -290,7 +290,7 @@ public static float DeserializeFloat(string topic, byte[] data) /// public static int DeserializeInt(string topic, byte[] data) { - return (int)_IntDeserializer.Deserialize(topic, data); + return JVMBridgeBase.Wraps(_IntDeserializer.Deserialize(topic, data) as IJavaObject); //if (data == null) //{ @@ -324,7 +324,7 @@ public static int DeserializeInt(string topic, byte[] data) /// public static long DeserializeLong(string topic, byte[] data) { - return (long)_LongDeserializer.Deserialize(topic, data); + return JVMBridgeBase.Wraps(_LongDeserializer.Deserialize(topic, data) as IJavaObject); //if (data == null) //{ @@ -358,7 +358,7 @@ public static long DeserializeLong(string topic, byte[] data) /// public static short DeserializeShort(string topic, byte[] data) { - return (short)_ShortDeserializer.Deserialize(topic, data); + return JVMBridgeBase.Wraps(_ShortDeserializer.Deserialize(topic, data) as IJavaObject); //if (data == null) //{