chibenwa commented on code in PR #2448:
URL: https://github.com/apache/james-project/pull/2448#discussion_r1798891169
##########
server/mailet/integration-testing/src/main/java/org/apache/james/mailets/configuration/SmtpConfiguration.java:
##########
@@ -155,7 +174,17 @@ public String serializeAsXml() throws IOException {
scopes.put("verifyIdentity", verifyIndentity.toString());
scopes.put("maxmessagesize", maxMessageSize);
scopes.put("bracketEnforcement", bracketEnforcement);
- scopes.put("hooks", addittionalHooks);
+
+ List<Map<String, Object>> additionalHooksWithConfig =
additionalHooks.stream()
+ .map(hook -> {
+ Map<String, Object> hookScope = new HashMap<>();
+ hookScope.put("hookFqcn", hook.hookFqcn);
+ hookScope.put("hookConfigAsXML",
hook.hookConfig.entrySet());
+ return hookScope;
+ })
Review Comment:
Could we extract this as a method of `HookConfigurationEntry` so that we
could just write `.map(HookConfigurationEntry::asMustacheScopes)` ?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]