You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by do...@apache.org on 2011/10/04 21:52:01 UTC

svn commit: r1178931 - in /lucene/dev/branches/branch_3x: ./ lucene/ lucene/contrib/CHANGES.txt lucene/contrib/facet/src/java/org/apache/lucene/facet/taxonomy/lucene/LuceneTaxonomyWriter.java solr/

Author: doronc
Date: Tue Oct  4 19:52:01 2011
New Revision: 1178931

URL: http://svn.apache.org/viewvc?rev=1178931&view=rev
Log:
LUCENE-3484: Fix NPE in TaxonomyWriter: parents array creation was not thread safe. (merge from trunk)

Modified:
    lucene/dev/branches/branch_3x/   (props changed)
    lucene/dev/branches/branch_3x/lucene/   (props changed)
    lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt
    lucene/dev/branches/branch_3x/lucene/contrib/facet/src/java/org/apache/lucene/facet/taxonomy/lucene/LuceneTaxonomyWriter.java
    lucene/dev/branches/branch_3x/solr/   (props changed)

Modified: lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt?rev=1178931&r1=1178930&r2=1178931&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt (original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt Tue Oct  4 19:52:01 2011
@@ -51,6 +51,9 @@ 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.
+   (Doron Cohen)
 
 API Changes
  

Modified: lucene/dev/branches/branch_3x/lucene/contrib/facet/src/java/org/apache/lucene/facet/taxonomy/lucene/LuceneTaxonomyWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/facet/src/java/org/apache/lucene/facet/taxonomy/lucene/LuceneTaxonomyWriter.java?rev=1178931&r1=1178930&r2=1178931&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/facet/src/java/org/apache/lucene/facet/taxonomy/lucene/LuceneTaxonomyWriter.java (original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/facet/src/java/org/apache/lucene/facet/taxonomy/lucene/LuceneTaxonomyWriter.java Tue Oct  4 19:52:01 2011
@@ -702,9 +702,8 @@ public class LuceneTaxonomyWriter implem
     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();