[
https://issues.apache.org/jira/browse/OPENNLP-594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13769552#comment-13769552
]
Ioan Barbulescu commented on OPENNLP-594:
-----------------------------------------
Hi Joern
Thank you.
I would like to create a unit test, but I need first to familiarize myself with
your house rules about writing them.
However, I confirm the fix, by running the new code.
Thanks.
> opennlp.tools.parser.Parse.remove() throws IndexOutOfBoundsException
> --------------------------------------------------------------------
>
> Key: OPENNLP-594
> URL: https://issues.apache.org/jira/browse/OPENNLP-594
> Project: OpenNLP
> Issue Type: Bug
> Components: Parser
> Affects Versions: tools-1.5.3
> Environment: Windows 7 + java 1.7.0_21
> Reporter: Ioan Barbulescu
> Assignee: Joern Kottmann
> Priority: Minor
> Fix For: 1.6.0
>
> Attachments: Parse.java.diff
>
>
> Parse.remove() throws IndexOutOfBoundsException if you attempt to remove the
> last child node of the current node (i.e. if you call remove(0) and this node
> has only one sub-node).
> Some background info: I was trying to remove the TK nodes from a parse.
> I attached the diff file for the change fixing the bug.
> The change is simple: a supplementary check:
> if(! parts.isEmpty())
> before rebuilding the span.
> Thank you
> Ioan
> P.S. this is my first reported bug, so please be gentle :) Please tell me if
> something is wrong with this issue, so that I fix it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira