File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/main/java/graphql/servlet Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11package graphql .servlet ;
22
3+ import com .fasterxml .jackson .annotation .JsonInclude ;
34import com .fasterxml .jackson .core .JsonProcessingException ;
45import com .fasterxml .jackson .core .type .TypeReference ;
56import com .fasterxml .jackson .databind .MappingIterator ;
@@ -43,8 +44,10 @@ public ObjectMapper getJacksonMapper() {
4344 if (result == null ) { // First check (no locking)
4445 synchronized (this ) {
4546 result = mapper ;
46- if (result == null ) // Second check (with locking)
47- mapper = result = objectMapperProvider .provide ();
47+ if (result == null ) { // Second check (with locking)
48+ mapper = result = objectMapperProvider .provide ().copy ();
49+ mapper .setDefaultPropertyInclusion (JsonInclude .Include .ALWAYS );
50+ }
4851 }
4952 }
5053
You can’t perform that action at this time.
0 commit comments