samanthamccabe / didelphis-sca

Didelphis Sound Change Applier
19 stars 4 forks source link

Account for IndexOutOfBounds in Segmenter.getIndex #73

Closed samanthamccabe closed 8 years ago

samanthamccabe commented 9 years ago

Segmenter.getIndex(CharSequence,char,char,int) can throw an IndexOutOfBoundsException of there are unclosed parentheses. Or possibly for other reasons.

Preferred behaviour is to log a warning, and to either return the start index (or +1, i forget the semantics) or return -1.