Skip to content

Commit

Permalink
Make the generated Provider for component dependency types final.
Browse files Browse the repository at this point in the history
RELNOTES=n/a
PiperOrigin-RevId: 370721981
  • Loading branch information
Chang-Eric authored and Dagger Team committed Apr 27, 2021
1 parent bfdb109 commit 58c3bf9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public CodeBlock creationExpression() {
COMPONENT_PROVISION_FACTORY,
classBuilder(factoryClassName())
.addSuperinterface(providerOf(keyType))
.addModifiers(PRIVATE, STATIC)
.addModifiers(PRIVATE, STATIC, FINAL)
.addField(dependencyClassName, dependency().variableName(), PRIVATE, FINAL)
.addMethod(
constructorBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ public void testDefaultPackage() {
" }")
.addLinesIn(
DEFAULT_MODE,
" private static class test_AComponent_a implements Provider<A> {",
" private static final class test_AComponent_a implements Provider<A> {",
" private final AComponent aComponent;",
" ",
" test_AComponent_a(AComponent aComponent) {",
Expand Down

0 comments on commit 58c3bf9

Please sign in to comment.