vttranlina commented on a change in pull request #518:
URL: https://github.com/apache/james-project/pull/518#discussion_r662680021



##########
File path: 
server/protocols/jmap/src/main/java/org/apache/james/jmap/VersionParser.java
##########
@@ -47,37 +52,34 @@ public VersionParser(Set<Version> supportedVersions, 
JMAPConfiguration jmapConfi
         
Preconditions.checkArgument(supportedVersions.contains(jmapConfiguration.getDefaultVersion()),
                 "%s is not a supported JMAP version", jmapConfiguration);
 
-        this.supportedVersions = supportedVersions;
+        this.supportedVersions = supportedVersions.stream()
+            .collect(Guavate.toImmutableMap(version -> 
version.asString().toLowerCase(Locale.US)));

Review comment:
       Why we convert Set to Map, and key still is `version.asString`?
   is it only makes sense when `Version` object has more than one property?




-- 
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]

Reply via email to