vttranlina commented on code in PR #1707:
URL: https://github.com/apache/james-project/pull/1707#discussion_r1318063358
##########
server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/routes/UserQuotaRoutes.java:
##########
@@ -90,6 +98,16 @@ private static Optional<Integer> intQueryParameter(Request
request) {
"strictly positive optional integer", USERS_PER_SECOND),
e);
}
}
+
+ private static List<QuotaComponent> getQuotaComponent(Request request)
{
+ return
Optional.ofNullable(request.queryParamsValues(QUOTA_COMPONENT))
+ .map(quotaComponentStrings ->
Arrays.stream(quotaComponentStrings)
+ .map(quotaComponentString ->
Optional.ofNullable(QUOTA_COMPONENT_MAP.get(quotaComponentString))
Review Comment:
IMO we should ignore case when using Map for store component key,
`.toLowerCase` or `.toUpperCase` is fine
If not, we should update the document.
The example in document
`"aComponent=MAILBOX"aComponent=JMAP_UPLOADS` will not work
--
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]