diff --git a/src/org/kar/archidata/tools/RESTApi.java b/src/org/kar/archidata/tools/RESTApi.java index 11d4e25..b8b3401 100644 --- a/src/org/kar/archidata/tools/RESTApi.java +++ b/src/org/kar/archidata/tools/RESTApi.java @@ -16,7 +16,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.exc.MismatchedInputException; @@ -56,7 +55,9 @@ public class RESTApi { "Fail to get the data [" + httpResponse.statusCode() + "] " + httpResponse.body()); } } - return this.mapper.readValue(httpResponse.body(), new TypeReference>() {}); + //return this.mapper.readValue(httpResponse.body(), new TypeReference>() {}); + return this.mapper.readValue(httpResponse.body(), + this.mapper.getTypeFactory().constructCollectionType(List.class, clazz)); } public T get(final Class clazz, final String urlOffset)