Skip to content

Commit

Permalink
auto commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rishav-karanjit committed Jan 17, 2025
1 parent 14d9c30 commit f495419
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -724,14 +724,14 @@ public static List<Shape> getTopologicallyOrderedOrphanedShapesForService(
final var walker = new Walker(model);
final Set<Shape> nonOrphanedShapes = walker.walkShapes(serviceShape);

// Walker will not walk into a referedShape in ReferenceTrait.
// Find refered shape and walk into it.
// Walker will not walk into a referred Shape in ReferenceTrait.
// Find referred shape and walk into it.
final Set<Shape> additionalShapes = new HashSet<>();
for (Shape shape : nonOrphanedShapes) {
if(shape.hasTrait(ReferenceTrait.class)) {
final ReferenceTrait referenceTrait = shape.expectTrait(ReferenceTrait.class);
final var referedShape = model.expectShape(referenceTrait.getReferentId());
additionalShapes.addAll(walker.walkShapes(referedShape));
final var referredShape = model.expectShape(referenceTrait.getReferentId());
additionalShapes.addAll(walker.walkShapes(referredShape));
}
}
nonOrphanedShapes.addAll(additionalShapes);
Expand Down

0 comments on commit f495419

Please sign in to comment.