You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2021/07/02 01:33:27 UTC

[GitHub] [james-project] vttranlina commented on a change in pull request #518: [PERFORMANCE] Another round of minor performance enhancements

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: notifications-unsubscribe@james.apache.org

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



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