diff options
author | Yan Yang <yangyanyj@chinamobile.com> | 2018-02-05 10:04:51 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-02-05 10:04:51 +0000 |
commit | dbaa794197f81dba6842ec50105df11d24d28ff8 (patch) | |
tree | 7464bec0c5f6de9216a41f9a8c3ddc59098efdaa | |
parent | cf8fd1a9da62f4f74bc8d4bfc7d79cc83b0cb252 (diff) | |
parent | f7674aae6c52b5c0f0eb5e921f8e23571fb3e97d (diff) |
Merge "sonar bug fix: might cause NPE"
-rw-r--r-- | ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java | 9 |
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); |