diff --git a/src/main/java/ru/ulstu/controller/IndexController.java b/src/main/java/ru/ulstu/controller/IndexController.java index 0bc59df..2a471dc 100644 --- a/src/main/java/ru/ulstu/controller/IndexController.java +++ b/src/main/java/ru/ulstu/controller/IndexController.java @@ -26,7 +26,6 @@ import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.time.format.DateTimeFormatter; import java.util.List; -import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.stream.Collectors; @@ -74,9 +73,10 @@ public class IndexController { ModelingResult modelingResult = timeSeriesService.getForecast(timeSeries, countForecastPoints); TimeSeries forecast = modelingResult.getTimeSeries(); TimeSeries testForecast = modelingResult.getTestForecast(); - Set dates = timeSeries.getValues().stream() + List dates = timeSeries.getValues().stream() .map(v -> v.getDate().format(DateTimeFormatter.ISO_DATE)) - .collect(Collectors.toSet()); + .distinct() + .collect(Collectors.toList()); dates.addAll(forecast.getValues().stream() .map(v -> v.getDate().format(DateTimeFormatter.ISO_DATE)) .collect(Collectors.toSet()));