chibenwa commented on a change in pull request #803:
URL: https://github.com/apache/james-project/pull/803#discussion_r772214594
##########
File path:
server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/draft/JMAPModule.java
##########
@@ -207,7 +207,7 @@ JMAPDraftConfiguration
provideDraftConfiguration(PropertiesProvider propertiesPr
.keystoreType(configuration.getString("tls.keystoreType",
null))
.secret(configuration.getString("tls.secret", null))
.jwtPublicKeyPem(loadPublicKey(fileSystem,
ImmutableList.copyOf(configuration.getStringArray("jwt.publickeypem.url"))))
-
.authenticationStrategies(Optional.ofNullable(configuration.getList(String.class,
"authentication.strategy.draft", null)))
+
.authenticationStrategies(Optional.ofNullable(ImmutableList.copyOf(configuration.getStringArray("authentication.strategy.draft"))))
Review comment:
Maybe not, as it handled the not present case.
I think:
```
Optional.ofNullable(configuration.getStringArray("authentication.strategy.draft")).map(ImmutableList::copyOf)
```
is better as it preserves nullity.
Also this shows we can benefit from unit tests on this conf parsing. You can
get a look at what was done for `WebAdminConfiguration`.
--
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]