DATACOUCH-38 - Can't Deserialize Enum.
Enums, even although they are a simple type, must not use writeSimpleObject since there is no "handler" in writeSimpleObject for Enums. Instead, we just drop back to using the built-in ObjectMapper for handling enums. -=david=-
This commit is contained in:
committed by
Michael Nitschinger
parent
fa397759e3
commit
d1779a5d73
@@ -88,7 +88,7 @@ public class JacksonTranslationService implements TranslationService {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (simpleTypeHolder.isSimpleType(value.getClass())) {
|
||||
if (simpleTypeHolder.isSimpleType(value.getClass()) && !Enum.class.isAssignableFrom(value.getClass())) {
|
||||
generator.writeObject(value);
|
||||
} else {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
|
||||
Reference in New Issue
Block a user