diff --git a/org.springframework.core/src/main/java/org/springframework/core/convert/support/StringToEnumFactory.java b/org.springframework.core/src/main/java/org/springframework/core/convert/support/StringToEnumFactory.java index 8ab17c3465..7cf8993bbd 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/convert/support/StringToEnumFactory.java +++ b/org.springframework.core/src/main/java/org/springframework/core/convert/support/StringToEnumFactory.java @@ -19,7 +19,7 @@ public class StringToEnumFactory implements ConverterFactory { } public T convert(String source) throws Exception { - return Enum.valueOf(enumType, source); + return (T) Enum.valueOf(enumType, source); } }