diff --git a/buisnesslogic/src/main/java/com/plannaplan/services/UsosApiService.java b/buisnesslogic/src/main/java/com/plannaplan/services/UsosApiService.java index 17b3c70..d856383 100755 --- a/buisnesslogic/src/main/java/com/plannaplan/services/UsosApiService.java +++ b/buisnesslogic/src/main/java/com/plannaplan/services/UsosApiService.java @@ -3,7 +3,6 @@ package com.plannaplan.services; import java.io.IOException; import java.util.Map; import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.core.type.TypeReference; @@ -60,6 +59,7 @@ public class UsosApiService { try (Response response = service.execute(request)) { System.out.println("TRY"); final String json = response.getBody(); + if (json != null){ System.out.println(json); System.out.println("Przed Object"); final ObjectMapper mapper = new ObjectMapper(); @@ -72,6 +72,7 @@ public class UsosApiService { System.out.println(map.get(NAME_FIELD)); apiResponse.setSurname(map.get(SURNAME_FIELD)); System.out.println(map.get(SURNAME_FIELD)); + } } } catch (IOException | InterruptedException | ExecutionException e) { e.printStackTrace();