<commit_before>package com.hubspot.mesos.client;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.inject.AbstractModule;
import com.google.inject.name.Names;
import com.hubspot.horizon.HttpClient;
import com.hubspot.horizon.HttpConfig;
import com.hubspot.horizon.ning.NingHttpClient;
import com.hubspot.mesos.JavaUtils;

public class SingularityMesosClientModule extends AbstractModule {

  @Override
  protected void configure() {
    ObjectMapper objectMapper = JavaUtils.newObjectMapper();
    HttpConfig httpConfig = HttpConfig.newBuilder().setObjectMapper(objectMapper).build();
    HttpClient httpClient = new NingHttpClient(httpConfig);

    bind(HttpClient.class).annotatedWith(Names.named(MesosClient.HTTP_CLIENT_NAME)).toInstance(httpClient);
  }

}<commit_msg>let people use this object mapper<commit_after>package com.hubspot.mesos.client;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.inject.AbstractModule;
import com.google.inject.name.Names;
import com.hubspot.horizon.HttpClient;
import com.hubspot.horizon.HttpConfig;
import com.hubspot.horizon.ning.NingHttpClient;
import com.hubspot.mesos.JavaUtils;

public class SingularityMesosClientModule extends AbstractModule {

  public static final String MESOS_CLIENT_OBJECT_MAPPER = "singularity.mesos.client.object.mapper";

  @Override
  protected void configure() {
    ObjectMapper objectMapper = JavaUtils.newObjectMapper();
    HttpConfig httpConfig = HttpConfig.newBuilder().setObjectMapper(objectMapper).build();
    HttpClient httpClient = new NingHttpClient(httpConfig);

    bind(ObjectMapper.class).annotatedWith(Names.named(MESOS_CLIENT_OBJECT_MAPPER)).toInstance(objectMapper);
    bind(HttpClient.class).annotatedWith(Names.named(MesosClient.HTTP_CLIENT_NAME)).toInstance(httpClient);
  }

}
{'fraction_non_alphanumeric': 0.09851403412217942, 'fraction_numerical': 0.0, 'mean_word_length': 6.606694560669456, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3756192', 'n_tokens_mistral': 550, 'n_tokens_neox': 536, 'n_words': 84}