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/08 17:41:42 UTC
svn commit: r1241965 -
/lucene/dev/branches/branch_3x/lucene/core/src/java/org/apache/lucene/search/SearcherManager.java
Author: shaie
Date: Wed Feb 8 16:41:41 2012
New Revision: 1241965
URL: http://svn.apache.org/viewvc?rev=1241965&view=rev
Log:
remove dead code from SearcherManager.swapSearcher - the method is synchronized and it is the only one that modifies currentSearcher, and therefore the 'if' cannot happen (it will fail in ensureOpen if currentSearcher is null).
Modified:
lucene/dev/branches/branch_3x/lucene/core/src/java/org/apache/lucene/search/SearcherManager.java
Modified: lucene/dev/branches/branch_3x/lucene/core/src/java/org/apache/lucene/search/SearcherManager.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/core/src/java/org/apache/lucene/search/SearcherManager.java?rev=1241965&r1=1241964&r2=1241965&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/core/src/java/org/apache/lucene/search/SearcherManager.java (original)
+++ lucene/dev/branches/branch_3x/lucene/core/src/java/org/apache/lucene/search/SearcherManager.java Wed Feb 8 16:41:41 2012
@@ -231,10 +231,6 @@ public final class SearcherManager imple
private synchronized void swapSearcher(IndexSearcher newSearcher) throws IOException {
ensureOpen();
- // Don't allow un-closing!
- if (currentSearcher == null && newSearcher != null) {
- throw new AlreadyClosedException("this SearcherManager is closed");
- }
final IndexSearcher oldSearcher = currentSearcher;
currentSearcher = newSearcher;
release(oldSearcher);