Skip to content

Commit

Permalink
test issue 4741
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Oct 9, 2024
1 parent b6da0d5 commit 1519b0a
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ public DefaultIntBean(int i1, Integer i2) {
}
}

@JsonInclude(JsonInclude.Include.NON_DEFAULT)
static class NonDefaultBean4741 {
private String value = null;

public String getValue() {
return value;
}
}

static class NonEmptyString {
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public String value;
Expand Down Expand Up @@ -318,6 +327,14 @@ public void testIssue1351() throws Exception
mapper.writeValueAsString(new Issue1351NonBean(0)));
}

// [databind#4741]
public void testSerialization4741() throws Exception
{
ObjectMapper mapper = new ObjectMapper();
NonDefaultBean4741 bean = new NonDefaultBean4741();
assertEquals("{}", mapper.writeValueAsString(bean));
}

// [databind#1550]
public void testInclusionOfDate() throws Exception
{
Expand Down

0 comments on commit 1519b0a

Please sign in to comment.