code: @Override
      public ObjectWriter modify(final EndpointConfigBase<?> endpoint,
                                 final MultivaluedMap<String, Object> responseHeaders,
                                 final Object valueToWrite,
                                 final ObjectWriter w,
                                 final JsonGenerator g) throws IOException {
          final ObjectWriter writer = original == null ? w : original.modify(endpoint, responseHeaders, valueToWrite, w, g);
          final FilterProvider customFilterProvider = writer.getConfig().getFilterProvider();
  
          // Try the custom (user) filter provider first.
          return customFilterProvider == null
                  ? writer.with(filterProvider)
                  : writer.with(new FilterProvider() {
              @Override
              public BeanPropertyFilter findFilter(final Object filterId) {
                  return customFilterProvider.findFilter(filterId);
              }
  
              @Override
              public PropertyFilter findPropertyFilter(final Object filterId, final Object valueToFilter) {
                  final PropertyFilter filter = customFilterProvider.findPropertyFilter(filterId, valueToFilter);
                  if (filter != null) {
                      return filter;
                  }
  
                  return filterProvider.findPropertyFilter(filterId, valueToFilter);
              }
          });
      }
docs: {@inheritDoc}