File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
src/test/java/tools/jackson/failing Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 88import com .fasterxml .jackson .annotation .JsonCreator ;
99import com .fasterxml .jackson .annotation .JsonProperty ;
1010
11+ import tools .jackson .databind .MapperFeature ;
1112import tools .jackson .databind .ObjectMapper ;
1213import tools .jackson .databind .testutil .DatabindTestUtil ;
1314
15+ import static org .junit .jupiter .api .Assertions .assertNotNull ;
16+
17+ // 04-Sep-2024, tatu: No longer fails for 3.0? Due to default settings
18+ // change?
1419class SetterlessList2692Test extends DatabindTestUtil {
1520 static class DataBean {
1621
@@ -38,11 +43,11 @@ public String toString() {
3843
3944 @ Test
4045 void issue2692 () throws Exception {
41- ObjectMapper om = newJsonMapper ();
42- String json ;
43- DataBean out ;
44- json = "{\" list\" :[\" 11\" ],\" val\" :\" VAL2\" }" ;
45- out = om .readerFor (DataBean .class ).readValue (json );
46- System . out . println ( "this is ko" + out );
46+ ObjectMapper om = jsonMapperBuilder ()
47+ . enable ( MapperFeature . USE_GETTERS_AS_SETTERS )
48+ . build () ;
49+ String json = "{\" list\" :[\" 11\" ],\" val\" :\" VAL2\" }" ;
50+ DataBean out = om .readerFor (DataBean .class ).readValue (json );
51+ assertNotNull ( out );
4752 }
4853}
You can’t perform that action at this time.
0 commit comments