diff --git a/server/src/main/java/mucsi96/traininglog/weight/WeightService.java b/server/src/main/java/mucsi96/traininglog/weight/WeightService.java index 297eb7f..e444496 100644 --- a/server/src/main/java/mucsi96/traininglog/weight/WeightService.java +++ b/server/src/main/java/mucsi96/traininglog/weight/WeightService.java @@ -30,7 +30,7 @@ public Optional getTodayWeight() { log.info("Getting today weight from {} to {}", startTime, endTime); List weights = weightRepository.findAllByCreatedAtBetween(startTime, endTime); Optional result = weights.stream().findFirst(); - log.info("Got {}", result.isPresent() ? result.get().getValue() : '?'); + log.info("Got {}", result.isPresent() ? result.get().getValue() : "null"); return result; } } diff --git a/server/src/main/java/mucsi96/traininglog/withings/WithingsService.java b/server/src/main/java/mucsi96/traininglog/withings/WithingsService.java index a87c254..8c3fd8d 100644 --- a/server/src/main/java/mucsi96/traininglog/withings/WithingsService.java +++ b/server/src/main/java/mucsi96/traininglog/withings/WithingsService.java @@ -90,7 +90,7 @@ private Optional getFirstMeasureValue(WithingsGetMeasureResponseBody mea public Optional getTodayWeight(OAuth2AuthorizedClient authorizedClient) { log.info("Getting today first weight measure"); Optional result = getFirstMeasureValue(getMeasure(authorizedClient)); - log.info("Got {}", result.isPresent() ? result.get().getValue() : '?'); + log.info("Got {}", result.isPresent() ? result.get().getValue() : "null"); return result; } }