Replaced TypeReference with JavaType, avoid creation of temporary files