summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYan Yang <yangyanyj@chinamobile.com>2018-02-05 10:04:51 +0000
committerGerrit Code Review <gerrit@onap.org>2018-02-05 10:04:51 +0000
commitdbaa794197f81dba6842ec50105df11d24d28ff8 (patch)
tree7464bec0c5f6de9216a41f9a8c3ddc59098efdaa
parentcf8fd1a9da62f4f74bc8d4bfc7d79cc83b0cb252 (diff)
parentf7674aae6c52b5c0f0eb5e921f8e23571fb3e97d (diff)
Merge "sonar bug fix: might cause NPE"
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java
index d764bf6..9f2824b 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java
@@ -1010,8 +1010,13 @@ public class TaskThread implements Runnable {
log.error("[" + regular + "]compile fails:" + e.getMessage());
e.printStackTrace();
}
-
- Matcher matcher = lpattern.matcher(regular);
+ Matcher matcher=null;
+ if(lpattern!=null)
+ matcher = lpattern.matcher(regular);
+ else{
+ //define flow in case lpattern is null
+ }
+
if (matcher.find()) {
isregular = true;
String parpath = matcher.group(1);