felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Valentin Valchev (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (FELIX-4013) Incorrect usage of ServiceTracker.size() in UPnP Plugin
Date Wed, 03 Apr 2013 13:57:14 GMT

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

Valentin Valchev resolved FELIX-4013.
-------------------------------------

    Resolution: Fixed

fixed in rev.1464014
                
> Incorrect usage of ServiceTracker.size() in UPnP Plugin
> -------------------------------------------------------
>
>                 Key: FELIX-4013
>                 URL: https://issues.apache.org/jira/browse/FELIX-4013
>             Project: Felix
>          Issue Type: Bug
>          Components: Web Console
>    Affects Versions: webconsole-upnp-plugin-1.0.2
>            Reporter: Valentin Valchev
>            Assignee: Valentin Valchev
>             Fix For: webconsole-upnp-plugin-1.0.4
>
>
> There seems to be a small problem with the tracking code especially with the following
line (Activator.java):
> if (tracker.size() <= 1 && plugin != null)
> ...
> ServiceTrackerCustomizer.removedService() is supposed to be called AFTER the service
is no longer tracked. So in that method the size must be already decremented. The code above
will unregister the plugin if only one UPnP device left in the system and it wouldn't be accessible
through the web console.
> The correct code is:
> if (tracker.size() == 0 && plugin != null)

--
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

Mime
View raw message