Filter the list of application file paths to remove those that match the regular expression defined by Host#getDeployIgnore(). @param unfilteredAppPaths The list of application paths to filter @return The filtered list of application paths
(String[] unfilteredAppPaths)
| 422 | * @return The filtered list of application paths |
| 423 | */ |
| 424 | protected String[] filterAppPaths(String[] unfilteredAppPaths) { |
| 425 | Pattern filter = host.getDeployIgnorePattern(); |
| 426 | if (filter == null || unfilteredAppPaths == null) { |
| 427 | return unfilteredAppPaths; |
| 428 | } |
| 429 | |
| 430 | List<String> filteredList = new ArrayList<>(); |
| 431 | Matcher matcher = null; |
| 432 | for (String appPath : unfilteredAppPaths) { |
| 433 | if (matcher == null) { |
| 434 | matcher = filter.matcher(appPath); |
| 435 | } else { |
| 436 | matcher.reset(appPath); |
| 437 | } |
| 438 | if (matcher.matches()) { |
| 439 | if (log.isDebugEnabled()) { |
| 440 | log.debug(sm.getString("hostConfig.ignorePath", appPath)); |
| 441 | } |
| 442 | } else { |
| 443 | filteredList.add(appPath); |
| 444 | } |
| 445 | } |
| 446 | return filteredList.toArray(new String[0]); |
| 447 | } |
| 448 | |
| 449 | |
| 450 | /** |
no test coverage detected