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

Pierre De Rop resolved FELIX-4304.
----------------------------------
       Resolution: Fixed
    Fix Version/s: dependencymanager-4.0.0

The patch has been applied in DM4 (currently in the sandbox)

> DependencyManager ComponentImpl should not assume all service properties are 
> stored in a Hashtable
> --------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-4304
>                 URL: https://issues.apache.org/jira/browse/FELIX-4304
>             Project: Felix
>          Issue Type: Bug
>          Components: Dependency Manager
>    Affects Versions: dependencymanager-3.1.0
>            Reporter: Herko ter Horst
>            Assignee: Xander Uiterlinden
>             Fix For: dependencymanager-4.0.0
>
>         Attachments: ComponentImpl.java.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> In org.apache.felix.dm.impl.ComponentImpl.getServiceProperties() a copy of 
> the internal field m_serviceProperties is created by casting to Hashtable and 
> calling clone(). However, as clients are allowed to call 
> setServiceProperties(Dictionary properties) which assigns the parameter value 
> to the field, it is very possible for m_serviceProperties to contain some 
> other Dictionary implementation.
> The attached patch solves this problem in getServiceProperties() by making a 
> copy by enumerating over all keys and putting them in a newly created 
> Hashtable.
> Alternatively (or in addition), setProperties() could be changed to ensure 
> the parameter value isn't directly assigned to the field.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to