This repository was archived by the owner on Jan 22, 2019. It is now read-only.

Description
package com.fasterxml.jackson.dataformat.csv;
....
public class CsvFactory extends JsonFactory{
.....
// Yes; CSV is positional
@Override
public boolean requiresPropertyOrdering() {
return true;
}
....
}
Because of this code AlphanumericSort is set twice. In ObjectMapper
public ObjectMapper(JsonFactory jf,
DefaultSerializerProvider sp, DefaultDeserializationContext dc)
{
....
final boolean needOrder = _jsonFactory.requiresPropertyOrdering();
if (needOrder ^ _serializationConfig.isEnabled(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY)) {
configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, needOrder);
}
....
}
and in CsvMapper
public CsvMapper(CsvFactory f)
{
super(f);
// As per #11: default to alphabetic ordering
enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY);
}
so it's impossible to turn it off. Probably SORT must be applied once or made pluggable.