uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Eckart de Castilho <...@apache.org>
Subject Re: messed up the impl of UIMA-2977 - calling destroy() method on External Resources
Date Thu, 20 Oct 2016 19:45:21 GMT
The uimaFIT ExternalResourceFactoryTest has examples of resources that
derive from Resource and others that derive from SharedResourceObject.

Cheers,

-- Richard

https://svn.apache.org/repos/asf/uima/uimafit/trunk/uimafit-core/src/test/java/org/apache/uima/fit/factory/ExternalResourceFactoryTest.java

> On 20.10.2016, at 21:29, Richard Eckart de Castilho <rec@apache.org> wrote:
> 
> On 20.10.2016, at 21:27, Marshall Schor <msa@schor.com> wrote:
>> 
>> The interesting part is the Java type of the returned value - it is specified as
>> 
>> Class<? extends Resource>
>> 
>> which will throw a cast exception if the implementing class can't be cast to
>> Resource. 
> 
> I believe due to type erasure, this does not throw a cast exception as long
> as the value is a Class.
> 
> Best,
> 
> -- Richard


Mime
View raw message