You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to pack and unpack a set of a complex type which include 2 strings,
but when the unpacking occurs I get:
Exception in thread "main" org.msgpack.MessageTypeException: Array is end but readArrayEnd() is not called at org.msgpack.unpacker.UnpackerStack.checkCount(UnpackerStack.java:61) at org.msgpack.unpacker.MessagePackUnpacker.readOne(MessagePackUnpacker.java:72) at org.msgpack.unpacker.MessagePackUnpacker.readString(MessagePackUnpacker.java:502) at Main$1.read(Main.java:28) at Main$1.read(Main.java:18) at org.msgpack.template.AbstractTemplate.read(AbstractTemplate.java:31) at org.msgpack.template.SetTemplate.read(SetTemplate.java:67) at org.msgpack.template.SetTemplate.read(SetTemplate.java:28) at org.msgpack.template.AbstractTemplate.read(AbstractTemplate.java:31) at Main.main(Main.java:43)
From what I saw since its a set type the array size is inserted and when unpacking the sie is removed by one for each read and not considering that it is still on the elemnt type unpacking,
Hi,
I'm trying to pack and unpack a set of a complex type which include 2 strings,
but when the unpacking occurs I get:
Exception in thread "main" org.msgpack.MessageTypeException: Array is end but readArrayEnd() is not called at org.msgpack.unpacker.UnpackerStack.checkCount(UnpackerStack.java:61) at org.msgpack.unpacker.MessagePackUnpacker.readOne(MessagePackUnpacker.java:72) at org.msgpack.unpacker.MessagePackUnpacker.readString(MessagePackUnpacker.java:502) at Main$1.read(Main.java:28) at Main$1.read(Main.java:18) at org.msgpack.template.AbstractTemplate.read(AbstractTemplate.java:31) at org.msgpack.template.SetTemplate.read(SetTemplate.java:67) at org.msgpack.template.SetTemplate.read(SetTemplate.java:28) at org.msgpack.template.AbstractTemplate.read(AbstractTemplate.java:31) at Main.main(Main.java:43)
From what I saw since its a set type the array size is inserted and when unpacking the sie is removed by one for each read and not considering that it is still on the elemnt type unpacking,
see below is a code to reproduce the issue:
`
import org.msgpack.MessagePack;
import org.msgpack.packer.BufferPacker;
import org.msgpack.packer.Packer;
import org.msgpack.template.AbstractTemplate;
import org.msgpack.template.SetTemplate;
import org.msgpack.unpacker.BufferUnpacker;
import org.msgpack.unpacker.Unpacker;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class Main {
}
`
is this a bug? or am I doing it wrong?
The text was updated successfully, but these errors were encountered: