Description
I updated from 1.7 to 1.8 which breaks retrieving a value from CSVRecord using an Enum.
It is caused by this piece of code:
public String get(final Enum<?> e) { return get(Objects.toString(e, null)); }
This now uses Enum.toString() instead of Enum.name(). This works so long as the toString() method of the enum class has not been overridden. However, whereas Enum.name() is final and returns the correct value for this use case, toString() may be overridden to provide a human friendly desciption of the enum value.
If the toString() method of the enum class is non-default, this results in
java.lang.IllegalArgumentException: Mapping for [toString value] not found, expected one of [enum names]
Please change this method to use the enum name instead of toString.