package org.talend.dataprep.configuration;

import java.util.List;

import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import com.fasterxml.jackson.datatype.jsr310.JSR310Module;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.Module;

@Configuration
@SuppressWarnings("InsufficientBranchCoverage")
public class Serialization {

    @Autowired
    List<Module> modules;

    @Bean
    public Jackson2ObjectMapperBuilder jacksonBuilder() {
        Jackson2ObjectMapperBuilder builder = new Jackson2ObjectMapperBuilder();
        builder.featuresToDisable(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES);
        builder.indentOutput(false);
        // FIXME we should use jackson modules and remove home made LocalDateTimeModule
        //modules.add( new JavaTimeModule() );
        //modules.add( new Jdk8Module() );
        builder.modules(modules);
        return builder;
    }
}

@@ -65,183 +65,8 @@
 t;%0A%0A
-import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;%0Aimport com.fasterxml.jackson.datatype.jsr310.JSR310Module;%0Aimport com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;%0A
 impo
@@ -834,186 +834,8 @@
 e);%0A
-        // FIXME we should use jackson modules and remove home made LocalDateTimeModule%0A        //modules.add( new JavaTimeModule() );%0A        //modules.add( new Jdk8Module() );%0A
     

Clean up unused imports (was supposed to be done in branch).