You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Matthias Koch <ma...@averbis.com> on 2015/11/23 13:41:48 UTC

Bug in ExternalResourceFactory ???

Hi

We want to create an ExternalResourceDescription via

public static ExternalResourceDescription 
createExternalResourceDescription(Class<? extends Resource> aInterface, 
Object... aParams)

This resource has a couple of ConfigurationParameters and some of them 
are booleans.

If the object[] aParams contains those booleans an exception is thrown 
in line 177 ( param.setValue((String) aParams[i * 2 + 1]);) because the 
cast to String is not possible.

If we put them as Strings into the object array it seems to work.

This seems like an inconsistency, because we have to put boolean into 
the factory for an AnalysisEngineDescription but Strings for an 
ExternalResourceDescription.

Is this a bug or the expected behavior?

Best regards,
Matthias

Re: Bug in ExternalResourceFactory ???

Posted by Richard Eckart de Castilho <re...@apache.org>.
Hi,

this inconsistency is due to the way UIMA is presently implemented.

See my reply to the last inquiry on this particular topic:

http://markmail.org/message/rdyohba7g43zrvui

Cheers,

-- Richard

> On 23.11.2015, at 13:41, Matthias Koch <ma...@averbis.com> wrote:
> 
> Hi
> 
> We want to create an ExternalResourceDescription via
> 
> public static ExternalResourceDescription createExternalResourceDescription(Class<? extends Resource> aInterface, Object... aParams)
> 
> This resource has a couple of ConfigurationParameters and some of them are booleans.
> 
> If the object[] aParams contains those booleans an exception is thrown in line 177 ( param.setValue((String) aParams[i * 2 + 1]);) because the cast to String is not possible.
> 
> If we put them as Strings into the object array it seems to work.
> 
> This seems like an inconsistency, because we have to put boolean into the factory for an AnalysisEngineDescription but Strings for an ExternalResourceDescription.
> 
> Is this a bug or the expected behavior?
> 
> Best regards,
> Matthias