LUCENE-2554: add comment explaining why we can't assert valid UTF8 when dancing

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/preflexfixes@979415 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2010-07-26 19:31:34 +00:00
parent a604160149
commit aac4e16774
1 changed files with 4 additions and 3 deletions

View File

@ -290,9 +290,10 @@ public class PreFlexFields extends FieldsProducer {
// unicode character:
assert isHighBMPChar(term.bytes, pos);
// TODO: understand why this assert sometimes (rarely)
// trips!
// assert term.length >= pos + 3: "term.length=" + term.length + " pos+3=" + (pos+3);
// NOTE: we cannot make this assert, because
// AutomatonQuery legitimately sends us malformed UTF8
// (eg the UTF8 bytes with just 0xee)
// assert term.length >= pos + 3: "term.length=" + term.length + " pos+3=" + (pos+3) + " byte=" + Integer.toHexString(term.bytes[pos]) + " term=" + term.toString();
// Save the bytes && length, since we need to
// restore this if seek "back" finds no matching