Skip to content

Commit 1e11300

Browse files
committed
move calling default detroy after other customizations destroy
1 parent 9619661 commit 1e11300

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/ServiceGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,15 +324,15 @@ private void generateDestroyMethod() {
324324
// Generates the destroy() method, and calls the destroy() method of
325325
// any runtime plugin that claims to have a destroy method.
326326
writer.openBlock("destroy(): void {", "}", () -> {
327-
// Always call destroy() in SmithyClient class. By default, it's optional.
328-
writer.write("super.destroy();");
329327
writer.pushState(CLIENT_DESTROY_SECTION);
330328
for (RuntimeClientPlugin plugin : runtimePlugins) {
331329
plugin.getDestroyFunction().ifPresent(destroy -> {
332330
writer.write("$T(this.config);", destroy);
333331
});
334332
}
335333
writer.popState();
334+
// Always call destroy() in SmithyClient class. By default, it's optional.
335+
writer.write("super.destroy();");
336336
});
337337
}
338338
}

0 commit comments

Comments
 (0)