[ 
https://issues.apache.org/jira/browse/FELIX-4588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14084466#comment-14084466
 ] 

Pierre De Rop commented on FELIX-4588:
--------------------------------------

Thanks for reporting;

Indeed, there is a bug when cloning metatype info in 
ConfigurationDependencyImpl.createCopy() method.
I have committed a test case , as well as a candidate patch in rv 1615520, but 
in tdependencymanager-4.0.0 (which is currently only committed in the felix 
sandbox [1], and not yet in the felix trunk).

[1]  
http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype

the patched files are:

dependencymanager-prototype/org.apache.felix.dm/src/org/apache/felix/dm/impl/ConfigurationDependencyImpl.java
dependencymanager-prototype/org.apache.felix.dm/src/org/apache/felix/dm/impl/metatype/MetaTypeProviderImpl.java

and the new testcase: 

dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithConfigurationAndMetaType.java




> createCopy method ConfigurationDependency produces a malfunctioning clone
> -------------------------------------------------------------------------
>
>                 Key: FELIX-4588
>                 URL: https://issues.apache.org/jira/browse/FELIX-4588
>             Project: Felix
>          Issue Type: Bug
>          Components: Dependency Manager
>    Affects Versions: dependencymanager.runtime-3.2.0
>            Reporter: Tuomas Kiviaho
>            Assignee: Pierre De Rop
>             Fix For: dependencymanager-4.0.0
>
>
> createCopy copies m_metaType as well which is understandable because the 
> existence of this particular instance keeps track of appended metatype 
> information. Problem arises when metaType is present and createCopy is used, 
> because MetaTypeProviderImpl carries a reference to the original 
> ConfigurationDependency. updated invocations wind up to the original 
> implementation instead of clone



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to