Skip to content

Commit

Permalink
Merge pull request #144 from kbss-cvut/fix/fix-sorting-according-to-l…
Browse files Browse the repository at this point in the history
…abal-and-snsLabel

Fix sorting of fault tree summaries according to label and snsLabel
  • Loading branch information
kostobog authored Jul 11, 2024
2 parents b00ba37 + e60c2a5 commit a530269
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ private static Comparator<FaultTree> getFunction(Sort.Order order){
Stream.of(t.getModified(), t.getCreated())
.filter(d -> d != null).findFirst().orElse(new Date(0)));
case Constants.SORT_BY_LABEL_PARAM -> Comparator.comparing((FaultTree t) ->
Optional.ofNullable(t.getSubsystem()).map(i -> i.getName()).orElse(""));
case Constants.SORT_BY_SNS_LABEL_PARAM -> Comparator.comparing((FaultTree t) ->
Optional.ofNullable(t.getName()).orElse(""));
case Constants.SORT_BY_SNS_LABEL_PARAM -> Comparator.comparing((FaultTree t) ->
Optional.ofNullable(t.getSubsystem()).map(i -> i.getName()).orElse(""));
default -> null;
};

Expand Down

0 comments on commit a530269

Please sign in to comment.