Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1177#discussion_r51105914
  
    --- Diff: 
brooklyn-server/rest/rest-server/src/main/java/org/apache/brooklyn/rest/util/json/BrooklynJacksonJsonProvider.java
 ---
    @@ -137,25 +136,21 @@ public static ObjectMapper 
newPrivateObjectMapper(ManagementContext mgmt) {
                 throw new IllegalStateException("No management context 
available for creating ObjectMapper");
             }
     
    -        SerializationConfig defaultConfig = new 
ObjectMapper().getSerializationConfig();
    -        SerializationConfig sc = new SerializationConfig(
    -            defaultConfig.getClassIntrospector() /* 
ObjectMapper.DEFAULT_INTROSPECTOR */,
    -            defaultConfig.getAnnotationIntrospector() /* 
ObjectMapper.DEFAULT_ANNOTATION_INTROSPECTOR */,
    -            new PossiblyStrictPreferringFieldsVisibilityChecker(),
    -            null, null, TypeFactory.defaultInstance(), null);
    -
             ConfigurableSerializerProvider sp = new 
ConfigurableSerializerProvider();
             sp.setUnknownTypeSerializer(new 
ErrorAndToStringUnknownTypeSerializer());
     
    -        ObjectMapper mapper = new ObjectMapper(null, sp, null, sc, null);
    +        ObjectMapper mapper = new ObjectMapper();
    +        mapper.setSerializerProvider(sp);
    +        mapper.setVisibility(new 
PossiblyStrictPreferringFieldsVisibilityChecker());
    --- End diff --
    
    nice, looks like the cleaned up the API for accessing this


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to