google / google/guice

Document binding deduplication

Open
#659 4 comments 0 reactions 0 assignees View on GitHub
imported
Dominant language
Java
Stars
12.7k
Forks
1.7k
Avg merge
11m
Merged PRs (30d)
2

Description

_From [mattmccutchen@google.com](https://code.google.com/u/100074016002343462025/) on October 07, 2011 00:56:10_

I have a situation in a Google project in which I would like to modify several modules to all install a common module but have the common module installed only once, to avoid errors about duplicate bindings.  It occurred to me that MultiBinder must have a solution for this, and indeed it does: Guice deduplicates modules according to Object#equals.  This behavior is mentioned on a few blogs but is not officially documented in Guice anywhere I could find.  Please document it, e.g., on the Module class or on Binder#install.

_Original issue: http://code.google.com/p/google-guice/issues/detail?id=659_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.