NullPointerException might be thrown
DCAEGEN2-114
Change-Id: I79d82683e71a913d4446f07fe41af2be7174e92b
Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
                FileInputStream fis = null;
 
                if (fileList == null)
-                       fileList = new ArrayList<File>();
+                       fileList = new ArrayList<>();
 
                // get all the files that are ".json" or ".properties", from a directory
                // & it's sub-directories
                                } catch (Exception ioe) {
                                        logger.error("Error reading the file stream ", ioe);
                                } finally {
-                                       fis.close();
+                                       if (fis != null) {
+                                               fis.close();
+                                       }
                                }
                        } else if (file.isDirectory()) {
                                getFileList(file.getPath());