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

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


The following commit(s) were added to refs/heads/main by this push:
     new cbbc95b  CAMEL-16599: Return null early if input is null to make 
analyze tooling happy in AntPathMatcher.
cbbc95b is described below

commit cbbc95b7cf1dcaad32b418df45f1b465d22046f3
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Tue May 11 09:59:33 2021 +0200

    CAMEL-16599: Return null early if input is null to make analyze tooling 
happy in AntPathMatcher.
---
 .../camel-util/src/main/java/org/apache/camel/util/AntPathMatcher.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/core/camel-util/src/main/java/org/apache/camel/util/AntPathMatcher.java 
b/core/camel-util/src/main/java/org/apache/camel/util/AntPathMatcher.java
index e879731..db0b43c 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/AntPathMatcher.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/AntPathMatcher.java
@@ -401,6 +401,9 @@ public class AntPathMatcher {
      * does <strong>not</strong> enforce this.
      */
     public String extractPathWithinPattern(String pattern, String path) {
+        if (path == null) {
+            return null;
+        }
         String[] patternParts = tokenizeToStringArray(pattern, 
this.pathSeparator);
         String[] pathParts = tokenizeToStringArray(path, this.pathSeparator);
 

Reply via email to