[
https://issues.jboss.org/browse/JBIDE-7967?page=com.atlassian.jira.plugin...
]
Viacheslav Kabanovich commented on JBIDE-7967:
----------------------------------------------
I have checked the example in the description above, and found that model provides exactly
one injection getCurrent(); type ProjectImpl is not a bean and is not injectable. I have
found only the bug of validation. When I create/remove constructor in ProjectImpl, cdi
builder removes/adds this type from project beans set; after that cdi validation is
invoked for the changed file ProjectImpl.java but not for files that have the injection
point. Manual invoking action 'Validate' on those files results in a correct
state. So, in cdi validator, when building dependencies, we probably should consider file
with injection point as dependent on every file having type assignable to the type of the
injection point.
nonannotated classes without default constructor and no CDI scope or
inject annotations on class or constructor should not be considered beans
----------------------------------------------------------------------------------------------------------------------------------------------
Key: JBIDE-7967
URL:
https://issues.jboss.org/browse/JBIDE-7967
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: cdi (jsr-299)
Reporter: Max Andersen
Assignee: Viacheslav Kabanovich
Priority: Critical
Fix For: 3.2.0.CR1
public interface Project {
}
public abstract class AbstractProject implements Project {
}
public class ProjectImpl extends AbstractProject {
public ProjectImpl(final File rootDirectory)
{
projectRoot = rootDirectory;
}
}
@Singleton
public class CurrentProject {
@Produces
@Default
@Dependent
public Project getCurrent()
}
@Inject Project project;
should in this case just consider getCurrent() the only injection source because Abstract
class cannot be instantatiated nor can the PRojectImpl since it has no-noarg constructor
but does have a constructor with arguments.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira