Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

IDEA-78896: "redundant binding" inspection gives wrong suggestion when annotation is involved

$
0
0
Reporter Davide Baroncelli (baroncelli) 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.

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>