diff options
-rw-r--r-- | ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java | 11 |
1 files changed, 9 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 d250378..44a31d8 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 @@ -979,11 +979,18 @@ public class TaskThread implements Runnable{ pattern = Pattern.compile(ftpRegular, Pattern.CASE_INSENSITIVE); } catch (Exception e) { log.info("["+ftpRegular+"]Pattern.compile exception:"+e.getMessage()); + //should rethrow exception or return from here } int hisSize = fileContainer.size(); for (int j=0; arfs!=null&&j<arfs.length; j++) { String fileName = parseFileName(arfs[j].getFileName()); - Matcher matcher = pattern.matcher(fileName); + Matcher matcher=null; + if(pattern!=null) + matcher = pattern.matcher(fileName); + else{ + //define the flow when pattern is null + } + if (matcher.find()) fileContainer.add(arfs[j]); } @@ -1062,4 +1069,4 @@ public class TaskThread implements Runnable{ return regularList; } -}
\ No newline at end of file +} |