[jbosstools-issues] [JBoss JIRA] Closed: (JBIDE-9071) Injection point should be re-validated if the corresponding producer was changed.

Lukas Jungmann (JIRA) jira-events at lists.jboss.org
Thu Jun 16 07:06:23 EDT 2011


     [ https://issues.jboss.org/browse/JBIDE-9071?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukas Jungmann closed JBIDE-9071.
---------------------------------



v.

> Injection point should be re-validated if the corresponding producer was changed.
> ---------------------------------------------------------------------------------
>
>                 Key: JBIDE-9071
>                 URL: https://issues.jboss.org/browse/JBIDE-9071
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: cdi (jsr-299)
>    Affects Versions: 3.3.0.M1
>            Reporter: Alexey Kazakov
>            Assignee: Alexey Kazakov
>             Fix For: 3.3.0.M2
>
>
> EXECUTE: Create any CDI project.
> EXECUTE: Create:
> {code}
> public class Foo {
> 	@Inject Test test;
> }
> {code}
> {code}
> public class Test {
> }
> {code}
> {code}
> public class Test2 {
> 	public Test foo() {
> 		return new Test();
> 	}
> }
> {code}
> EXECUTE: Build the project.
> ASSERT: No validation problems on @Inject Test test; (in Foo class)
> EXECUTE: Add @Produces to Test2.foo():
> {code}
> public class Test2 {
> 	@Produces
> 	public Test foo() {
> 		return new Test();
> 	}
> }
> {code}
> EXECUTE: Save Test2.java
> {color:red}FAILURE:{color} @Inject Test test (in Foo class) is NOT marked as ambiguous injection 
> {color:green}ASSERT:{color} @Inject Test test (in Foo class) is marked as ambiguous injection
> EXECUTE: Comment @Produces to Test2.foo():
> {code}
> public class Test2 {
> 	// @Produces
> 	public Test foo() {
> 		return new Test();
> 	}
> }
> {code}
> EXECUTE: Save Test2.java
> {color:green}ASSERT:{color} @Inject Test test (in Foo class) is NOT marked as ambiguous injection

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list