uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörn Kottmann <kottm...@gmail.com>
Subject Re: AnnotationFS.getCoveredText returns null?
Date Tue, 28 Feb 2012 09:05:26 GMT
On 02/27/2012 04:25 PM, Tommaso Teofili wrote:
> 2012/2/27 Thilo Goetz<twgoetz@gmx.de>
>
>> On 24/02/12 18:15, Tommaso Teofili wrote:
>> ...
>>> However I don't like to just let the IndexOutOfBoundException raise as
>> that
>>> may sound like a bug or unhandled situation while the API should
>> explicitly
>>> declare a dedicated exception for when the begin and end offset don't
>> cover
>>> a fully existing span of text.
>>>
>>> Tommaso
>> That would be a non-backward compatible change on one of our
>> oldest and most widely used APIs.
>>
> Yes I know and that's not so good but I think that, if we happen to agree
> the current behavior could be improved, at some point in time (next major
> version perhaps) we may choose to  break that in order to have a smarter
> behavior.
> So not in 2.4.x but maybe for 2.5+ or, better, 3.x versions that would be
> (IMHO) a nice API improvement.
> Tommaso

Even then you might just want to create a new method to retrieve the
covered text and deprecate our current one.

Jörn

Mime
View raw message