[
https://issues.apache.org/jira/browse/FELIX-1826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Felix Meschberger resolved FELIX-1826.
--------------------------------------
Resolution: Fixed
Fixed in Rev. 830994: The newInstance method now never returns null but instead
throws a ComponentException if the instance fails to be created and activated.
(also added a test to verify instances created with newInstance are not
deactivated and disposed off when the component factory is deactivated)
> ComponentException must be thrown if ComponentFactory.newInstance cannot
> create a component instance
> ----------------------------------------------------------------------------------------------------
>
> Key: FELIX-1826
> URL: https://issues.apache.org/jira/browse/FELIX-1826
> Project: Felix
> Issue Type: Bug
> Components: Declarative Services (SCR), Specification compliance
> Affects Versions: scr-1.2.0
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: scr-1.2.0
>
>
> If the ComponentFactory.newInstance method cannot create a component
> instance, null must not be returned but a ComponentException must be thrown
> as described in Section 112.5.5, Factory Component, of the DS Specification:
> If SCR is unable to satisfy the component
> configuration given the component properties and the Dictionary argument
> to newInstance, the newInstance method must throw a
> ComponentException.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.