From db755265c28d4aef3b6fca09e9d00dbd2c80c47d Mon Sep 17 00:00:00 2001 From: Szymon Apolinarski Date: Tue, 29 Aug 2023 16:58:47 +0200 Subject: [PATCH] check if paths patterns are note empty --- .../org/jenkinsci/plugins/sonargerrit/sonar/IssueFilter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jenkinsci/plugins/sonargerrit/sonar/IssueFilter.java b/src/main/java/org/jenkinsci/plugins/sonargerrit/sonar/IssueFilter.java index 194d1c0..77f20af 100644 --- a/src/main/java/org/jenkinsci/plugins/sonargerrit/sonar/IssueFilter.java +++ b/src/main/java/org/jenkinsci/plugins/sonargerrit/sonar/IssueFilter.java @@ -47,12 +47,12 @@ public Iterable filter() { } String includedPathsGlobPattern = filterConfig.getIncludedPathsGlobPattern(); - if (includedPathsGlobPattern != null) { + if (includedPathsGlobPattern != null && !includedPathsGlobPattern.isEmpty()) { toBeApplied.add(new ByGlobPatternPredicate(includedPathsGlobPattern)); } String excludedPathsGlobPattern = filterConfig.getExcludedPathsGlobPattern(); - if (excludedPathsGlobPattern != null) { + if (excludedPathsGlobPattern != null && !excludedPathsGlobPattern.isEmpty()) { toBeApplied.add(new ByGlobPatternPredicate(excludedPathsGlobPattern).negate()); }