Skip to content

Commit

Permalink
fix(connect): sort throw exception (#1431)
Browse files Browse the repository at this point in the history
Co-authored-by: alozano3 <[email protected]>
  • Loading branch information
alozano3 and alozano3 authored Apr 26, 2023
1 parent 014a2ad commit a89e65c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/akhq/models/ConnectPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public ConnectPlugin(ConnectorPlugin connectorPlugin, ConnectorPluginConfigValid
.map(config -> new Definition(config.getDefinition())),
registryDefinition()
)
.sorted(Comparator.comparing(Definition::getGroup, (s1, s2) -> s1.equals("Others") ? 1 : s1.compareTo(s2))
.sorted(Comparator.comparing(Definition::getGroup, Comparator.comparing((String s) -> s.equals("Others"))
.thenComparing(Comparator.naturalOrder()))
.thenComparing(Definition::getOrder)
)
.collect(Collectors.toList());
Expand Down

0 comments on commit a89e65c

Please sign in to comment.