yes, looks like a bug. There is feature validation code, but it only checks if the feature is appropriate for the type, not whether the feature's range is appropriate for the caller.
Added Jira https://issues.apache.org/jira/browse/UIMA-5706 -Marshall On 1/18/2018 5:22 PM, Richard Eckart de Castilho wrote: > On 18.01.2018, at 22:52, Richard Eckart de Castilho <r...@apache.org> wrote: >> On 18.01.2018, at 20:06, Marshall Schor <m...@schor.com> wrote: >>> Got to the point where I'm getting a JCas feature offset incompatibility - >>> starting debug... >> Meanwhile, I'm working off the things you found... > It seems that UIMAv3 allows code such as this: > > FeatureStructure fsVal = > aFS.getFeatureValue(aFS.getType().getFeatureByBaseName(aFeatureName)); > > where the aFeatureName is e.g. "end" (i.e. a non-FS feature). UIMAv3 seems to > simply return null in this case. > > UIMAv2 had thrown an exception in this case. > > Bug? > > Cheers, > > -- Richard > >