LUCENE-5341: fix RAMDirectory to override getLockID()

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1564412 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shai Erera 2014-02-04 18:32:03 +00:00
parent 04e66785ca
commit 18788016a8
2 changed files with 8 additions and 2 deletions

View File

@ -157,7 +157,7 @@ public abstract class Directory implements Closeable {
@Override
public String toString() {
return super.toString() + " lockFactory=" + getLockFactory();
return getClass().getSimpleName() + '@' + Integer.toHexString(hashCode()) + " lockFactory=" + getLockFactory();
}
/**

View File

@ -102,6 +102,11 @@ public class RAMDirectory extends BaseDirectory {
}
}
@Override
public String getLockID() {
return "lucene-" + Integer.toHexString(hashCode());
}
@Override
public final String[] listAll() {
ensureOpen();
@ -201,4 +206,5 @@ public class RAMDirectory extends BaseDirectory {
isOpen = false;
fileMap.clear();
}
}