This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I have public class Settings { ... } and in a managed bean (web app object) I have @Produces @FromApp Settings getSettings(){ ... } But when I refer to it with @Inject @FromApp Settings settings; NetBeans shows warning: "Unresolved ambiguous dependency found as result of typesafe resolution" That's wrong, the reference is ok and works in the app. Seems like NetBeans ignores the @FromApp qualifier.
7.3.beta2
Please provide FromApp declaration.
import static java.lang.annotation.ElementType.*; import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Target; import javax.inject.Qualifier; @Qualifier @Retention(RUNTIME) @Target({FIELD, PARAMETER, METHOD}) public @interface FromApp { }
Also injecting the javax.security.Principal into @SessionScoped CDI bean (after successful login) leads to this behavior, however, injecting a user principal should be ok according to the Java EE 6 Spec http://docs.oracle.com/javaee/6/tutorial/doc/gmgli.html). My configuration: NB7.4 Final, Oracle JDK 7u40 64bit, JBoss AS7, Win7
Created attachment 141499 [details] Invalid Netbeans warning about unambiguous dependency
Latest comments are for different issues, I can't reproduce initial one with nb 8.0, or need sample code instead of some lines from the code. but 8.0 ark FromApp as wrong and it's a new issue. Close as incomplete instead of fixed as I may miss smth, please provide sample project.
I can reproducew after https://netbeans.org/bugzilla/show_bug.cgi?id=244172 fix
http://hg.netbeans.org/web-main/rev/87ffb920c7a1
Integrated into 'main-silver', will be available in build *201407160001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/87ffb920c7a1 User: Sergey B. Petrov <sj-nb@netbeans.org> Log: #225556 make usual qualifier more flexible, need cleanup later