File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/test/java/com/fasterxml/jackson/databind/deser/enums Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ enum MixinOverloadedDefault {
7979 A ,
8080 @ JsonEnumDefaultValue
8181 B ,
82- @ JsonEnumDefaultValue
82+ // Let's leave one un-annotated:
8383 C ,
8484 @ JsonEnumDefaultValue
8585 Z ;
@@ -305,7 +305,9 @@ public void testFirstEnumDefaultValueViaMixin() throws Exception
305305 .enable (DeserializationFeature .READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE )
306306 .addMixIn (BaseOverloaded .class , MixinOverloadedDefault .class )
307307 .build ();
308-
308+
309+ // While not guaranteed by annotation Javadocs, default implementation does
310+ // pick the first annotated enum value (in declaration order))
309311 assertEquals (BaseOverloaded .A ,
310312 mixinMapper .readValue (q ("UNKNOWN" ), BaseOverloaded .class ));
311313 }
You can’t perform that action at this time.
0 commit comments