Skip to content

Commit

Permalink
Make AbstractModule.binder private, for a hair more encapsulation.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 549090093
  • Loading branch information
java-team-github-bot authored and Guice Team committed Aug 2, 2023
1 parent ddb6315 commit 7f6cff8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/src/com/google/inject/AbstractModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
*/
public abstract class AbstractModule implements Module {

Binder binder;
private Binder binder;

@Override
public final synchronized void configure(Binder builder) {
Expand Down
8 changes: 4 additions & 4 deletions core/test/com/google/inject/CircularDependencyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,8 @@ public void testCircularlyDependentMultipleWays() {
new AbstractModule() {
@Override
protected void configure() {
binder.bind(A.class).to(E.class);
binder.bind(B.class).to(E.class);
bind(A.class).to(E.class);
bind(B.class).to(E.class);
}
});
injector.getInstance(A.class);
Expand All @@ -452,8 +452,8 @@ public void testDisablingCircularDependencies() {
@Override
protected void configure() {
binder().disableCircularProxies();
binder.bind(A.class).to(E.class);
binder.bind(B.class).to(E.class);
bind(A.class).to(E.class);
bind(B.class).to(E.class);
}
});

Expand Down
2 changes: 1 addition & 1 deletion core/test/com/google/inject/JitBindingsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public void testLinkedToScoped() {
new AbstractModule() {
@Override
protected void configure() {
binder.requireExplicitBindings();
binder().requireExplicitBindings();
bind(Foo.class).to(ScopedFooImpl.class);
}
});
Expand Down

0 comments on commit 7f6cff8

Please sign in to comment.