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 class ObjectMapperTool {

  private final static ObjectMapper DEFAULT_MAPPER = new ObjectMapper();

  private final static 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);
  }

}

@@ -325,36 +325,36 @@
 %0A%0A  private 
-final 
 static
+ final
  ObjectMappe
@@ -407,20 +407,20 @@
 ate 
-final 
 static
+ final
  Obj

reorder modifiers for compliance