[
https://issues.apache.org/jira/browse/UIMA-5844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16554832#comment-16554832
]
Marshall Schor commented on UIMA-5844:
--------------------------------------
ok, will take a look...
> SelectFS.following doesn't work
> -------------------------------
>
> Key: UIMA-5844
> URL: https://issues.apache.org/jira/browse/UIMA-5844
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 3.0.0SDK
> Reporter: Richard Eckart de Castilho
> Priority: Major
> Fix For: 3.0.1SDK
>
>
> It seems as if the SelectFS following method doesn't work at all:
> {code}
> @Test
> public void testSelectFollowingPrecedingDifferentTypes() {
> this.jCas.setDocumentText("A B C D E");
> Token a = new Token(this.jCas, 0, 1);
> Token b = new Token(this.jCas, 2, 3);
> Token c = new Token(this.jCas, 4, 5);
> Token d = new Token(this.jCas, 6, 7);
> Token e = new Token(this.jCas, 8, 9);
> for (Token token : Arrays.asList(a, b, c, d, e)) {
> token.addToIndexes();
> }
> Sentence sentence = new Sentence(this.jCas, 2, 5);
> sentence.addToIndexes();
> // uimaFIT: selectFollowing(this.jCas, Token.class, sentence, 1);
> List<Token> following1 =
> jCas.select(Token.class).following(sentence).limit(1).asList();
> assertEquals(Arrays.asList("D"), JCasUtil.toText(following1));
> assertEquals(Arrays.asList(d), following1);
> {code}
> This fails with
> {code}
> java.lang.AssertionError: expected:<[D]> but was:<[A]>
> {code}
> It seems as if the `following` simply has no effect. If the `limit is
> removed`, the whole set of Tokens is returned.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)