Make previous change thread-safe.

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@156447 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Doug Cutting 2005-03-07 20:50:36 +00:00
parent c33696e120
commit ff6cb58371
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ final class TermInfosReader {
return termEnum;
}
private final void ensureIndexIsRead() throws IOException {
private synchronized void ensureIndexIsRead() throws IOException {
if (indexTerms != null) // index already read
return; // do nothing
try {