Skip to content

Commit 5d59312

Browse files
authored
In CodeGenerator, default the resourceDirectory to the sourcesDirectory when one is not explicitly specified. (#3604)
This fixes a backwards-incompatibility for customers we didn't know existed: those that use CodeGenerator directly.
1 parent 5155eb6 commit 5d59312

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

codegen/src/main/java/software/amazon/awssdk/codegen/CodeGenerator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ public CodeGenerator(Builder builder) {
5252
this.models = builder.models;
5353
this.sourcesDirectory = builder.sourcesDirectory;
5454
this.testsDirectory = builder.testsDirectory;
55-
this.resourcesDirectory = builder.resourcesDirectory;
55+
this.resourcesDirectory = builder.resourcesDirectory != null ? builder.resourcesDirectory
56+
: builder.sourcesDirectory;
5657
this.fileNamePrefix = builder.fileNamePrefix;
5758
}
5859

0 commit comments

Comments
 (0)