add asserts

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1346999 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2012-06-06 17:41:46 +00:00
parent 4e52bc3ac9
commit 454b16b5ac
1 changed files with 5 additions and 1 deletions

View File

@ -639,7 +639,7 @@ public class BlockTreeTermsWriter extends FieldsConsumer {
// for debugging
@SuppressWarnings("unused")
private String toString(BytesRef b) {
private String toString(BytesRef b) {
try {
return b.utf8ToString() + " " + b;
} catch (Throwable t) {
@ -896,6 +896,10 @@ public class BlockTreeTermsWriter extends FieldsConsumer {
// System.out.println("SAVED to " + dotFileName);
// w.close();
// }
} else {
assert sumTotalTermFreq == 0;
assert sumDocFreq == 0;
assert docCount == 0;
}
}