File tree 1 file changed +5
-12
lines changed
src/test/java/com/fasterxml/jackson/databind/ser/filter
1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -105,17 +105,10 @@ public DefaultIntBean(int i1, Integer i2) {
105
105
}
106
106
}
107
107
108
+ // [databind#4741]
108
109
@ JsonInclude (JsonInclude .Include .NON_DEFAULT )
109
110
static class NonDefaultBean4741 {
110
- private String value = null ;
111
-
112
- public String getValue () {
113
- return value ;
114
- }
115
-
116
- public void setValue (String value ) {
117
- this .value = value ;
118
- }
111
+ public String value = null ;
119
112
}
120
113
121
114
static class NonEmptyString {
@@ -347,12 +340,12 @@ public void testIssue1351() throws Exception
347
340
}
348
341
349
342
// [databind#4741]
343
+ @ Test
350
344
public void testSerialization4741 () throws Exception
351
345
{
352
- ObjectMapper mapper = new ObjectMapper ();
353
346
NonDefaultBean4741 bean = new NonDefaultBean4741 ();
354
- bean .setValue ( "" ) ;
355
- assertEquals (a2q ("{'value':''}" ), mapper .writeValueAsString (bean ));
347
+ bean .value = "" ;
348
+ assertEquals (a2q ("{'value':''}" ), MAPPER .writeValueAsString (bean ));
356
349
}
357
350
358
351
// [databind#1550]
You can’t perform that action at this time.
0 commit comments