Menu

#223 Support direct enum conversion

open
nobody
5
2014-08-20
2010-10-13
No

I have defined custom converters for some of my enums and it works fine when converting a bean that has these enums as attribute (Enum1 <-> Enum2).

But sometimes I want to convert a variable of type Enum1 to Enum2, so I tried:

Enum2 myEnumOfType2 = mapper.map(myEnumOfType1, Enum2.class);

But it fails with NoSuchMethodException Enum2.<init>

It would be a good improvement to support direct enum conversion.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB