Skip to content

Commit

Permalink
chore: use Paths.get for places where SOURCE_FOLDER is used
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Oct 24, 2021
1 parent 6b6b152 commit 654dad8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,13 @@ public void writeAdditionalFiles(
String noTouchNoticePrefix = "// Please do not touch this file. It's generated from template in:\n"
+ "// https://github.com/aws/aws-sdk-js-v3/blob/main/codegen/smithy-aws-typescript-codegen/"
+ "src/main/resources/software/amazon/smithy/aws/typescript/codegen/";
writerFactory.accept(CodegenUtils.SOURCE_FOLDER + "/defaultRoleAssumers.ts", writer -> {
writerFactory.accept(Paths.get(CodegenUtils.SOURCE_FOLDER, "defaultRoleAssumers.ts").toString(), writer -> {
String resourceName = String.format("%s%s.ts", STS_CLIENT_PREFIX, ROLE_ASSUMERS_FILE);
String source = IoUtils.readUtf8Resource(getClass(), resourceName);
writer.write("$L$L", noTouchNoticePrefix, resourceName);
writer.write("$L", source);
});
writerFactory.accept(CodegenUtils.SOURCE_FOLDER + "/defaultStsRoleAssumers.ts", writer -> {
writerFactory.accept(Paths.get(CodegenUtils.SOURCE_FOLDER, "defaultStsRoleAssumers.ts").toString(), writer -> {
String resourceName = String.format("%s%s.ts", STS_CLIENT_PREFIX, STS_ROLE_ASSUMERS_FILE);
String source = IoUtils.readUtf8Resource(getClass(), resourceName);
writer.write("$L$L", noTouchNoticePrefix, resourceName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void writeAdditionalFiles(
return;
}

writerFactory.accept(CodegenUtils.SOURCE_FOLDER + "/endpoints.ts", writer -> {
writerFactory.accept(Paths.get(CodegenUtils.SOURCE_FOLDER, "endpoints.ts").toString(), writer -> {
new EndpointGenerator(settings.getService(model), writer).run();
});
}
Expand Down

0 comments on commit 654dad8

Please sign in to comment.