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 982b353853293fbdb7ad39e61b0dcef2bb89d3bd Author: Quan Tran <hqt...@linagora.com> AuthorDate: Fri Nov 8 11:56:28 2024 +0700 JAMES-4087 Mailet should be able to use composite matcher as inverted matcher Mailet only loads inverted matcher using class loading before... --- server/apps/memory-app/src/test/resources/mailetcontainer.xml | 1 + .../apache/james/mailetcontainer/lib/AbstractStateMailetProcessor.java | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/apps/memory-app/src/test/resources/mailetcontainer.xml b/server/apps/memory-app/src/test/resources/mailetcontainer.xml index 567a497658..2c7ef83832 100644 --- a/server/apps/memory-app/src/test/resources/mailetcontainer.xml +++ b/server/apps/memory-app/src/test/resources/mailetcontainer.xml @@ -66,6 +66,7 @@ <matcher name="chaining-not-matcher" match="org.apache.james.mailetcontainer.impl.matchers.Not"> <matcher notmatch="relay-allowed"/> </matcher> + <mailet notmatch="chaining-not-matcher" class="org.apache.james.transport.mailets.debug.Counter"/> <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 c4d8868297..5455bbf903 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 @@ -297,8 +297,7 @@ public abstract class AbstractStateMailetProcessor implements MailProcessor, Con } else if (matcherName != null) { matcher = loadMatcher(compositeMatchers, matcherName); } else if (invertedMatcherName != null) { - // no composite Matcher found, try to load it via MatcherLoader - matcher = matcherLoader.getMatcher(createMatcherConfig(invertedMatcherName)); + matcher = loadMatcher(compositeMatchers, invertedMatcherName); matcher = new MatcherInverter(matcher); } else { --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For additional commands, e-mail: notifications-h...@james.apache.org