mirror of https://github.com/apache/lucene.git
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:
parent
04e66785ca
commit
18788016a8
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue