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
PriorityQueue<String> foo = new PriorityQueue<>();
Kryo kryo = KryoKoinKt.buildKryoKoin();
File saveFile = new File("dat.bin");
Output o = new Output(new FileOutputStream(saveFile));
kryo.writeObject(o, foo);
o.close();
Input i = new Input(new FileInputStream(saveFile));
PriorityQueue<String> restored = kryo.readObject(i, PriorityQueue.class);
System.out.println(restored);
Expected: it should read the empty queue.
Observed:
Exception in thread "main" java.lang.IllegalArgumentException
at java.base/java.util.PriorityQueue.<init>(PriorityQueue.java:171)
at com.esotericsoftware.kryo.serializers.DefaultSerializers$PriorityQueueSerializer.createPriorityQueue(DefaultSerializers.java:746)
at com.esotericsoftware.kryo.serializers.DefaultSerializers$PriorityQueueSerializer.create(DefaultSerializers.java:738)
at com.esotericsoftware.kryo.serializers.DefaultSerializers$PriorityQueueSerializer.create(DefaultSerializers.java:732)
at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:216)
at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:44)
at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:774)
at KryoPrioMap.main(KryoPrioMap.java:25)
Environment:
OS: Windows
JDK Version: 11
Kryo Version: 5.2
The text was updated successfully, but these errors were encountered:
Describe the bug
Consider the following example:
Expected: it should read the empty queue.
Observed:
Environment:
The text was updated successfully, but these errors were encountered: