chibenwa commented on code in PR #2494:
URL: https://github.com/apache/james-project/pull/2494#discussion_r1834024459


##########
server/mailet/mailetcontainer-impl/src/main/java/org/apache/james/mailetcontainer/lib/AbstractStateMailetProcessor.java:
##########
@@ -343,6 +336,18 @@ private void parseConfiguration() throws 
MessagingException, ConfigurationExcept
         }
     }
 
+    private Matcher loadMatcher(Map<String, Matcher> compositeMatchers, String 
matcherName) throws MessagingException {
+        Matcher matcher;
+        // try to load from compositeMatchers first
+        matcher = compositeMatchers.get(matcherName);
+        if (matcher == null) {
+            // no composite Matcher found, try to load it via
+            // MatcherLoader
+            matcher = 
matcherLoader.getMatcher(createMatcherConfig(matcherName));
+        }
+        return matcher;

Review Comment:
   Use optional and avoid variable allocation?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to