You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (JIRA)" <de...@uima.apache.org> on 2018/07/18 18:51:00 UTC

[jira] [Resolved] (UIMA-5829) `between` throws an exception for overlapping annotations

     [ https://issues.apache.org/jira/browse/UIMA-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marshall Schor resolved UIMA-5829.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 3.0.1SDK

fixed per the suggestion.

> `between` throws an exception for overlapping annotations
> ---------------------------------------------------------
>
>                 Key: UIMA-5829
>                 URL: https://issues.apache.org/jira/browse/UIMA-5829
>             Project: UIMA
>          Issue Type: Bug
>          Components: UIMA
>    Affects Versions: 3.0.0SDK
>            Reporter: Richard Eckart de Castilho
>            Priority: Minor
>             Fix For: 3.0.1SDK
>
>
> SelectFS throws an exception in the following case. Why not return an empty list?
> {code}
>     Token t1 = new Token(jCas, 45, 57);
>     t1.addToIndexes();
>     Token t2 = new Token(jCas, 52, 52);
>     t2.addToIndexes();
>     new Sentence(jCas, 52, 52).addToIndexes();
>     // uimaFIT: selectBetween(jCas, Sentence.class, t1, t2);
>     List<Sentence> stem1 = jCas.select(Sentence.class).between(t1, t2).asList();
>     assertTrue(stem1.isEmpty());
> {code}
> {code}
> java.lang.IllegalArgumentException: End value must be >= Begin value
> 	at org.apache.uima.cas.impl.SelectFSs_impl.makePosAnnot(SelectFSs_impl.java:855)
> 	at org.apache.uima.cas.impl.SelectFSs_impl.between(SelectFSs_impl.java:435)
> 	at org.apache.uima.cas.impl.SelectFSs_impl.between(SelectFSs_impl.java:97)
> ...
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)