LUCENE-7956: Make the start offset of codePointBefore explicit.

This commit is contained in:
Adrien Grand 2017-09-05 21:21:51 +02:00
parent 967fe8a8b9
commit cb0ff1a799
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ public final class ICUNormalizer2CharFilter extends BaseCharFilter {
break; break;
} }
final int lastCodePoint = Character.codePointBefore(tmpBuffer.getBuffer(), tmpBuffer.getLength()); final int lastCodePoint = Character.codePointBefore(tmpBuffer.getBuffer(), tmpBuffer.getLength(), 0);
if (normalizer.isInert(lastCodePoint)) { if (normalizer.isInert(lastCodePoint)) {
// we require an inert char so that we can normalize content before and // we require an inert char so that we can normalize content before and
// after this character independently // after this character independently