mirror of https://github.com/apache/lucene.git
added synchronization to prevent threads from seeing inconsistent name / number mappings when asserting for consistency
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1087427 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
937ee38c7f
commit
004524dbec
|
@ -187,7 +187,7 @@ public final class FieldInfos implements Iterable<FieldInfo> {
|
|||
}
|
||||
|
||||
// used by assert
|
||||
boolean containsConsistent(Integer number, String name) {
|
||||
synchronized boolean containsConsistent(Integer number, String name) {
|
||||
return name.equals(numberToName.get(number))
|
||||
&& number.equals(nameToNumber.get(name));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue