[
https://issues.jboss.org/browse/JBIDE-7967?page=com.atlassian.jira.plugin...
]
Alexey Kazakov resolved JBIDE-7967.
-----------------------------------
Resolution: Partially Completed
Partially fixed.
1. Full build/validation works for the case.
2. If there is an ambiguous injection because ProjectImpl has default or @Inject
constructor then the injection is marked as a problem. If you make the ProjectImpl a
not-valid bean then CurrentProject will be re-validated and the marker disappears.
3. If there is no ambiguous injections because ProjectImpl is not a valid bean then
ProjectImpl is not included in CDI model and making ProjectImpl a valid bean won't
force CurrentProject to be re-validated. The manual re-validating (or incremental/full
build of CurrentProject) is needed there to mark its injections as a problem. It's a
restriction of current CDI tools model. Let's have a separate issue (not critical for
CR1) for that.
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: Alexey Kazakov
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