Skip to content

Commit

Permalink
JNG-5874 Duplicate service (#446)
Browse files Browse the repository at this point in the history
[2024-08-02 09:28:33 +0200] bence.gelei: Review fix
[2024-08-01 19:33:10 +0200] bence.gelei: duplicate removed
  • Loading branch information
bencegelei authored Aug 2, 2024
1 parent 3363c4f commit a6611c6
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,11 @@ public static List<AccessBasedNavigation> getAccessBasedNavigationsForOperations
}

public static List<RelationType> getRelatedServicesForPage(PageDefinition pageDefinition) {
String serviceClassForPage = getServiceClassForPage(pageDefinition);
Set<RelationType> relations = getAccessBasedNavigationsForOperations(pageDefinition).stream()
.map(AccessBasedNavigation::getAccessRelation)
// filter out already imported service impl.
.filter(r -> !(serviceRelationName(r) + "Impl").equals(serviceClassForPage))
.collect(Collectors.toSet());
return relations.stream().sorted(Comparator.comparing(NamedElement::getName)).toList();
}
Expand Down

0 comments on commit a6611c6

Please sign in to comment.