Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
tolkonepiu committed Sep 27, 2016
1 parent 732bd64 commit 5bbe708
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,7 @@ protected Object deserializeEnumUsingPropertyBased(final JsonParser p, final Des

SettableBeanProperty creatorProp = creator.findCreatorProperty(propName);
if (creatorProp != null) {
if (buffer.assignParameter(creatorProp, _deserializeWithErrorWrapping(p, ctxt, creatorProp))) {
p.nextToken(); // to move to next field name
}
buffer.assignParameter(creatorProp, _deserializeWithErrorWrapping(p, ctxt, creatorProp));
continue;
}
if (buffer.readIdProperty(propName)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,12 @@ public void testMultiArgEnumCreator() throws Exception
{
Enum929 v = MAPPER.readValue("{\"id\":3,\"name\":\"B\"}", Enum929.class);
assertEquals(Enum929.B, v);
EnumSet<Enum929> valueEnumSet = MAPPER.readValue("[{\"id\":3,\"name\":\"B\"}, {\"id\":3,\"name\":\"A\"}]",
new TypeReference<EnumSet<Enum929>>() {});
assertTrue(valueEnumSet.contains(v));
List<Enum929> valueList = MAPPER.readValue("[{\"id\":3,\"name\":\"B\"}, {\"id\":3,\"name\":\"A\"}, {\"id\":3,\"name\":\"B\"}]",
new TypeReference<List<Enum929>>() {});
assertTrue(valueList.contains(v));
}

// for [databind#960]
Expand Down

0 comments on commit 5bbe708

Please sign in to comment.