summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorSoumendu Sekhar Acharya <sa00498080@techmahindra.com>2017-12-11 15:26:33 +0530
committerSoumendu Sekhar Acharya <sa00498080@techmahindra.com>2017-12-11 15:27:08 +0530
commit8c6be7c0fef13152716bf34096f5df5da7d77cc2 (patch)
treeacf0d146f846a1d50122c50d27357981f379d9e9 /src/main/java
parent14d24349af42f48579900a45def6ba1672f973ea (diff)
sonar blocker for NullPointerException
NullPointerException might be thrown as 'filePath' is nullable Sonar Link: https://sonar.onap.org/component_issues/index?id=org.onap.dmaap.messagerouter.messageservice%3AdmaapMR1#resolved=false|severities=BLOCKER|assignees=soumendu Location: src/main/java/com/att/nsa/dmaap/service/MMRestService.java Line No-65 Change-Id: I042592bee40553f262baf5861ef61e8404f45a80 Issue-ID: DMAAP-184 Signed-off-by: Soumendu Sekhar Acharya <sa00498080@techmahindra.com>
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/att/nsa/dmaap/filemonitor/ServicePropertiesMap.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/com/att/nsa/dmaap/filemonitor/ServicePropertiesMap.java b/src/main/java/com/att/nsa/dmaap/filemonitor/ServicePropertiesMap.java
index 0f7744c..7f12696 100644
--- a/src/main/java/com/att/nsa/dmaap/filemonitor/ServicePropertiesMap.java
+++ b/src/main/java/com/att/nsa/dmaap/filemonitor/ServicePropertiesMap.java
@@ -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");