You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/08/26 20:25:34 UTC

[GitHub] [ignite] NSAmelchev commented on a change in pull request #8187: IGNITE-13218 fixed. importComparator added to TreeSet to provide core…

NSAmelchev commented on a change in pull request #8187:
URL: https://github.com/apache/ignite/pull/8187#discussion_r477568033



##########
File path: modules/codegen/src/main/java/org/apache/ignite/codegen/SystemViewRowAttributeWalkerGenerator.java
##########
@@ -148,7 +148,8 @@ public static void main(String[] args) throws Exception {
      */
     private <T> Collection<String> generate(Class<T> clazz) {
         final List<String> code = new ArrayList<>();
-        final Set<String> imports = new TreeSet<>();
+        Comparator<String> importComparatror = (s1, s2) -> s1.replace(";","").compareTo(s2.replace(";",""));

Review comment:
       @aleksey-kurinov There is typo in the var name. There is no white space between parameters. (See [CodingGuidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines))
   
   I suggest to pass comparator to the constructor parameter:
   `new TreeSet<>(Comparator.comparing(s -> s.replace(";", "")))`




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

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