From 11d21be6274da3ab50241d4b50c29a2cf6cf7da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Sat, 9 Jan 2021 13:11:10 +0100 Subject: [PATCH] Proba naprawienia MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcin Woźniak --- .../src/main/java/com/plannaplan/services/UsosApiService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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();