remove pkg-private sugar method in Term only used by one test

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1206455 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2011-11-26 15:12:48 +00:00
parent 9fcc72fe13
commit 004cec8ca2
2 changed files with 3 additions and 8 deletions

View File

@ -130,12 +130,6 @@ public final class Term implements Comparable<Term> {
this.bytes = bytes;
}
/** Resets the field and text of a Term. */
final void set(String fld, String txt) {
field = fld;
this.bytes = new BytesRef(txt);
}
@Override
public final String toString() { return field + ":" + bytes.utf8ToString(); }
}

View File

@ -26,6 +26,7 @@ import org.apache.lucene.document.Field;
import org.apache.lucene.document.TextField;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.LockObtainFailedException;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.LuceneTestCase;
public class TestIndexWriterNRTIsCurrent extends LuceneTestCase {
@ -99,12 +100,12 @@ public class TestIndexWriterNRTIsCurrent extends LuceneTestCase {
for (int i = 0; i < numOps && !holder.stop; i++) {
float nextOp = random.nextFloat();
if (nextOp < 0.3) {
term.set("id", "1");
term.set("id", new BytesRef("1"));
writer.updateDocument(term, doc);
} else if (nextOp < 0.5) {
writer.addDocument(doc);
} else {
term.set("id", "1");
term.set("id", new BytesRef("1"));
writer.deleteDocuments(term);
}
if (holder.reader != currentReader) {