<commit_before>package org.folio.rest.tools.utils;

import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.module.SimpleModule;

/**
 * @author shale
 *
 */
public final class ObjectMapperTool {
  private ObjectMapperTool() {
    throw new UnsupportedOperationException("Cannot instantiate utility class.");
  }

  private static final ObjectMapper DEFAULT_MAPPER = new ObjectMapper();

  private static final ObjectMapper MAPPER = new ObjectMapper();

  static {
    DEFAULT_MAPPER.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
    MAPPER.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
  }

  public static ObjectMapper getDefaultMapper() {
    return DEFAULT_MAPPER;
  }

  public static ObjectMapper getMapper() {
    return MAPPER;
  }

  public static <M, D extends JsonDeserializer<M>> void registerDeserializer(Class<M> clazz, D deserializer) {
    SimpleModule module = new SimpleModule();
    module.addDeserializer(clazz, deserializer);
    MAPPER.registerModule(module);
  }

}<commit_msg>Fix checkstyle issue<commit_after>package org.folio.rest.tools.utils;

import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.module.SimpleModule;

/**
 * @author shale
 *
 */
public final class ObjectMapperTool {
  private static final ObjectMapper DEFAULT_MAPPER = new ObjectMapper();

  private static final ObjectMapper MAPPER = new ObjectMapper();

  static {
    DEFAULT_MAPPER.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
    MAPPER.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
  }

  private ObjectMapperTool() {
    throw new UnsupportedOperationException("Cannot instantiate utility class.");
  }

  public static ObjectMapper getDefaultMapper() {
    return DEFAULT_MAPPER;
  }

  public static ObjectMapper getMapper() {
    return MAPPER;
  }

  public static <M, D extends JsonDeserializer<M>> void registerDeserializer(Class<M> clazz, D deserializer) {
    SimpleModule module = new SimpleModule();
    module.addDeserializer(clazz, deserializer);
    MAPPER.registerModule(module);
  }

}
{'fraction_non_alphanumeric': 0.08881441139505655, 'fraction_numerical': 0.0, 'mean_word_length': 5.267716535433071, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, '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': '534578', 'n_tokens_mistral': 722, 'n_tokens_neox': 664, 'n_words': 148}