sonar blocker for NullPointerException
[dmaap/messagerouter/messageservice.git] / src / main / java / com / att / nsa / dmaap / filemonitor / ServicePropertiesMap.java
index 0f7744c..7f12696 100644 (file)
@@ -62,6 +62,7 @@ public class ServicePropertiesMap
                                filePath = file.getPath();
                        }
                        
+                       if(filePath != null) {
                        if(filePath.lastIndexOf(".json")>0){
                                
                                ObjectMapper om = new ObjectMapper();
@@ -89,6 +90,7 @@ public class ServicePropertiesMap
                                
                                mapOfMaps.put(file.getName(), propMap);
                        }
+                       }
 
                        logger.info("File - " + file.getName() + " is loaded into the map and the "
                                        + "corresponding system properties have been refreshed");