LUCENE-7940: Updated for boundary value of Ja Phaala

This commit is contained in:
Md. Abdulla-Al-Sun 2017-08-31 12:11:53 +06:00
parent 1bca06b8a9
commit 3197d5af71
1 changed files with 2 additions and 2 deletions

View File

@ -80,12 +80,12 @@ public class BengaliNormalizer {
if(i - 2 == 0 && s[i-1] == '\u09CD') {
s[i - 1] = '\u09C7';
if(s[i+1] == '\u09BE') {
if(i + 1 < len && s[i+1] == '\u09BE') {
len = delete(s, i+1, len);
}
len = delete(s, i, len);
i --;
} else {
} else if(i - 1 >= 0 && s[i-1] == '\u09CD' ){
len = delete(s, i, len);
len = delete(s, i-1, len);
i -=2;