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 2012/02/15 08:02:31 UTC

svn commit: r1244380 - /lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java

Author: shaie
Date: Wed Feb 15 07:02:31 2012
New Revision: 1244380

URL: http://svn.apache.org/viewvc?rev=1244380&view=rev
Log:
fix DocMaker file handle leak: now with the actual fix :)

Modified:
    lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java

Modified: lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java?rev=1244380&r1=1244379&r2=1244380&view=diff
==============================================================================
--- lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java (original)
+++ lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java Wed Feb 15 07:02:31 2012
@@ -428,9 +428,9 @@ public class DocMaker implements Closeab
   public void setConfig(Config config) {
     this.config = config;
     try {
-      if (source != null) {
-        source.close();
-      }
+        if (source != null) {
+          source.close();
+        }
       String sourceClass = config.get("content.source", "org.apache.lucene.benchmark.byTask.feeds.SingleDocSource");
       source = Class.forName(sourceClass).asSubclass(ContentSource.class).newInstance();
       source.setConfig(config);