mirror of https://github.com/apache/lucene.git
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:
parent
d2665fd86e
commit
8535534a0d
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue