LUCENE-2674: avoid Object.clone in Standard codec's term state

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1045081 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2010-12-13 11:52:28 +00:00
parent d2665fd86e
commit 8535534a0d
1 changed files with 4 additions and 5 deletions

View File

@ -82,16 +82,15 @@ public class StandardPostingsReader extends PostingsReaderBase {
maxSkipLevels = termsIn.readInt();
}
private static class DocTermState extends TermState {
// Must keep final because we do non-standard clone
private final static class DocTermState extends TermState {
long freqOffset;
long proxOffset;
int skipOffset;
public Object clone() {
DocTermState other = (DocTermState) super.clone();
other.freqOffset = freqOffset;
other.proxOffset = proxOffset;
other.skipOffset = skipOffset;
DocTermState other = new DocTermState();
other.copy(this);
return other;
}