This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 0f9a0d973747e2b953e49736b50d20232f0768f0
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Tue Mar 22 11:06:34 2022 +0100

    (chores) camel-report-maven-plugin: simplify boolean evaluation in pattern 
matching
    
    Co-authored-by: Nicolas Filotto <[email protected]>
---
 .../src/main/java/org/apache/camel/maven/ValidateMojo.java           | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git 
a/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java
 
b/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java
index 457ab41..1f5c9ba 100644
--- 
a/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java
+++ 
b/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java
@@ -964,10 +964,7 @@ public class ValidateMojo extends AbstractExecMojo {
             exclude = exclude.trim();
             // try both with and without directory in the name
             String fqn = stripRootPath(asRelativeFile(file.getAbsolutePath()));
-            boolean match = PatternHelper.matchPattern(fqn, exclude) || 
PatternHelper.matchPattern(file.getName(), exclude);
-            if (match) {
-                return true;
-            }
+            return PatternHelper.matchPattern(fqn, exclude) || 
PatternHelper.matchPattern(file.getName(), exclude);
         }
         return false;
     }

Reply via email to