[ https://issues.apache.org/jira/browse/CELIX-344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15132422#comment-15132422
]
Pepijn Noltes commented on CELIX-344:
-------------------------------------
Thanks, applied the patch. Please close this issue if okay.
> service tracker removes wrong service
> -------------------------------------
>
> Key: CELIX-344
> URL: https://issues.apache.org/jira/browse/CELIX-344
> Project: Celix
> Issue Type: Bug
> Components: Framework
> Reporter: Gerrit Binnenmars
> Fix For: next
>
> Attachments: 0001-untrack-can-remove-wrong-service.patch
>
>
> In serviceTracker_track the function serviceTracker_invokeAddingService is called. If
this function returns an error the service reference is not added to the arrayList of tracked
services. This is correct!
> In serviceTracker_untrack the assumption is made that the reference is always in the
arrayList of tracked services. This is not correct!.
> E.g. the config_admin service tracker returns an error on invokeAddingService if a service
with the same PID is registered twice!
> See attached simple patch to solve this
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
|