mirror of https://github.com/apache/lucene.git
SOLR-8995: Replace anonymous implementations of SAM interfaces with Lambdas
This commit is contained in:
parent
a07a8499d3
commit
09f92b7edf
|
@ -1822,25 +1822,22 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
|
||||||
final RefCounted<SolrIndexSearcher> currSearcherHolderF = currSearcherHolder;
|
final RefCounted<SolrIndexSearcher> currSearcherHolderF = currSearcherHolder;
|
||||||
if (!alreadyRegistered) {
|
if (!alreadyRegistered) {
|
||||||
future = searcherExecutor.submit(
|
future = searcherExecutor.submit(
|
||||||
new Callable() {
|
() -> {
|
||||||
@Override
|
try {
|
||||||
public Object call() throws Exception {
|
// registerSearcher will decrement onDeckSearchers and
|
||||||
try {
|
// do a notify, even if it fails.
|
||||||
// registerSearcher will decrement onDeckSearchers and
|
registerSearcher(newSearchHolder);
|
||||||
// do a notify, even if it fails.
|
} catch (Throwable e) {
|
||||||
registerSearcher(newSearchHolder);
|
SolrException.log(log, e);
|
||||||
} catch (Throwable e) {
|
if (e instanceof Error) {
|
||||||
SolrException.log(log, e);
|
throw (Error) e;
|
||||||
if (e instanceof Error) {
|
|
||||||
throw (Error) e;
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
// we are all done with the old searcher we used
|
|
||||||
// for warming...
|
|
||||||
if (currSearcherHolderF!=null) currSearcherHolderF.decref();
|
|
||||||
}
|
}
|
||||||
return null;
|
} finally {
|
||||||
|
// we are all done with the old searcher we used
|
||||||
|
// for warming...
|
||||||
|
if (currSearcherHolderF!=null) currSearcherHolderF.decref();
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue