Skip to content

Commit

Permalink
mid-9077 sorting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Sep 28, 2023
1 parent 0fc75a4 commit 5c8aabb
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,16 @@ public List<String> collectAvailableDefinitions(String input, ResourceObjectType
ItemDefinition<?> superDef = focusDef.findItemDefinition(ItemPath.create(superPath.split("/")));
if (superDef != null && superDef instanceof PrismContainerDefinition) {
collectItems(((PrismContainerDefinition) superDef).getDefinitions(), suffix, toSelect, true);
return toSelect.stream().map(subPath -> superPath + "/" + subPath).collect(Collectors.toList());
return toSelect
.stream()
.map(subPath -> superPath + "/" + subPath)
.sorted()
.toList();
}
} else {
collectItems(focusDef.getDefinitions(), input, toSelect, true);
}
return toSelect;
return toSelect.stream().sorted().toList();
}

public List<String> collectAvailableDefinitions(String input) {
Expand Down

0 comments on commit 5c8aabb

Please sign in to comment.