Open GoogleCodeExporter opened 9 years ago
Original comment by limpbizkit
on 8 Dec 2008 at 7:18
Upping priority to high. We've run into this problem internally at Google.
Original comment by limpbizkit
on 19 Feb 2009 at 6:37
Could this be resolved by making OverriddenModuleBuilder's equals/hashCode
delegate
to the overridden module?
Original comment by net...@gmail.com
on 17 Jul 2009 at 2:17
Unfortunately delegating equals/hashCode doesn't seem to be possible, because
OverridenModuleBuilder can collapse many modules into a single one. This is a
tricky
one.
Original comment by sberlin
on 26 Apr 2010 at 3:10
Attached is a patch that fixes this. It requires one addition to the API:
Binder.visitElements. The signature & javadoc of it is:
---
/**
* Visits all elements that have already been processed by this Binder. This will
continue
* visiting elements until the visitor returns true. If all known elements were
visited and the
* visitor returned false, this returns false. Otherwise, (if the elementVisitor
returned true)
* this returns true.
*
* @param elementVisitor that will be applied to each element already processed.
* @since 2.1
*/
boolean visitElements(ElementVisitor<Boolean> elementVisitor);
---
I do not think it is possible to solve this without an API addition, and this
was the
best I could think of. (Other possibilities were: isBound(Key), V
addBindInfo(Key
key, V value), ...)
Thoughts?
Original comment by sberlin
on 2 May 2010 at 8:15
Sorry, patch attached this time.
Original comment by sberlin
on 2 May 2010 at 8:16
Attachments:
Alternate patch based on deduplicating equal bindings (with no overhead to
runtime or
memory if not using Modules.override).
Original comment by sberlin
on 9 May 2010 at 1:34
Attachments:
[deleted comment]
A more complete version of the deduplication patch, with a suite of tests & bugs
fixed. (Sorry if you get two emails of this.. I deleted the first one to add
one
additional test.)
Original comment by sberlin
on 16 May 2010 at 12:35
Attachments:
fixed with r1178.
Original comment by sberlin
on 24 Jun 2010 at 1:05
Original issue reported on code.google.com by
limpbizkit
on 21 Oct 2008 at 6:59