Make PrivateModule#binder() non-final to allow binder customization in subclasses by vlsi · Pull Request #1569 · google/guice (original) (raw)
@cpovirk , could you please review and merge the fix?
In a nutshell, AbstractModule.binder() method is protected and non-final:
guice/core/src/com/google/inject/AbstractModule.java
Line 74 inc7a74a1
| protected Binder binder() { |
|---|
However, PrivateModule.binder() is protected and final at the same time:
guice/core/src/com/google/inject/PrivateModule.java
Lines 137 to 140 inc7a74a1
| // 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.