> On 22. Nov 2023, at 19:30, Andre Gillet <andre.gil...@cerence.com.INVALID> 
> wrote:
> 
> Hi,
> Yes, that's what we ended up doing and since you suggested it, we'll just 
> keep using that workaround.
> Doing that just makes the ResourceManager interface seem moot though - using 
> the interface seemed cleaner than extending an _impl class.  The code could 
> check if aResourceManager is an instanceof ResourceManager_impl before 
> casting and calling getImportCache() - although deprecated, getImportCache() 
> is still defined in the ResourceManager interface, so calling 
> aResourceManager.getImportCache() should be fine also.
> Thanks for the quick follow up.

There are several cases where UIMA expects that a given interface only has a 
single implementation and casting to it.
The interface is not necessarily meant to provide for alternative 
implementations, but rather to avoid users using
internal API which cannot be constraint using e.g. package-private visibility. 

I agree that this is not necessarily the best situation, but it is how it 
currently is.

That said, I guess in this particular case, the cast could be removed such that 
deprecated method is called.

Would you like to open an issue describing the problem and file a PR to resolve 
it?

Cheers,

-- Richard


Reply via email to