[ 
https://issues.apache.org/jira/browse/FELIX-3726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Felix Meschberger resolved FELIX-3726.
--------------------------------------

    Resolution: Fixed

Fixed in Rev. 1400076.

The Unsatisfied.activate method must set the target filters on the dependency 
managers before verifying them. Otherwise we get false positives.

I also removed the commented call to update target filters from the 
verifyDependencyManagers method because this update is always done before 
calling the verifyDM method.

After this fix, the CT also passes.
                
> Reference target filters defined as component properties are ignored
> --------------------------------------------------------------------
>
>                 Key: FELIX-3726
>                 URL: https://issues.apache.org/jira/browse/FELIX-3726
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR), Specification compliance
>         Environment: OSGi CT for DS: testReferenceTargetProperty
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>            Priority: Critical
>             Fix For: scr-1.6.2
>
>
> Test setup has three components:
> (1) E registered as BS and TC without service properties
> (2) T1 disabled by default; to be registered as TC with property p=x
> (3) T2 enabled by default with ref to TC and target (p=x)
> Component T2 has the target defined as part of the component definition 
> properties as in:
>    <reference name="ref" ... />
>    <property name="ref.target" value="(p=x)" />
> This is expected to not activate T2 because the reference cannot be satisfied 
> until T1 is enabled and registered as a TC service with the property.
> Currently T2 is activated because the ref.target property is ignored and thus 
> the component is registered without a target property and thus happily binds 
> to component E.
> The AbstractComponentManager.verifyDependencyManagers method has a commented 
> call to update the target filters. Probably because the callers of this 
> method do the update themselves before verifying. Except the 
> Unsatisfied.activate method, which only verifies without setting the targets.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to