From 5678e50606a9a6106626462789c9e54b82c2c313 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Mon, 18 Apr 2022 13:11:18 +0400 Subject: [PATCH] #1 -- fix npe --- src/main/java/ru/ulstu/controller/IndexController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/ru/ulstu/controller/IndexController.java b/src/main/java/ru/ulstu/controller/IndexController.java index f749ca9..86389b2 100644 --- a/src/main/java/ru/ulstu/controller/IndexController.java +++ b/src/main/java/ru/ulstu/controller/IndexController.java @@ -73,7 +73,8 @@ public class IndexController { if (chartForm.getTimeSeriesMeta() != null && chartForm.getTimeSeriesMeta().getKey() != null && !chartForm.getTimeSeriesMeta().getKey().isEmpty() - && chartForm.getMethodClassName() != null) { + && chartForm.getMethodClassName() != null + && !chartForm.getMethodClassName().equals("")) { addChartToModel(dbService.getTimeSeries(chartForm.getSet(), chartForm.getTimeSeriesMeta().getKey()), chartForm.getMethodClassName(), model); } return "method";