// TODO: Deep clone is more correct, but probably does not matter in practice
@Override
    public QueryProfileVariant clone() {
        if (frozen) return this;
       try {
           QueryProfileVariant clone = (QueryProfileVariant)super.clone();
           if (this.inherited != null)
               clone.inherited = new ArrayList<>(this.inherited); // TODO: Deep clone is more correct, but probably does not matter in practice
           clone.values = CopyOnWriteContent.deepClone(this.values);
           return clone;
       }
       catch (CloneNotSupportedException e) {
           throw new RuntimeException(e);
       }
    }
QueryProfileVariant clone = (QueryProfileVariant)super.clone();
if (this.inherited != null)
clone.inherited = new ArrayList<>(this.inherited); // TODO: Deep clone is more correct, but probably does not matter in practice
clone.values = CopyOnWriteContent.deepClone(this.values);
return clone;
@Override
public QueryProfileVariant clone() {
if (frozen) return this;
try {
QueryProfileVariant clone = (QueryProfileVariant)super.clone();
if (this.inherited != null)
clone.inherited = new ArrayList<>(this.inherited); // TODO: Deep clone is more correct, but probably does not matter in practice
clone.values = CopyOnWriteContent.deepClone(this.values);
return clone;
}
catch (CloneNotSupportedException e) {
throw new RuntimeException(e);
}
}
@Override
public QueryProfileVariant clone() {
if (frozen) return this;
try {
QueryProfileVariant clone = (QueryProfileVariant)super.clone();
if (this.inherited != null)
clone.inherited = new ArrayList<>(this.inherited); // TODO: Deep clone is more correct, but probably does not matter in practice
clone.values = CopyOnWriteContent.deepClone(this.values);
return clone;
}
catch (CloneNotSupportedException e) {
throw new RuntimeException(e);
}
}