MockRAMInputStream clone = (MockRAMInputStream) super.clone();
clone.isClone = true;
// Pending resolution on LUCENE-686 we may want to
// uncomment this code so that we also track that all
// clones get closed:
/*
synchronized(dir.openFiles) {
if (dir.openFiles.containsKey(name)) {
Integer v = (Integer) dir.openFiles.get(name);
v = new Integer(v.intValue()+1);
dir.openFiles.put(name, v);
} else {
throw new RuntimeException("BUG: cloned file was not open?");
}
}
*/
return clone;