Replace use of Spring's StringUtils

This commit is contained in:
Chris Beams 2019-12-18 07:52:52 +01:00
parent 658df7968e
commit 75ab51de1a
No known key found for this signature in database
GPG Key ID: 3D214F8F5BC5ED73

View File

@ -25,8 +25,6 @@ import com.google.common.collect.Sets;
import java.util.Set;
import static org.springframework.util.StringUtils.collectionToDelimitedString;
/**
* A {@link joptsimple.ValueConverter} that supports case-insensitive conversion from
* String to an enum label. Useful in conjunction with
@ -57,7 +55,7 @@ class EnumValueConverter implements ValueConverter<Enum> {
return result.get();
}
throw new IllegalArgumentException(String.format(
"No enum constant %s.[%s]", enumType.getName(), collectionToDelimitedString(candidates, "|")));
"No enum constant %s.{%s}", enumType.getSimpleName(), String.join("|", candidates)));
}
@Override