Reporter | Davide Baroncelli (baroncelli) |
---|---|
Created | Dec 14, 2011 9:39:37 PM |
Updated | Dec 14, 2011 9:39:37 PM |
Priority | Normal |
Type | Bug |
Fix versions | No Fix versions |
State | Submitted |
Assignee | Unassigned |
Subsystem | Code Analysis. Inspection |
Affected versions | 10.5.3 (107.764) |
Fixed in build | No Fixed in build |
I have the following Guice code:
bind(StaticViewForm.class).annotatedWith(Distribution.class).to(StaticViewForm.class)
.in(Singleton.class);
where StaticViewForm is a concrete class. IDEA highlights with a warning the second "StaticViewForm" saying "binding to StaticViewForm is redundant" and offers to remove the binding. Apparently this is wrong, though, because removing the binding results in error like this one to happen during compilation:
Error injecting @c.g.p.DistributionClientModule$Distribution c.g.p.SelectedPropertiesBox: Unable to create or inherit binding: No implementation bound for '@c.g.p.DistributionClientModule$Distribution c.g.p.SelectedPropertiesBox' and an implicit binding cannot be created because the type is annotated.
bind(StaticViewForm.class).annotatedWith(Distribution.class).to(StaticViewForm.class)
.in(Singleton.class);
where StaticViewForm is a concrete class. IDEA highlights with a warning the second "StaticViewForm" saying "binding to StaticViewForm is redundant" and offers to remove the binding. Apparently this is wrong, though, because removing the binding results in error like this one to happen during compilation:
Error injecting @c.g.p.DistributionClientModule$Distribution c.g.p.SelectedPropertiesBox: Unable to create or inherit binding: No implementation bound for '@c.g.p.DistributionClientModule$Distribution c.g.p.SelectedPropertiesBox' and an implicit binding cannot be created because the type is annotated.