private static boolean exhaustiveCompare(Object boundValue, Object candidate,
PropertyEditor editor, Map<PropertyEditor, Object> convertedValueCache) {
String candidateDisplayString = ValueFormatter.getDisplayString(candidate, editor, false);
if (boundValue instanceof LabeledEnum) {
LabeledEnum labeledEnum = (LabeledEnum) boundValue;
String enumCodeAsString = ObjectUtils.getDisplayString(labeledEnum.getCode());
if (enumCodeAsString.equals(candidateDisplayString)) {
return true;
}
String enumLabelAsString = ObjectUtils.getDisplayString(labeledEnum.getLabel());
if (enumLabelAsString.equals(candidateDisplayString)) {
return true;
}
}
else if (boundValue.getClass().isEnum()) {