--- dao/FuldDaekningWorker/src/main/java/dk/daoas/fulddaekning/osrm/OSRMHelper.java 2015/10/08 14:27:54 2749 +++ dao/FuldDaekningWorker/src/main/java/dk/daoas/fulddaekning/osrm/OSRMHelper.java 2015/10/08 18:31:53 2750 @@ -1,25 +1,19 @@ package dk.daoas.fulddaekning.osrm; import java.io.IOException; -import java.util.ArrayList; import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.concurrent.Future; import java.util.logging.Level; import java.util.logging.Logger; +import net.minidev.json.JSONValue; + import org.apache.http.HttpEntity; -import org.apache.http.HttpHost; -import org.apache.http.HttpRequest; import org.apache.http.HttpResponse; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.ResponseHandler; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; -import org.apache.http.impl.nio.client.CloseableHttpPipeliningClient; -import org.apache.http.impl.nio.client.HttpAsyncClients; import org.apache.http.util.EntityUtils; import com.google.gson.Gson; @@ -73,7 +67,8 @@ try { String txtResponse = HttpUtil.getContentString(sb.toString(), 500, "UTF-8"); - OSRMDistanceTable table = gson.fromJson(txtResponse, OSRMDistanceTable.class); + //OSRMDistanceTable table = gson.fromJson(txtResponse, OSRMDistanceTable.class); + OSRMDistanceTable table = JSONValue.parse(txtResponse, OSRMDistanceTable.class); if (table.status != 0) { logger.info("OSRM failed with message: " + table.status_message); return null;