Adam Lally wrote:
On Mon, Aug 17, 2009 at 10:39 AM, Jörn Kottmann<kottm...@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?
Maybe, at least it was not changed through the generics.

Jörn

Reply via email to