From 21f09166805176e1de7fd2a7e0652107b89a2b28 Mon Sep 17 00:00:00 2001
From: Radheshhathwar <radheshhathwar.bh@gmail.com>
Date: Tue, 7 Nov 2023 15:01:30 +0530
Subject: [PATCH] Attendance null check changes

---
 .../examsAndAdmissions/service/DataImporterService.java      | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/tarento/upsmf/examsAndAdmissions/service/DataImporterService.java b/src/main/java/com/tarento/upsmf/examsAndAdmissions/service/DataImporterService.java
index 67d760a..2334d29 100644
--- a/src/main/java/com/tarento/upsmf/examsAndAdmissions/service/DataImporterService.java
+++ b/src/main/java/com/tarento/upsmf/examsAndAdmissions/service/DataImporterService.java
@@ -86,7 +86,7 @@ public class DataImporterService {
                                         String columnName = columnNames.get(columnIndex);
 
                                         try {
-                                            if (currentCell != null) { // Add this null check
+                                            if (currentCell != null) {
                                                 switch (currentCell.getCellType()) {
                                                     case STRING:
                                                         jsonObject.put(columnName, currentCell.getStringCellValue());
@@ -119,9 +119,10 @@ public class DataImporterService {
                         }
                         return null;
                     })
-                    .filter(Objects::nonNull) // Filter out rows with null values
+                    .filter(jsonObj -> jsonObj != null) // Filter out rows with null values
                     .collect(Collectors.collectingAndThen(Collectors.toList(), JSONArray::new));
 
+
             return jsonArray;
         }
     }
-- 
GitLab