You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2016/04/15 15:33:40 UTC
lucene-solr:master: SOLR-8995: Replace anonymous implementations of
SAM interfaces with Lambdas
Repository: lucene-solr
Updated Branches:
refs/heads/master a07a8499d -> 09f92b7ed
SOLR-8995: Replace anonymous implementations of SAM interfaces with Lambdas
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/09f92b7e
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/09f92b7e
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/09f92b7e
Branch: refs/heads/master
Commit: 09f92b7edf2cf63200c9f4be483ee333f036a528
Parents: a07a849
Author: Noble Paul <no...@apache.org>
Authored: Fri Apr 15 19:03:22 2016 +0530
Committer: Noble Paul <no...@apache.org>
Committed: Fri Apr 15 19:03:22 2016 +0530
----------------------------------------------------------------------
.../src/java/org/apache/solr/core/SolrCore.java | 31 +++++++++-----------
1 file changed, 14 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/09f92b7e/solr/core/src/java/org/apache/solr/core/SolrCore.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/core/SolrCore.java b/solr/core/src/java/org/apache/solr/core/SolrCore.java
index 3e10efe..faac0a2 100644
--- a/solr/core/src/java/org/apache/solr/core/SolrCore.java
+++ b/solr/core/src/java/org/apache/solr/core/SolrCore.java
@@ -1822,25 +1822,22 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
final RefCounted<SolrIndexSearcher> currSearcherHolderF = currSearcherHolder;
if (!alreadyRegistered) {
future = searcherExecutor.submit(
- new Callable() {
- @Override
- public Object call() throws Exception {
- try {
- // registerSearcher will decrement onDeckSearchers and
- // do a notify, even if it fails.
- registerSearcher(newSearchHolder);
- } catch (Throwable e) {
- SolrException.log(log, 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();
+ () -> {
+ try {
+ // registerSearcher will decrement onDeckSearchers and
+ // do a notify, even if it fails.
+ registerSearcher(newSearchHolder);
+ } catch (Throwable e) {
+ SolrException.log(log, e);
+ if (e instanceof Error) {
+ throw (Error) e;
}
- return null;
+ } finally {
+ // we are all done with the old searcher we used
+ // for warming...
+ if (currSearcherHolderF!=null) currSearcherHolderF.decref();
}
+ return null;
}
);
}