diff --git a/src/main/java/ru/ulstu/service/TimeSeriesService.java b/src/main/java/ru/ulstu/service/TimeSeriesService.java index e9bf4b0..d7b4920 100644 --- a/src/main/java/ru/ulstu/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/service/TimeSeriesService.java @@ -45,7 +45,11 @@ public class TimeSeriesService { } public List getGroupedTendencies(List timeSeriesList) { - return timeSeriesList.stream().map(this::getGroupedTendencies).collect(Collectors.toList()); + return timeSeriesList + .stream() + .filter(ts -> ts.getValues() != null && ts.getLength() > 5) + .map(this::getGroupedTendencies) + .collect(Collectors.toList()); } public TimeSeries getGroupedTendencies(TimeSeries timeSeries) {