mirror of https://github.com/apache/lucene.git
LUCENE-3484: Fix NPE in TaxonomyWriter: parents array creation was not thread safe.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1178923 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2a73ef7e6c
commit
e1560a8e81
|
@ -110,6 +110,8 @@ Bug Fixes
|
|||
* LUCENE-3446: Fix NPE in BooleanFilter when DocIdSet/DocIdSetIterator is null.
|
||||
Converted code to FixedBitSet and simplified. (Uwe Schindler, Shuji Umino)
|
||||
|
||||
* LUCENE-3484: Fix NPE in TaxonomyWriter: parents array creation was not thread safe.
|
||||
|
||||
API Changes
|
||||
|
||||
* LUCENE-3436: Add SuggestMode to the spellchecker, so you can specify the strategy
|
||||
|
|
|
@ -709,9 +709,8 @@ public class LuceneTaxonomyWriter implements TaxonomyWriter {
|
|||
return true;
|
||||
}
|
||||
|
||||
// TODO (Facet): synchronization of some sort?
|
||||
private ParentArray parentArray;
|
||||
private ParentArray getParentArray() throws IOException {
|
||||
private synchronized ParentArray getParentArray() throws IOException {
|
||||
if (parentArray==null) {
|
||||
if (reader == null) {
|
||||
reader = openReader();
|
||||
|
|
Loading…
Reference in New Issue