Skip to content

ensure consistent ordering #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 7, 2020
Merged

Conversation

srchase
Copy link
Contributor

@srchase srchase commented Jan 6, 2020

Use TreeSet to wrap getContainedOperations results, ensuring consistent order.

Fixes #75

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -254,11 +254,12 @@ public Void serviceShape(ServiceShape shape) {

// Generate each operation for the service.
TopDownIndex topDownIndex = model.getKnowledge(TopDownIndex.class);
for (OperationShape operation : topDownIndex.getContainedOperations(service)) {
Set<OperationShape> containedOperations = new TreeSet<>(topDownIndex.getContainedOperations(service));
containedOperations.forEach(operation -> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These loops can stay, just based off of the new containedOperations set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CodeGen should generate code in some order (say alphabetical)
2 participants