From 411f6ca38c03f89f8c0c72e0612fab8fbca2dd45 Mon Sep 17 00:00:00 2001 From: Nathan Cannon Date: Tue, 18 Sep 2018 09:03:27 +0100 Subject: [PATCH] Fixed variable declaration. --- .../Observations/api/AverageStatsChartJs.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/backend/src/main/java/uk/co/neviyn/Observations/api/AverageStatsChartJs.java b/backend/src/main/java/uk/co/neviyn/Observations/api/AverageStatsChartJs.java index 5f49cbc..2ff320e 100644 --- a/backend/src/main/java/uk/co/neviyn/Observations/api/AverageStatsChartJs.java +++ b/backend/src/main/java/uk/co/neviyn/Observations/api/AverageStatsChartJs.java @@ -4,27 +4,29 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.ArrayList; import java.util.List; import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NonNull; /** * AverageStats in a format easily readable by Chart.js */ +@Data public class AverageStatsChartJs { @NonNull @JsonProperty - private List labels = new ArrayList(); + private List labels = new ArrayList<>(); @NonNull @JsonProperty - List datasets = new ArrayList(); + private List datasets = new ArrayList<>(); public AverageStatsChartJs(List inputData){ - List monitoring = new ArrayList(), - control = new ArrayList(), - conservatism = new ArrayList(), - teamwork = new ArrayList(), - knowledge = new ArrayList(); + List monitoring = new ArrayList<>(), + control = new ArrayList<>(), + conservatism = new ArrayList<>(), + teamwork = new ArrayList<>(), + knowledge = new ArrayList<>(); for(AverageStats averageStats: inputData){ labels.add(averageStats.getDate().toString()); monitoring.add(averageStats.getMonitoring());