Kryo doesn't serialize the TreeMapSerializer comparator.
How to reproduce:
HashMap map = new HashMap();
map.put(1,122);
map.put(2,314);
map.put(4,2511);
map.put(8,"hello");
map.put(10,"wasted");
map.put(3,"Great");
TreeMap treeMap = new TreeMap(Comparator.reverseOrder());
treeMap.putAll(map);
final Kryo kryo = new Kryo();
kryo.register(TreeMap.class, new DefaultSerializers.TreeMapSerializer());
kryo.writeClassAndObject(output, treeMap);
Object o = kryo.readClassAndObject(new Input(output.getBuffer()));
Kryo doesn't serialize the TreeMapSerializer comparator.
How to reproduce:
Did I use it wrong?
Thanks in advance