if (length == 0) return map;
Class keyClass = this.keyClass;
Class valueClass = this.valueClass;
Serializer keySerializer = this.keySerializer;
if (keyGenericType != null) {
keyClass = keyGenericType;
if (keySerializer == null) keySerializer = kryo.getSerializer(keyClass);
keyGenericType = null;
}
Serializer valueSerializer = this.valueSerializer;
if (valueGenericType != null) {
valueClass = valueGenericType;
if (valueSerializer == null) valueSerializer = kryo.getSerializer(valueClass);
valueGenericType = null;
}