|
|
@ -20,15 +20,11 @@ import com.google.gson.reflect.TypeToken; |
|
|
|
import com.jayway.jsonpath.Configuration; |
|
|
|
import com.jayway.jsonpath.Configuration; |
|
|
|
import com.jayway.jsonpath.JsonPathException; |
|
|
|
import com.jayway.jsonpath.JsonPathException; |
|
|
|
import com.jayway.jsonpath.TypeRef; |
|
|
|
import com.jayway.jsonpath.TypeRef; |
|
|
|
import org.slf4j.Logger; |
|
|
|
|
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.concurrent.Callable; |
|
|
|
import java.util.concurrent.Callable; |
|
|
|
|
|
|
|
|
|
|
|
public class GsonMappingProvider implements MappingProvider { |
|
|
|
public class GsonMappingProvider implements MappingProvider { |
|
|
|
|
|
|
|
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(GsonMappingProvider.class); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final Callable<Gson> factory; |
|
|
|
private final Callable<Gson> factory; |
|
|
|
|
|
|
|
|
|
|
|
public GsonMappingProvider(final Gson gson) { |
|
|
|
public GsonMappingProvider(final Gson gson) { |
|
|
@ -55,7 +51,6 @@ public class GsonMappingProvider implements MappingProvider { |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
} catch (ClassNotFoundException e) { |
|
|
|
} catch (ClassNotFoundException e) { |
|
|
|
logger.error("Gson not found on class path. No converters configured."); |
|
|
|
|
|
|
|
throw new JsonPathException("Gson not found on path", e); |
|
|
|
throw new JsonPathException("Gson not found on path", e); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|