lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1416274 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/core/ lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
Date Sun, 02 Dec 2012 21:59:00 GMT
Author: mikemccand
Date: Sun Dec  2 21:59:00 2012
New Revision: 1416274

URL: http://svn.apache.org/viewvc?rev=1416274&view=rev
Log:
rename confusing boolean param to IndexWriter.ensureOpen

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java

Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java?rev=1416274&r1=1416273&r2=1416274&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
(original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
Sun Dec  2 21:59:00 2012
@@ -545,10 +545,15 @@ public class IndexWriter implements Clos
    * Used internally to throw an {@link
    * AlreadyClosedException} if this IndexWriter has been
    * closed.
-   * @throws AlreadyClosedException if this IndexWriter is closed
+   * @throws AlreadyClosedException if this IndexWriter is
+   * closed
+   * @param failIfClosing if true, also fail when
+   * {@code IndexWriter} is in the process of closing
+   * ({@code closing=true}) but not yet done closing ({@code
+   * closed=false})
    */
-  protected final void ensureOpen(boolean includePendingClose) throws AlreadyClosedException
{
-    if (closed || (includePendingClose && closing)) {
+  protected final void ensureOpen(boolean failIfClosing) throws AlreadyClosedException {
+    if (closed || (failIfClosing && closing)) {
       throw new AlreadyClosedException("this IndexWriter is closed");
     }
   }
@@ -556,7 +561,8 @@ public class IndexWriter implements Clos
   /**
    * Used internally to throw an {@link
    * AlreadyClosedException} if this IndexWriter has been
-   * closed.
+   * closed ({@code closed=true}) or is in the process of
+   * closing ({@code closing=true}).
    * <p>
    * Calls {@link #ensureOpen(boolean) ensureOpen(true)}.
    * @throws AlreadyClosedException if this IndexWriter is closed



Mime
View raw message