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

Richard Eckart de Castilho commented on UIMA-6300:
--------------------------------------------------

The {{AnnotationEngineDescription_impl}} has a few fields which are "internal 
hidden state" - i.e. they are not exposed as metadata attributes. This cause 
the cloning process to create only shallow clones of them. As a result, the 
clone and the original  {{AnnotationEngineDescription_impl}} have a shared 
inner state. From my perspective, this is clearly something that should not 
happen. The clone should be independent of the original.

I am going to fix this specifically for the case of the 
{{AnnotationEngineDescription_impl}}. In principle, other types of descriptors 
could also be affected by the issue. But I do not want to make this a 
potentially major/pervasive change at this time so we can see if anybody might 
speak up who may be negatively affected by the change (which I hope should not 
be the case).

> deep copy feature for 
> org.apache.uima.analysis_engine.AnalysisEngineDescription class
> -------------------------------------------------------------------------------------
>
>                 Key: UIMA-6300
>                 URL: https://issues.apache.org/jira/browse/UIMA-6300
>             Project: UIMA
>          Issue Type: Improvement
>          Components: uimaj
>    Affects Versions: 3.1.1SDK
>            Reporter: Serge Démoulin
>            Assignee: Richard Eckart de Castilho
>            Priority: Major
>             Fix For: 3.2.0SDK
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> I need the following feature :
> a deep copy for the following class 
> org.apache.uima.analysis_engine.AnalysisEngineDescription
> It means a copy that resolve the imports and copy the metatdatas, the 
> delegates in case of aggregates and all the others attributes ...
> IMPROVEMENT : this deep copy should let the object unchanged
> That mean it should not call the method resolveImports() on the original 
> object (this method changes the object)
>  
> AnalysisEngineDescription_impl inherits from MetaDataObject_impl
> The class MetaDataObject_impl has a clone method
> The clone method of MetaDataObject_impl resolve the imports (changing the 
> object) and makes a deep its undelying metadatas.
> {color:#ffffff}MetaDataOpl{color}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to