Skip to content

Commit

Permalink
Always generate a RequestOptions subclass.
Browse files Browse the repository at this point in the history
Doing so fixes a bug where the generated RequestBuilder would otherwise
not include methods from RequestOptions. It’s also probably more consistent to always have the subclass rather than only have it if an extension is defined somewhere.
  • Loading branch information
sjudd committed May 17, 2017
1 parent 75a28f1 commit d950e5e
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,9 @@ boolean maybeWriteAppModule() {
// in a project.
String generatedCodePackageName = appModule.getEnclosingElement().toString();

TypeSpec generatedRequestOptions = null;
if (!indexedClassNames.extensions.isEmpty()) {
generatedRequestOptions =
TypeSpec generatedRequestOptions =
requestOptionsGenerator.generate(generatedCodePackageName, indexedClassNames.extensions);
writeRequestOptions(generatedCodePackageName, generatedRequestOptions);
}

TypeSpec generatedRequestBuilder =
requestBuilderGenerator.generate(generatedCodePackageName, generatedRequestOptions);
Expand Down

0 comments on commit d950e5e

Please sign in to comment.