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

rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit b077e41d639f58f8d79bfb3420254e7fbf4eda0b
Author: Quan Tran <hqt...@linagora.com>
AuthorDate: Fri Nov 8 11:36:59 2024 +0700

    JAMES-4087 Allow chaining composite matcher for inverted matcher
    
    Inverted matcher should be able to chain composite matcher.
---
 server/apps/memory-app/src/test/resources/mailetcontainer.xml          | 3 +++
 .../apache/james/mailetcontainer/lib/AbstractStateMailetProcessor.java | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/server/apps/memory-app/src/test/resources/mailetcontainer.xml 
b/server/apps/memory-app/src/test/resources/mailetcontainer.xml
index dd129e44f6..567a497658 100644
--- a/server/apps/memory-app/src/test/resources/mailetcontainer.xml
+++ b/server/apps/memory-app/src/test/resources/mailetcontainer.xml
@@ -63,6 +63,9 @@
             <matcher name="chaining-matcher" 
match="org.apache.james.mailetcontainer.impl.matchers.Not">
                 <matcher match="relay-allowed"/>
             </matcher>
+            <matcher name="chaining-not-matcher" 
match="org.apache.james.mailetcontainer.impl.matchers.Not">
+                <matcher notmatch="relay-allowed"/>
+            </matcher>
             <mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
                 <name>X-UserIsAuth</name>
                 <value>true</value>
diff --git 
a/server/mailet/mailetcontainer-impl/src/main/java/org/apache/james/mailetcontainer/lib/AbstractStateMailetProcessor.java
 
b/server/mailet/mailetcontainer-impl/src/main/java/org/apache/james/mailetcontainer/lib/AbstractStateMailetProcessor.java
index 6dd4b7ae26..c4d8868297 100644
--- 
a/server/mailet/mailetcontainer-impl/src/main/java/org/apache/james/mailetcontainer/lib/AbstractStateMailetProcessor.java
+++ 
b/server/mailet/mailetcontainer-impl/src/main/java/org/apache/james/mailetcontainer/lib/AbstractStateMailetProcessor.java
@@ -242,7 +242,7 @@ public abstract class AbstractStateMailetProcessor 
implements MailProcessor, Con
                     }
                 }
             } else if (invertedMatcherName != null) {
-                Matcher m = 
matcherLoader.getMatcher(createMatcherConfig(invertedMatcherName));
+                Matcher m = loadMatcher(compMap, invertedMatcherName);
                 if (m instanceof CompositeMatcher) {
                     CompositeMatcher compMatcher = (CompositeMatcher) m;
 


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org

Reply via email to