uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörn Kottmann <kottm...@gmail.com>
Subject Re: CasCreationUtils.getMetaDataList returns objects of wrong type ?
Date Fri, 14 Aug 2009 17:48:53 GMT
Adam Lally wrote:
> On Fri, Aug 14, 2009 at 12:10 PM, Jörn Kottmann<kottmann@gmail.com> wrote:
>   
>> The javadoc says these methods return a List of ProcessingResourceMetaData
>> objects.
>> Inside the private method getMetaDataList, objects which do not have the
>> ProcessingResourceMetaData
>> type are added to the list. That can be seen in line 1749, there a
>> CasInitializerDescription object is added
>> to the list.
>>
>>     
> Linke 1749 is:
>         mdList.add(((CasInitializerDescription) current).getMetaData().clone());
>
> It doesn't add the CasInitializerDescription to the list - it adds the
> result of getMetaData(), which is of type ProcesingResourceMetaData.
>   
Yes, I missed something, but getMetaData returns a ResourceMetaData object,
is it safe to cast the clone of it to ProcessingResourceMetaData ?

Jörn

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message