-
1. Re: NetBeans Bug #244173
mkouba Nov 18, 2015 3:30 AM (in response to chrisjr)Hi Chris,
you are correct and it's a NetBeans bug. In your case,
SampleBean.getValue()
is a producer method with@Dependent
scope and so it is possible to use the injection point metadata. It wouldn't be possible for any other scope because we couldn't guarantee there's only one injection point per bean instance. See also 5.5.7. Injection point metadata.Martin
-
2. Re: NetBeans Bug #244173
meetoblivion Dec 20, 2015 12:39 PM (in response to mkouba)It looks like the netbeans team may be misinterpreting Chapter 8.1 of this doc Chapter 8. Producer methods
Its like the producer method as app scoped, even though it should be dependent. Maybe try adding an explicit @Dependent to the method to see if that fixes it?
-
3. Re: NetBeans Bug #244173
chrisjr Dec 20, 2015 2:44 PM (in response to meetoblivion)Actually, the NetBeans team's misunderstanding is so great that they don't realise that the scope of the method is even relevant. So adding an explicit @Dependent to the method makes no difference: the only way that I've found to remove the warning is to replace @ApplicationScoped with @Dependent on the bean itself. Which is wrong, of course.