LUCENE-2000: clone() now returns covariant types where possible.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1306626 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan McKinley 2012-03-28 22:22:25 +00:00
parent ec18632428
commit 05fe168961
73 changed files with 93 additions and 91 deletions

View File

@ -257,6 +257,8 @@ Changes in backwards compatibility policy
you can use SlowCompositeReaderWrapper to make all parallel readers atomic
and use ParallelAtomicReader. (Uwe Schindler, Mike McCandless, Robert Muir)
* LUCENE-2000: clone() now returns covariant types where possible. (ryan)
Changes in Runtime Behavior
* LUCENE-2846: omitNorms now behaves like omitTermFrequencyAndPositions, if you

View File

@ -424,7 +424,7 @@ public class NativeUnixDirectory extends FSDirectory {
}
@Override
public Object clone() {
public NativeUnixIndexInput clone() {
try {
return new NativeUnixIndexInput(this);
} catch (IOException ioe) {

View File

@ -120,7 +120,7 @@ public class WindowsDirectory extends FSDirectory {
}
@Override
public Object clone() {
public WindowsIndexInput clone() {
WindowsIndexInput clone = (WindowsIndexInput)super.clone();
clone.isClone = true;
return clone;

View File

@ -366,7 +366,7 @@ public class Token extends CharTermAttributeImpl
}
@Override
public Object clone() {
public Token clone() {
Token t = (Token)super.clone();
// Do a deep clone
if (payload != null) {

View File

@ -208,7 +208,7 @@ public class CharTermAttributeImpl extends AttributeImpl implements CharTermAttr
}
@Override
public Object clone() {
public CharTermAttributeImpl clone() {
CharTermAttributeImpl t = (CharTermAttributeImpl)super.clone();
// Do a deep clone
t.termBuffer = new char[this.termLength];

View File

@ -58,7 +58,7 @@ public class PayloadAttributeImpl extends AttributeImpl implements PayloadAttrib
}
@Override
public Object clone() {
public PayloadAttributeImpl clone() {
PayloadAttributeImpl clone = (PayloadAttributeImpl) super.clone();
if (payload != null) {
clone.payload = (Payload) payload.clone();

View File

@ -95,7 +95,7 @@ public class BlockTermsReader extends FieldsProducer {
}
@Override
public Object clone() {
public FieldAndTerm clone() {
return new FieldAndTerm(this);
}

View File

@ -181,7 +181,7 @@ public abstract class FixedIntBlockIndexInput extends IntIndexInput {
}
@Override
public Object clone() {
public Index clone() {
Index other = new Index();
other.fp = fp;
other.upto = upto;

View File

@ -207,7 +207,7 @@ public abstract class VariableIntBlockIndexInput extends IntIndexInput {
}
@Override
public Object clone() {
public Index clone() {
Index other = new Index();
other.fp = fp;
other.upto = upto;

View File

@ -100,7 +100,7 @@ final class SegmentTermEnum implements Cloneable {
}
@Override
protected Object clone() {
protected SegmentTermEnum clone() {
SegmentTermEnum clone = null;
try {
clone = (SegmentTermEnum) super.clone();

View File

@ -111,7 +111,7 @@ final class TermBuffer implements Cloneable {
}
@Override
protected Object clone() {
protected TermBuffer clone() {
TermBuffer clone = null;
try {
clone = (TermBuffer)super.clone();

View File

@ -82,7 +82,7 @@ final class TermInfosReader {
}
@Override
public Object clone() {
public CloneableTerm clone() {
return new CloneableTerm(term);
}
}

View File

@ -105,7 +105,7 @@ public class Lucene40PostingsReader extends PostingsReaderBase {
byte[] bytes;
@Override
public Object clone() {
public StandardTermState clone() {
StandardTermState other = new StandardTermState();
other.copyFrom(this);
return other;

View File

@ -73,7 +73,7 @@ public class PulsingPostingsReader extends PostingsReaderBase {
private byte[] inlinedBytes;
@Override
public Object clone() {
public PulsingTermState clone() {
PulsingTermState clone;
clone = (PulsingTermState) super.clone();
if (postingsSize != -1) {

View File

@ -47,7 +47,7 @@ public abstract class IntIndexInput implements Closeable {
public abstract void set(Index other);
@Override
public abstract Object clone();
public abstract Index clone();
}
public abstract static class Reader {

View File

@ -161,7 +161,7 @@ public class SepPostingsReader extends PostingsReaderBase {
ByteArrayDataInput bytesReader;
@Override
public Object clone() {
public SepTermState clone() {
SepTermState other = new SepTermState();
other.copyFrom(this);
return other;

View File

@ -87,7 +87,7 @@ public final class FieldInfo {
}
@Override
public Object clone() {
public FieldInfo clone() {
return new FieldInfo(name, isIndexed, number, storeTermVector,
omitNorms, storePayloads, indexOptions, docValueType, normType);
}

View File

@ -163,7 +163,7 @@ public final class FieldInfos implements Iterable<FieldInfo> {
* Returns a deep clone of this FieldInfos instance.
*/
@Override
synchronized public Object clone() {
synchronized public FieldInfos clone() {
FieldInfos fis = new FieldInfos(globalFieldNumbers);
fis.hasFreq = hasFreq;
fis.hasProx = hasProx;

View File

@ -185,11 +185,11 @@ public final class IndexWriterConfig implements Cloneable {
}
@Override
public Object clone() {
public IndexWriterConfig clone() {
// Shallow clone is the only thing that's possible, since parameters like
// analyzer, index commit etc. do not implement Cloneable.
try {
return super.clone();
return (IndexWriterConfig)super.clone();
} catch (CloneNotSupportedException e) {
// should not happen
throw new RuntimeException(e);

View File

@ -155,7 +155,7 @@ public class Payload implements Cloneable {
* byte array.
*/
@Override
public Object clone() {
public Payload clone() {
try {
// Start with a shallow copy of data
Payload clone = (Payload) super.clone();

View File

@ -252,7 +252,7 @@ public final class SegmentInfo implements Cloneable {
}
@Override
public Object clone() {
public SegmentInfo clone() {
final SegmentInfo si = new SegmentInfo(name, docCount, dir, isCompoundFile, codec,
fieldInfos == null ? null : (FieldInfos) fieldInfos.clone());
si.docStoreOffset = docStoreOffset;

View File

@ -374,7 +374,7 @@ public final class SegmentInfos implements Cloneable, Iterable<SegmentInfo> {
*/
@Override
public Object clone() {
public SegmentInfos clone() {
try {
final SegmentInfos sis = (SegmentInfos) super.clone();
// deep clone, first recreate all collections:

View File

@ -36,9 +36,9 @@ public abstract class TermState implements Cloneable {
public abstract void copyFrom(TermState other);
@Override
public Object clone() {
public TermState clone() {
try {
return super.clone();
return (TermState)super.clone();
} catch (CloneNotSupportedException cnse) {
// should not happen
throw new RuntimeException(cnse);

View File

@ -454,7 +454,7 @@ public class BooleanQuery extends Query implements Iterable<BooleanClause> {
// The BooleanQuery clone is lazily initialized so only initialize
// it if a rewritten clause differs from the original clause (and hasn't been
// initialized already). If nothing differs, the clone isn't needlessly created
clone = (BooleanQuery)this.clone();
clone = this.clone();
}
clone.clauses.set(i, new BooleanClause(query, c.getOccur()));
}
@ -474,7 +474,7 @@ public class BooleanQuery extends Query implements Iterable<BooleanClause> {
}
@Override @SuppressWarnings("unchecked")
public Object clone() {
public BooleanQuery clone() {
BooleanQuery clone = (BooleanQuery)super.clone();
clone.clauses = (ArrayList<BooleanClause>) this.clauses.clone();
return clone;

View File

@ -200,7 +200,7 @@ public class DisjunctionMaxQuery extends Query implements Iterable<Query> {
Query clause = disjuncts.get(i);
Query rewrite = clause.rewrite(reader);
if (rewrite != clause) {
if (clone == null) clone = (DisjunctionMaxQuery)this.clone();
if (clone == null) clone = this.clone();
clone.disjuncts.set(i, rewrite);
}
}
@ -211,7 +211,7 @@ public class DisjunctionMaxQuery extends Query implements Iterable<Query> {
/** Create a shallow copy of us -- used in rewriting if necessary
* @return a copy of us (but reuse, don't copy, our subqueries) */
@Override @SuppressWarnings("unchecked")
public Object clone() {
public DisjunctionMaxQuery clone() {
DisjunctionMaxQuery clone = (DisjunctionMaxQuery)super.clone();
clone.disjuncts = (ArrayList<Query>) this.disjuncts.clone();
return clone;

View File

@ -97,9 +97,9 @@ public abstract class Query implements Cloneable {
/** Returns a clone of this query. */
@Override
public Object clone() {
public Query clone() {
try {
return super.clone();
return (Query)super.clone();
} catch (CloneNotSupportedException e) {
throw new RuntimeException("Clone not supported: " + e.getMessage());
}

View File

@ -76,7 +76,7 @@ public class PayloadNearQuery extends SpanNearQuery {
}
@Override
public Object clone() {
public PayloadNearQuery clone() {
int sz = clauses.size();
SpanQuery[] newClauses = new SpanQuery[sz];

View File

@ -61,7 +61,7 @@ public class SpanFirstQuery extends SpanPositionRangeQuery {
}
@Override
public Object clone() {
public SpanFirstQuery clone() {
SpanFirstQuery spanFirstQuery = new SpanFirstQuery((SpanQuery) match.clone(), end);
spanFirstQuery.setBoost(getBoost());
return spanFirstQuery;

View File

@ -88,7 +88,7 @@ public class SpanNearPayloadCheckQuery extends SpanPositionCheckQuery {
}
@Override
public Object clone() {
public SpanNearPayloadCheckQuery clone() {
SpanNearPayloadCheckQuery result = new SpanNearPayloadCheckQuery((SpanNearQuery) match.clone(), payloadToMatch);
result.setBoost(getBoost());
return result;

View File

@ -140,7 +140,7 @@ public class SpanNearQuery extends SpanQuery implements Cloneable {
SpanQuery query = (SpanQuery) c.rewrite(reader);
if (query != c) { // clause rewrote: must clone
if (clone == null)
clone = (SpanNearQuery) this.clone();
clone = this.clone();
clone.clauses.set(i,query);
}
}
@ -152,7 +152,7 @@ public class SpanNearQuery extends SpanQuery implements Cloneable {
}
@Override
public Object clone() {
public SpanNearQuery clone() {
int sz = clauses.size();
SpanQuery[] newClauses = new SpanQuery[sz];

View File

@ -71,7 +71,7 @@ public class SpanNotQuery extends SpanQuery implements Cloneable {
}
@Override
public Object clone() {
public SpanNotQuery clone() {
SpanNotQuery spanNotQuery = new SpanNotQuery((SpanQuery)include.clone(),(SpanQuery) exclude.clone());
spanNotQuery.setBoost(getBoost());
return spanNotQuery;
@ -175,12 +175,12 @@ public class SpanNotQuery extends SpanQuery implements Cloneable {
SpanQuery rewrittenInclude = (SpanQuery) include.rewrite(reader);
if (rewrittenInclude != include) {
clone = (SpanNotQuery) this.clone();
clone = this.clone();
clone.include = rewrittenInclude;
}
SpanQuery rewrittenExclude = (SpanQuery) exclude.rewrite(reader);
if (rewrittenExclude != exclude) {
if (clone == null) clone = (SpanNotQuery) this.clone();
if (clone == null) clone = this.clone();
clone.exclude = rewrittenExclude;
}

View File

@ -76,7 +76,7 @@ public class SpanOrQuery extends SpanQuery implements Cloneable {
}
@Override
public Object clone() {
public SpanOrQuery clone() {
int sz = clauses.size();
SpanQuery[] newClauses = new SpanQuery[sz];
@ -96,7 +96,7 @@ public class SpanOrQuery extends SpanQuery implements Cloneable {
SpanQuery query = (SpanQuery) c.rewrite(reader);
if (query != c) { // clause rewrote: must clone
if (clone == null)
clone = (SpanOrQuery) this.clone();
clone = this.clone();
clone.clauses.set(i,query);
}
}

View File

@ -90,7 +90,7 @@ public class SpanPayloadCheckQuery extends SpanPositionCheckQuery{
}
@Override
public Object clone() {
public SpanPayloadCheckQuery clone() {
SpanPayloadCheckQuery result = new SpanPayloadCheckQuery((SpanQuery) match.clone(), payloadToMatch);
result.setBoost(getBoost());
return result;

View File

@ -77,7 +77,7 @@ public class SpanPositionRangeQuery extends SpanPositionCheckQuery {
}
@Override
public Object clone() {
public SpanPositionRangeQuery clone() {
SpanPositionRangeQuery result = new SpanPositionRangeQuery((SpanQuery) match.clone(), start, end);
result.setBoost(getBoost());
return result;

View File

@ -306,7 +306,7 @@ public abstract class BufferedIndexInput extends IndexInput {
protected abstract void seekInternal(long pos) throws IOException;
@Override
public Object clone() {
public BufferedIndexInput clone() {
BufferedIndexInput clone = (BufferedIndexInput)super.clone();
clone.buffer = null;

View File

@ -184,7 +184,7 @@ public abstract class DataInput implements Cloneable {
* were cloned from.
*/
@Override
public Object clone() {
public DataInput clone() {
DataInput clone = null;
try {
clone = (DataInput)super.clone();

View File

@ -284,7 +284,7 @@ public abstract class Directory implements Closeable {
}
@Override
public Object clone() {
public SlicedIndexInput clone() {
SlicedIndexInput clone = (SlicedIndexInput)super.clone();
clone.base = (IndexInput)base.clone();
clone.fileOffset = fileOffset;

View File

@ -412,7 +412,7 @@ public class MMapDirectory extends FSDirectory {
}
@Override
public Object clone() {
public MMapIndexInput clone() {
if (buffers == null) {
throw new AlreadyClosedException("MMapIndexInput already closed: " + this);
}

View File

@ -193,7 +193,7 @@ public class SimpleFSDirectory extends FSDirectory {
}
@Override
public Object clone() {
public SimpleFSIndexInput clone() {
SimpleFSIndexInput clone = (SimpleFSIndexInput)super.clone();
clone.isClone = true;
return clone;

View File

@ -123,10 +123,10 @@ public abstract class AttributeImpl implements Cloneable, Attribute {
* need to clone any members deeply,
*/
@Override
public Object clone() {
Object clone = null;
public AttributeImpl clone() {
AttributeImpl clone = null;
try {
clone = super.clone();
clone = (AttributeImpl)super.clone();
} catch (CloneNotSupportedException e) {
throw new RuntimeException(e); // shouldn't happen
}

View File

@ -101,12 +101,12 @@ public class AttributeSource {
State next;
@Override
public Object clone() {
public State clone() {
State clone = new State();
clone.attribute = (AttributeImpl) attribute.clone();
clone.attribute = attribute.clone();
if (next != null) {
clone.next = (State) next.clone();
clone.next = next.clone();
}
return clone;

View File

@ -47,7 +47,7 @@ final public class DoubleBarrelLRUCache<K extends DoubleBarrelLRUCache.Cloneable
/** Object providing clone(); the key class must subclass this. */
public static abstract class CloneableKey {
@Override
abstract public Object clone();
abstract public CloneableKey clone();
}
private final Map<K,V> cache1;

View File

@ -389,7 +389,7 @@ public final class FixedBitSet extends DocIdSet implements Bits {
}
@Override
public Object clone() {
public FixedBitSet clone() {
return new FixedBitSet(this);
}

View File

@ -731,7 +731,7 @@ public class OpenBitSet extends DocIdSet implements Bits, Cloneable {
}
@Override
public Object clone() {
public OpenBitSet clone() {
try {
OpenBitSet obs = (OpenBitSet)super.clone();
obs.bits = obs.bits.clone(); // hopefully an array clone is as fast(er) than arraycopy

View File

@ -415,7 +415,7 @@ public final class PagedBytes {
}
@Override
public Object clone() {
public PagedBytesDataInput clone() {
PagedBytesDataInput clone = getDataInput();
clone.setPosition(getPosition());
return clone;

View File

@ -117,7 +117,7 @@ public class Test2BTerms extends LuceneTestCase {
}
@Override
public Object clone() {
public MyTermAttributeImpl clone() {
throw new UnsupportedOperationException();
}
}

View File

@ -183,7 +183,7 @@ public class TestFieldsReader extends LuceneTestCase {
delegate.close();
}
@Override
public Object clone() {
public FaultyIndexInput clone() {
return new FaultyIndexInput((IndexInput) delegate.clone());
}
}

View File

@ -225,7 +225,7 @@ public class TestLazyProxSkipping extends LuceneTestCase {
}
@Override
public Object clone() {
public SeeksCountingStream clone() {
return new SeeksCountingStream((IndexInput) this.input.clone());
}

View File

@ -190,7 +190,7 @@ public class TestMultiLevelSkipList extends LuceneTestCase {
}
@Override
public Object clone() {
public CountingStream clone() {
return new CountingStream((IndexInput) this.input.clone());
}

View File

@ -156,7 +156,7 @@ public class TestDoubleBarrelLRUCache extends LuceneTestCase {
}
@Override
public Object clone() {
public CloneableObject clone() {
return new CloneableObject(value);
}
}
@ -179,7 +179,7 @@ public class TestDoubleBarrelLRUCache extends LuceneTestCase {
}
@Override
public Object clone() {
public CloneableInteger clone() {
return new CloneableInteger(value);
}
}

View File

@ -99,7 +99,7 @@ public class MockSingleIntIndexInput extends IntIndexInput {
}
@Override
public Object clone() {
public Index clone() {
Index other = new Index();
other.fp = fp;
return other;

View File

@ -65,7 +65,7 @@ public class MockIndexInputWrapper extends IndexInput {
}
@Override
public Object clone() {
public MockIndexInputWrapper clone() {
ensureOpen();
dir.inputCloneCount.incrementAndGet();
IndexInput iiclone = (IndexInput) delegate.clone();

View File

@ -80,7 +80,7 @@ public class CharVector implements Cloneable {
}
@Override
public Object clone() {
public CharVector clone() {
CharVector cv = new CharVector(array.clone(), blockSize);
cv.n = this.n;
return cv;

View File

@ -348,7 +348,7 @@ public class TernaryTree implements Cloneable {
}
@Override
public Object clone() {
public TernaryTree clone() {
TernaryTree t = new TernaryTree();
t.lo = this.lo.clone();
t.hi = this.hi.clone();
@ -484,7 +484,7 @@ public class TernaryTree implements Cloneable {
}
@Override
public Object clone() {
public Item clone() {
return new Item(parent, child);
}

View File

@ -113,9 +113,9 @@ public abstract class CharArrayIterator implements CharacterIterator {
}
@Override
public Object clone() {
public CharArrayIterator clone() {
try {
return super.clone();
return (CharArrayIterator)super.clone();
} catch (CloneNotSupportedException e) {
// CharacterIterator does not allow you to throw CloneNotSupported
throw new RuntimeException(e);

View File

@ -109,7 +109,7 @@ final class CharArrayIterator implements CharacterIterator {
}
@Override
public Object clone() {
public CharArrayIterator clone() {
CharArrayIterator clone = new CharArrayIterator();
clone.setText(array, start, length);
clone.index = index;

View File

@ -211,7 +211,7 @@ public class LaoBreakIterator extends BreakIterator {
* @return The clone.
*/
@Override
public Object clone() {
public LaoBreakIterator clone() {
LaoBreakIterator other = (LaoBreakIterator) super.clone();
other.rules = (RuleBasedBreakIterator) rules.clone();
other.verify = (RuleBasedBreakIterator) verify.clone();

View File

@ -83,7 +83,7 @@ public class MorphosyntacticTagAttributeImpl extends AttributeImpl
((MorphosyntacticTagAttribute) target).setTag(this.tag);
}
public Object clone() {
public MorphosyntacticTagAttributeImpl clone() {
MorphosyntacticTagAttributeImpl cloned = new MorphosyntacticTagAttributeImpl();
cloned.tag = (tag == null ? null : tag.toString());
return cloned;

View File

@ -208,7 +208,7 @@ public class TaskStats implements Cloneable {
* @see java.lang.Object#clone()
*/
@Override
public Object clone() throws CloneNotSupportedException {
public TaskStats clone() throws CloneNotSupportedException {
TaskStats c = (TaskStats) super.clone();
if (c.countsByTime != null) {
c.countsByTime = c.countsByTime.clone();

View File

@ -111,10 +111,10 @@ public abstract class PerfTask implements Cloneable {
}
@Override
protected Object clone() throws CloneNotSupportedException {
protected PerfTask clone() throws CloneNotSupportedException {
// tasks having non primitive data structures should override this.
// otherwise parallel running of a task sequence might not run correctly.
return super.clone();
return (PerfTask)super.clone();
}
public void close() throws Exception {

View File

@ -508,7 +508,7 @@ public class TaskSequence extends PerfTask {
* @see java.lang.Object#clone()
*/
@Override
protected Object clone() throws CloneNotSupportedException {
protected TaskSequence clone() throws CloneNotSupportedException {
TaskSequence res = (TaskSequence) super.clone();
res.tasks = new ArrayList<PerfTask>();
for (int i = 0; i < tasks.size(); i++) {

View File

@ -121,7 +121,7 @@ public final class CategoryAttributeImpl extends AttributeImpl implements
@SuppressWarnings("unchecked")
@Override
public CategoryAttribute clone() {
public CategoryAttributeImpl clone() {
CategoryAttributeImpl ca = (CategoryAttributeImpl) super.clone();
if (categoryPath != null) {
ca.categoryPath = (CategoryPath) categoryPath.clone();

View File

@ -114,9 +114,9 @@ public abstract class FacetRequest implements Cloneable {
}
@Override
public Object clone() throws CloneNotSupportedException {
public FacetRequest clone() throws CloneNotSupportedException {
// Overridden to make it public
return super.clone();
return (FacetRequest)super.clone();
}
public void setNumLabel(int numLabel) {

View File

@ -622,7 +622,7 @@ public class CategoryPath implements Serializable, Cloneable, Comparable<Categor
}
@Override
public Object clone() {
public CategoryPath clone() {
return new CategoryPath(this);
}

View File

@ -107,7 +107,7 @@ public class SlowRAMDirectory extends RAMDirectory {
ii.readBytes(b, offset, len);
}
@Override public Object clone() { return ii.clone(); }
@Override public IndexInput clone() { return (IndexInput)ii.clone(); }
@Override public void close() throws IOException { ii.close(); }
@Override public boolean equals(Object o) { return ii.equals(o); }
@Override public long getFilePointer() { return ii.getFilePointer(); }

View File

@ -335,7 +335,7 @@ public class ToChildBlockJoinQuery extends Query {
}
@Override
public Object clone() {
public ToChildBlockJoinQuery clone() {
return new ToChildBlockJoinQuery((Query) origParentQuery.clone(),
parentsFilter,
doScores);

View File

@ -450,7 +450,7 @@ public class ToParentBlockJoinQuery extends Query {
}
@Override
public Object clone() {
public ToParentBlockJoinQuery clone() {
return new ToParentBlockJoinQuery((Query) origChildQuery.clone(),
parentsFilter,
scoreMode);

View File

@ -114,7 +114,7 @@ public class CustomScoreQuery extends Query {
/*(non-Javadoc) @see org.apache.lucene.search.Query#clone() */
@Override
public Object clone() {
public CustomScoreQuery clone() {
CustomScoreQuery clone = (CustomScoreQuery)super.clone();
clone.subQuery = (Query) subQuery.clone();
clone.scoringQueries = new Query[scoringQueries.length];

View File

@ -131,7 +131,7 @@ public abstract class QueryNodeImpl implements QueryNode, Cloneable {
}
@Override
public Object clone() throws CloneNotSupportedException {
public QueryNode clone() throws CloneNotSupportedException {
return cloneTree();
}

View File

@ -74,7 +74,7 @@ abstract class RewriteQuery<SQ extends SrndQuery> extends Query {
/** @throws UnsupportedOperationException */
@Override
public Object clone() {
public RewriteQuery clone() {
throw new UnsupportedOperationException();
}
}

View File

@ -62,9 +62,9 @@ public abstract class SrndQuery implements Cloneable {
public boolean isFieldsSubQueryAcceptable() {return true;}
@Override
public Object clone() {
public SrndQuery clone() {
try {
return super.clone();
return (SrndQuery)super.clone();
} catch (CloneNotSupportedException cns) {
throw new Error(cns);
}

View File

@ -401,7 +401,7 @@ public class DateField extends PrimitiveFieldType {
}
@Override
public Object clone() {
public DateFormat clone() {
ISO8601CanonicalDateFormat c
= (ISO8601CanonicalDateFormat) super.clone();
c.millisParser = NumberFormat.getIntegerInstance(CANONICAL_LOCALE);

View File

@ -69,7 +69,7 @@ public class WrappedQuery extends ExtendedQueryBase {
}
@Override
public Object clone() {
public WrappedQuery clone() {
WrappedQuery newQ = (WrappedQuery)super.clone();
newQ.q = (Query) q.clone();
return newQ;