Richard Eckart de Castilho created UIMA-5793:
------------------------------------------------
Summary: FSUtil.getFeature fails when called with Object.class on
multi-valued features
Key: UIMA-5793
URL: https://issues.apache.org/jira/browse/UIMA-5793
Project: UIMA
Issue Type: Improvement
Components: uimaFIT
Reporter: Richard Eckart de Castilho
Assignee: Richard Eckart de Castilho
Fix For: 2.5.0uimaFIT
When FSUtil.getFeature(fs, feature, type) is called on a feature that is
multi-valued and type is Object, then the method fails with a message like
{noformat}
Unable to coerce value of feature
[de.tudarmstadt.ukp.inception.api.kb.type.Fact:object] with type
[de.tudarmstadt.ukp.inception.api.kb.type.FactObjectLink[]] into
[java.lang.Object]
{noformat}
This is because Object is no an array or collection type. However,
FSUtil.getFeatures should handle this as a special case. When the Object is
used, basically any return value is acceptable. FSUtil should have defined
behavior here, e.g. returning either an array or a list representation of the
multi-value.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)