You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2013/05/16 15:23:10 UTC

svn commit: r1483349 - in /lucene/dev/branches/lucene_solr_4_3: ./ lucene/ lucene/benchmark/ lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ lucene/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/

Author: shalin
Date: Thu May 16 13:23:09 2013
New Revision: 1483349

URL: http://svn.apache.org/r1483349
Log:
LUCENE-4974: CommitIndexTask broken if no params are set

Added:
    lucene/dev/branches/lucene_solr_4_3/lucene/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/CommitIndexTaskTest.java
      - copied unchanged from r1478275, lucene/dev/branches/branch_4x/lucene/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/CommitIndexTaskTest.java
Modified:
    lucene/dev/branches/lucene_solr_4_3/   (props changed)
    lucene/dev/branches/lucene_solr_4_3/lucene/   (props changed)
    lucene/dev/branches/lucene_solr_4_3/lucene/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/lucene_solr_4_3/lucene/benchmark/   (props changed)
    lucene/dev/branches/lucene_solr_4_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/CommitIndexTask.java

Modified: lucene/dev/branches/lucene_solr_4_3/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_3/lucene/CHANGES.txt?rev=1483349&r1=1483348&r2=1483349&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_3/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/lucene_solr_4_3/lucene/CHANGES.txt Thu May 16 13:23:09 2013
@@ -32,6 +32,8 @@ Bug Fixes
 * LUCENE-4970: Fix boost value of rewritten NGramPhraseQuery.
   (Shingo Sasaki via Adrien Grand)
 
+* LUCENE-4974: CommitIndexTask was broken if no params were set. (Shai Erera)
+
 ======================= Lucene 4.3.0 =======================
 
 Changes in backwards compatibility policy

Modified: lucene/dev/branches/lucene_solr_4_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/CommitIndexTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/CommitIndexTask.java?rev=1483349&r1=1483348&r2=1483349&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/CommitIndexTask.java (original)
+++ lucene/dev/branches/lucene_solr_4_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/CommitIndexTask.java Thu May 16 13:23:09 2013
@@ -1,4 +1,5 @@
 package org.apache.lucene.benchmark.byTask.tasks;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -49,7 +50,9 @@ public class CommitIndexTask extends Per
   public int doLogic() throws Exception {
     IndexWriter iw = getRunData().getIndexWriter();
     if (iw != null) {
-      iw.setCommitData(commitUserData);
+      if (commitUserData != null) {
+        iw.setCommitData(commitUserData);
+      }
       iw.commit();
     }