uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörn Kottmann <kottm...@gmail.com>
Subject generics: CasPool
Date Mon, 17 Aug 2009 14:39:43 GMT
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.

Jörn

Mime
View raw message