Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make PrivateModule#binder() non-final to allow binder customization in subclasses #1569

Closed
wants to merge 1 commit into from

Conversation

vlsi
Copy link
Contributor

@vlsi vlsi commented Jan 24, 2022

One of the cases for overriding #binder() would be calling Binder#skipSources(...)

fixes #1525

…n subclasses

One of the case for overriding #binder() would be calling Binder#skipSources(...)

fixes google#1525
@vlsi
Copy link
Contributor Author

vlsi commented May 27, 2022

@ronshapiro , sorry for pinging you, however, would you please review and merge the change?

It is kind of sad to wait one year for 1 line change 😭

@vlsi
Copy link
Contributor Author

vlsi commented May 31, 2022

@cpovirk , could you please review and merge the fix?

In a nutshell, AbstractModule.binder() method is protected and non-final:

protected Binder binder() {

However, PrivateModule.binder() is protected and final at the same time:

// everything below is copied from AbstractModule
/** Returns the current binder. */
protected final PrivateBinder binder() {

I believe that was just a typo, and there's no practical meaning for making PrivateModule.binder() method final.

I listed more details in the linked #1525 (comment) issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make PrivateModule#binder() non-final
1 participant