Skip to content

Commit

Permalink
Sort by name
Browse files Browse the repository at this point in the history
  • Loading branch information
Russsnizza committed Sep 24, 2024
1 parent 20a652c commit 0ce98a6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/gyro/aws/rds/DbSubnetGroupResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public List<SubnetResource> getSubnets() {
}

return subnets.stream()
.sorted(Comparator.comparing(SubnetResource::getId))
.sorted(Comparator.comparing(SubnetResource::getName))
.collect(Collectors.toList());
}

Expand All @@ -117,7 +117,8 @@ public void setSubnets(List<SubnetResource> subnets) {
public void copyFrom(DBSubnetGroup group) {
setDescription(group.dbSubnetGroupDescription());
setName(group.dbSubnetGroupName());
setSubnets(group.subnets().stream().map(s -> findById(SubnetResource.class, s.subnetIdentifier())).collect(Collectors.toList()));
setSubnets(group.subnets().stream().map(s -> findById(SubnetResource.class, s.subnetIdentifier()))
.collect(Collectors.toList()));
setArn(group.dbSubnetGroupArn());
}

Expand Down

0 comments on commit 0ce98a6

Please sign in to comment.