uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Lally <ala...@alum.rpi.edu>
Subject Re: generics: CasPool
Date Mon, 17 Aug 2009 16:28:39 GMT
On Mon, Aug 17, 2009 at 10:39 AM, Jörn Kottmann<kottmann@gmail.com> wrote:
> The CasPool has a constructor
>
> CasPool(int aNumInstances, Collection aComponentDescriptionsOrMetaData,
>         Properties aPerformanceTuningSettings, ResourceManager
> aResourceManager)
>
> where aComponentDescriptionsOrMetaData is a collection which can contain
> according
> to javadoc "AnalysisEngineDescription, CollectionReaderDescription,
> CasConsumerDescription or ProcessingResourceMetaData objects"
>
> A reference of the Collection is passed to fillPool which passes the
> Collection
> to a CasDefinition constructor which then casts everything to
> ProcessingResourceMetaData,
> which will result in a ClassCastException in the case of
> AnalysisEngineDescription,
> CollectionReaderDescription and CasConsumerDescription objects.
>
> Well, when we use generics we get an error.
>

Good catch, that javadoc does seem to be wrong.  I wonder if it was
correct at some point in the past and the code has changed?

 -Adam

Mime
View raw message