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:41:30 UTC

[1/3] lucene-solr:branch_6x: SOLR-8995: Replace anonymous implementations of SAM interfaces with Lambdas

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x e6bcb131a -> b2a9a787b


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/f82a27aa
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f82a27aa
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f82a27aa

Branch: refs/heads/branch_6x
Commit: f82a27aa5c2aa973f7b02007324b3372ffd2df07
Parents: 6c74669
Author: Noble Paul <no...@apache.org>
Authored: Fri Apr 15 18:58:08 2016 +0530
Committer: Noble Paul <no...@apache.org>
Committed: Fri Apr 15 19:04:44 2016 +0530

----------------------------------------------------------------------
 .../apache/solr/cloud/rule/RemoteCallback.java   |  2 +-
 .../solr/handler/NestedRequestHandler.java       |  2 +-
 .../solr/handler/component/QueryComponent.java   | 11 +++--------
 .../EndResultTransformer.java                    |  2 +-
 .../org/apache/solr/update/SolrCoreState.java    |  2 +-
 .../org/apache/solr/cloud/TestCryptoKeys.java    |  7 +------
 .../org/apache/solr/core/TestDynamicLoading.java |  7 +------
 .../apache/solr/handler/TestConfigReload.java    |  7 +------
 .../apache/solr/handler/TestReqParamsAPI.java    |  7 +------
 .../solr/handler/TestSolrConfigHandlerCloud.java |  7 +------
 .../handler/TestSolrConfigHandlerConcurrent.java |  7 +------
 .../solr/schema/TestBulkSchemaConcurrent.java    |  7 +------
 .../schema/TestCloudManagedSchemaConcurrent.java | 19 +++----------------
 .../apache/solr/schema/TestCloudSchemaless.java  |  7 +------
 .../processor/TestNamedUpdateProcessors.java     |  7 +------
 .../apache/solr/common/util/JavaBinCodec.java    |  8 ++++----
 .../apache/solr/util/RESTfulServerProvider.java  |  2 +-
 .../java/org/apache/solr/util/RestTestBase.java  |  7 +------
 18 files changed, 25 insertions(+), 93 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f82a27aa/solr/core/src/java/org/apache/solr/cloud/rule/RemoteCallback.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/rule/RemoteCallback.java b/solr/core/src/java/org/apache/solr/cloud/rule/RemoteCallback.java
index 5b6987d..ca3662e 100644
--- a/solr/core/src/java/org/apache/solr/cloud/rule/RemoteCallback.java
+++ b/solr/core/src/java/org/apache/solr/cloud/rule/RemoteCallback.java
@@ -19,5 +19,5 @@ package org.apache.solr.cloud.rule;
 import java.util.Map;
 
 public interface RemoteCallback {
-  public void remoteCallback(SnitchContext ctx, Map<String, Object> returnedVal) ;
+  void remoteCallback(SnitchContext ctx, Map<String, Object> returnedVal);
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f82a27aa/solr/core/src/java/org/apache/solr/handler/NestedRequestHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/NestedRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/NestedRequestHandler.java
index d940974..947a339 100644
--- a/solr/core/src/java/org/apache/solr/handler/NestedRequestHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/NestedRequestHandler.java
@@ -24,5 +24,5 @@ import org.apache.solr.request.SolrRequestHandler;
 public interface NestedRequestHandler {
   /** Return a Requestandler to handle a subpath from the path this handler is registered.
    */
-  public SolrRequestHandler getSubHandler(String subPath);
+  SolrRequestHandler getSubHandler(String subPath);
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f82a27aa/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
index 75238ab..58da1e9 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
@@ -794,14 +794,9 @@ public class QueryComponent extends SearchComponent
       rb.resultIds = new HashMap<>();
     }
 
-    EndResultTransformer.SolrDocumentSource solrDocumentSource = new EndResultTransformer.SolrDocumentSource() {
-
-      @Override
-      public SolrDocument retrieve(ScoreDoc doc) {
-        ShardDoc solrDoc = (ShardDoc) doc;
-        return rb.retrievedDocuments.get(solrDoc.id);
-      }
-
+    EndResultTransformer.SolrDocumentSource solrDocumentSource = doc -> {
+      ShardDoc solrDoc = (ShardDoc) doc;
+      return rb.retrievedDocuments.get(solrDoc.id);
     };
     EndResultTransformer endResultTransformer;
     if (groupSpec.isMain()) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f82a27aa/solr/core/src/java/org/apache/solr/search/grouping/endresulttransformer/EndResultTransformer.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/grouping/endresulttransformer/EndResultTransformer.java b/solr/core/src/java/org/apache/solr/search/grouping/endresulttransformer/EndResultTransformer.java
index 40cd8d4..4645830 100644
--- a/solr/core/src/java/org/apache/solr/search/grouping/endresulttransformer/EndResultTransformer.java
+++ b/solr/core/src/java/org/apache/solr/search/grouping/endresulttransformer/EndResultTransformer.java
@@ -42,7 +42,7 @@ public interface EndResultTransformer {
    * Abstracts the source for {@link SolrDocument} instances.
    * The source of documents is different for a distributed search than local search
    */
-  public interface SolrDocumentSource {
+  interface SolrDocumentSource {
 
     SolrDocument retrieve(ScoreDoc doc);
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f82a27aa/solr/core/src/java/org/apache/solr/update/SolrCoreState.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/SolrCoreState.java b/solr/core/src/java/org/apache/solr/update/SolrCoreState.java
index fc0bca8..89e286a 100644
--- a/solr/core/src/java/org/apache/solr/update/SolrCoreState.java
+++ b/solr/core/src/java/org/apache/solr/update/SolrCoreState.java
@@ -140,7 +140,7 @@ public abstract class SolrCoreState {
 
 
   public interface IndexWriterCloser {
-    public void closeWriter(IndexWriter writer) throws IOException;
+    void closeWriter(IndexWriter writer) throws IOException;
   }
 
   public abstract void doRecovery(CoreContainer cc, CoreDescriptor cd);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f82a27aa/solr/core/src/test/org/apache/solr/cloud/TestCryptoKeys.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestCryptoKeys.java b/solr/core/src/test/org/apache/solr/cloud/TestCryptoKeys.java
index a8e2063..72ebc5b 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestCryptoKeys.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestCryptoKeys.java
@@ -46,12 +46,7 @@ public class TestCryptoKeys extends AbstractFullDistribZkTestBase {
 
   private void setupHarnesses() {
     for (final SolrClient client : clients) {
-      RestTestHarness harness = new RestTestHarness(new RESTfulServerProvider() {
-        @Override
-        public String getBaseURL() {
-          return ((HttpSolrClient) client).getBaseURL();
-        }
-      });
+      RestTestHarness harness = new RestTestHarness(() -> ((HttpSolrClient) client).getBaseURL());
       restTestHarnesses.add(harness);
     }
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f82a27aa/solr/core/src/test/org/apache/solr/core/TestDynamicLoading.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/core/TestDynamicLoading.java b/solr/core/src/test/org/apache/solr/core/TestDynamicLoading.java
index 63afe6c..6570e4a 100644
--- a/solr/core/src/test/org/apache/solr/core/TestDynamicLoading.java
+++ b/solr/core/src/test/org/apache/solr/core/TestDynamicLoading.java
@@ -45,12 +45,7 @@ public class TestDynamicLoading extends AbstractFullDistribZkTestBase {
 
   private void setupHarnesses() {
     for (final SolrClient client : clients) {
-      RestTestHarness harness = new RestTestHarness(new RESTfulServerProvider() {
-        @Override
-        public String getBaseURL() {
-          return ((HttpSolrClient)client).getBaseURL();
-        }
-      });
+      RestTestHarness harness = new RestTestHarness(() -> ((HttpSolrClient)client).getBaseURL());
       restTestHarnesses.add(harness);
     }
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f82a27aa/solr/core/src/test/org/apache/solr/handler/TestConfigReload.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/TestConfigReload.java b/solr/core/src/test/org/apache/solr/handler/TestConfigReload.java
index 3d89c4d..832ee1f 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestConfigReload.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestConfigReload.java
@@ -60,12 +60,7 @@ public class TestConfigReload extends AbstractFullDistribZkTestBase {
 
   private void setupHarnesses() {
     for (final SolrClient client : clients) {
-      RestTestHarness harness = new RestTestHarness(new RESTfulServerProvider() {
-        @Override
-        public String getBaseURL() {
-          return ((HttpSolrClient)client).getBaseURL();
-        }
-      });
+      RestTestHarness harness = new RestTestHarness(() -> ((HttpSolrClient)client).getBaseURL());
       restTestHarnesses.add(harness);
     }
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f82a27aa/solr/core/src/test/org/apache/solr/handler/TestReqParamsAPI.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/TestReqParamsAPI.java b/solr/core/src/test/org/apache/solr/handler/TestReqParamsAPI.java
index a4bc0ea..aca6227 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestReqParamsAPI.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestReqParamsAPI.java
@@ -43,12 +43,7 @@ public class TestReqParamsAPI extends AbstractFullDistribZkTestBase {
 
   private void setupHarnesses() {
     for (final SolrClient client : clients) {
-      RestTestHarness harness = new RestTestHarness(new RESTfulServerProvider() {
-        @Override
-        public String getBaseURL() {
-          return ((HttpSolrClient) client).getBaseURL();
-        }
-      });
+      RestTestHarness harness = new RestTestHarness(() -> ((HttpSolrClient) client).getBaseURL());
       restTestHarnesses.add(harness);
     }
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f82a27aa/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerCloud.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerCloud.java b/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerCloud.java
index 76ba9c5..8448ec7 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerCloud.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerCloud.java
@@ -49,12 +49,7 @@ public class TestSolrConfigHandlerCloud extends AbstractFullDistribZkTestBase {
 
   private void setupHarnesses() {
     for (final SolrClient client : clients) {
-      RestTestHarness harness = new RestTestHarness(new RESTfulServerProvider() {
-        @Override
-        public String getBaseURL() {
-          return ((HttpSolrClient)client).getBaseURL();
-        }
-      });
+      RestTestHarness harness = new RestTestHarness(() -> ((HttpSolrClient)client).getBaseURL());
       restTestHarnesses.add(harness);
     }
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f82a27aa/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerConcurrent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerConcurrent.java b/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerConcurrent.java
index 43b83e2..003900c 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerConcurrent.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerConcurrent.java
@@ -61,12 +61,7 @@ public class TestSolrConfigHandlerConcurrent extends AbstractFullDistribZkTestBa
 
   private void setupHarnesses() {
     for (final SolrClient client : clients) {
-      RestTestHarness harness = new RestTestHarness(new RESTfulServerProvider() {
-        @Override
-        public String getBaseURL() {
-          return ((HttpSolrClient)client).getBaseURL();
-        }
-      });
+      RestTestHarness harness = new RestTestHarness(() -> ((HttpSolrClient)client).getBaseURL());
       restTestHarnesses.add(harness);
     }
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f82a27aa/solr/core/src/test/org/apache/solr/schema/TestBulkSchemaConcurrent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/schema/TestBulkSchemaConcurrent.java b/solr/core/src/test/org/apache/solr/schema/TestBulkSchemaConcurrent.java
index 013bd90..24b073f 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestBulkSchemaConcurrent.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestBulkSchemaConcurrent.java
@@ -60,12 +60,7 @@ public class TestBulkSchemaConcurrent  extends AbstractFullDistribZkTestBase {
 
   private void setupHarnesses() {
     for (final SolrClient client : clients) {
-      RestTestHarness harness = new RestTestHarness(new RESTfulServerProvider() {
-        @Override
-        public String getBaseURL() {
-          return ((HttpSolrClient)client).getBaseURL();
-        }
-      });
+      RestTestHarness harness = new RestTestHarness(() -> ((HttpSolrClient)client).getBaseURL());
       restTestHarnesses.add(harness);
     }
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f82a27aa/solr/core/src/test/org/apache/solr/schema/TestCloudManagedSchemaConcurrent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/schema/TestCloudManagedSchemaConcurrent.java b/solr/core/src/test/org/apache/solr/schema/TestCloudManagedSchemaConcurrent.java
index 0993ba1..d22f11b 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestCloudManagedSchemaConcurrent.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestCloudManagedSchemaConcurrent.java
@@ -90,12 +90,7 @@ public class TestCloudManagedSchemaConcurrent extends AbstractFullDistribZkTestB
   
   private void setupHarnesses() {
     for (final SolrClient client : clients) {
-      RestTestHarness harness = new RestTestHarness(new RESTfulServerProvider() {
-        @Override
-        public String getBaseURL() {
-          return ((HttpSolrClient)client).getBaseURL();
-        }
-      });
+      RestTestHarness harness = new RestTestHarness(() -> ((HttpSolrClient)client).getBaseURL());
       restTestHarnesses.add(harness);
     }
   }
@@ -352,11 +347,7 @@ public class TestCloudManagedSchemaConcurrent extends AbstractFullDistribZkTestB
     final String coreUrl = (new ZkCoreNodeProps(shard1Leader)).getCoreUrl();
     assertNotNull(coreUrl);
 
-    RestTestHarness harness = new RestTestHarness(new RESTfulServerProvider() {
-      public String getBaseURL() {
-        return coreUrl.endsWith("/") ? coreUrl.substring(0, coreUrl.length()-1) : coreUrl;
-      }
-    });
+    RestTestHarness harness = new RestTestHarness(() -> coreUrl.endsWith("/") ? coreUrl.substring(0, coreUrl.length()-1) : coreUrl);
     try {
       addFieldTypePut(harness, "fooInt", 15);
     } finally {
@@ -413,11 +404,7 @@ public class TestCloudManagedSchemaConcurrent extends AbstractFullDistribZkTestB
    */
   protected void validateZkVersion(Replica replica, int schemaZkVersion, int waitSecs, boolean retry) throws Exception {
     final String replicaUrl = (new ZkCoreNodeProps(replica)).getCoreUrl();
-    RestTestHarness testHarness = new RestTestHarness(new RESTfulServerProvider() {
-      public String getBaseURL() {
-        return replicaUrl.endsWith("/") ? replicaUrl.substring(0, replicaUrl.length()-1) : replicaUrl;
-      }
-    });
+    RestTestHarness testHarness = new RestTestHarness(() -> replicaUrl.endsWith("/") ? replicaUrl.substring(0, replicaUrl.length()-1) : replicaUrl);
     try {
       long waitMs = waitSecs * 1000L;
       if (waitMs > 0) Thread.sleep(waitMs); // wait a moment for the zk watcher to fire

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f82a27aa/solr/core/src/test/org/apache/solr/schema/TestCloudSchemaless.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/schema/TestCloudSchemaless.java b/solr/core/src/test/org/apache/solr/schema/TestCloudSchemaless.java
index dd5794d..e8a2f85 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestCloudSchemaless.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestCloudSchemaless.java
@@ -81,12 +81,7 @@ public class TestCloudSchemaless extends AbstractFullDistribZkTestBase {
 
   private void setupHarnesses() {
     for (final SolrClient client : clients) {
-      RestTestHarness harness = new RestTestHarness(new RESTfulServerProvider() {
-        @Override
-        public String getBaseURL() {
-          return ((HttpSolrClient)client).getBaseURL();
-        }
-      });
+      RestTestHarness harness = new RestTestHarness(() -> ((HttpSolrClient)client).getBaseURL());
       restTestHarnesses.add(harness);
     }
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f82a27aa/solr/core/src/test/org/apache/solr/update/processor/TestNamedUpdateProcessors.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/update/processor/TestNamedUpdateProcessors.java b/solr/core/src/test/org/apache/solr/update/processor/TestNamedUpdateProcessors.java
index d3304f4..7e540c9 100644
--- a/solr/core/src/test/org/apache/solr/update/processor/TestNamedUpdateProcessors.java
+++ b/solr/core/src/test/org/apache/solr/update/processor/TestNamedUpdateProcessors.java
@@ -49,12 +49,7 @@ public class TestNamedUpdateProcessors extends AbstractFullDistribZkTestBase {
 
   private void setupHarnesses() {
     for (final SolrClient client : clients) {
-      RestTestHarness harness = new RestTestHarness(new RESTfulServerProvider() {
-        @Override
-        public String getBaseURL() {
-          return ((HttpSolrClient) client).getBaseURL();
-        }
-      });
+      RestTestHarness harness = new RestTestHarness(() -> ((HttpSolrClient) client).getBaseURL());
       restTestHarnesses.add(harness);
     }
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f82a27aa/solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java b/solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java
index fe9ad08..7de28b6 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java
@@ -898,7 +898,7 @@ public class JavaBinCodec {
    * <p>
    * Implementors of this interface write a method to serialize a given object using an existing {@link JavaBinCodec}
    */
-  public static interface ObjectResolver {
+  public interface ObjectResolver {
     /**
      * Examine and attempt to serialize the given object, using a {@link JavaBinCodec} to write it to a stream.
      *
@@ -907,12 +907,12 @@ public class JavaBinCodec {
      * @return the object {@code o} itself if it could not be serialized, or {@code null} if the whole object was successfully serialized.
      * @see JavaBinCodec
      */
-    public Object resolve(Object o, JavaBinCodec codec) throws IOException;
+    Object resolve(Object o, JavaBinCodec codec) throws IOException;
   }
 
   public interface WritableDocFields {
-    public boolean isWritable(String name);
-    public boolean wantsAllFields();
+    boolean isWritable(String name);
+    boolean wantsAllFields();
   }
 
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f82a27aa/solr/test-framework/src/java/org/apache/solr/util/RESTfulServerProvider.java
----------------------------------------------------------------------
diff --git a/solr/test-framework/src/java/org/apache/solr/util/RESTfulServerProvider.java b/solr/test-framework/src/java/org/apache/solr/util/RESTfulServerProvider.java
index 7c59167..d4da5d9 100644
--- a/solr/test-framework/src/java/org/apache/solr/util/RESTfulServerProvider.java
+++ b/solr/test-framework/src/java/org/apache/solr/util/RESTfulServerProvider.java
@@ -16,5 +16,5 @@
  */
 package org.apache.solr.util;
 public interface RESTfulServerProvider {
-  public String getBaseURL();
+  String getBaseURL();
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f82a27aa/solr/test-framework/src/java/org/apache/solr/util/RestTestBase.java
----------------------------------------------------------------------
diff --git a/solr/test-framework/src/java/org/apache/solr/util/RestTestBase.java b/solr/test-framework/src/java/org/apache/solr/util/RestTestBase.java
index 06f5782..b6209bf 100644
--- a/solr/test-framework/src/java/org/apache/solr/util/RestTestBase.java
+++ b/solr/test-framework/src/java/org/apache/solr/util/RestTestBase.java
@@ -51,12 +51,7 @@ abstract public class RestTestBase extends SolrJettyTestBase {
 
     createJetty(solrHome, configFile, schemaFile, context, stopAtShutdown, extraServlets);
 
-    restTestHarness = new RestTestHarness(new RESTfulServerProvider() {
-      @Override
-      public String getBaseURL() {
-        return jetty.getBaseUrl().toString() + "/" + DEFAULT_TEST_CORENAME;
-      }
-    });
+    restTestHarness = new RestTestHarness(() -> jetty.getBaseUrl().toString() + "/" + DEFAULT_TEST_CORENAME);
   }
 
   /** Validates an update XML String is successful


[2/3] lucene-solr:branch_6x: SOLR-8995: Replace anonymous implementations of SAM interfaces with Lambdas

Posted by no...@apache.org.
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/0e30fe1c
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/0e30fe1c
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/0e30fe1c

Branch: refs/heads/branch_6x
Commit: 0e30fe1c39f5c56a1e01b7d49d1a0e2e5a6d894e
Parents: f82a27a
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:04:57 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/0e30fe1c/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;
             }
         );
       }


[3/3] lucene-solr:branch_6x: Merge remote-tracking branch 'origin/branch_6x' into branch_6x

Posted by no...@apache.org.
Merge remote-tracking branch 'origin/branch_6x' into branch_6x


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/b2a9a787
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/b2a9a787
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/b2a9a787

Branch: refs/heads/branch_6x
Commit: b2a9a787b451c1d9d48ab39e50f5b059bf015159
Parents: 0e30fe1 e6bcb13
Author: Noble Paul <no...@apache.org>
Authored: Fri Apr 15 19:11:17 2016 +0530
Committer: Noble Paul <no...@apache.org>
Committed: Fri Apr 15 19:11:17 2016 +0530

----------------------------------------------------------------------
 lucene/CHANGES.txt                              |  3 +
 .../xml/CoreParserTestIndexData.java            | 74 ++++++++++++++++
 .../lucene/queryparser/xml/TestCoreParser.java  | 88 +++++++++-----------
 .../xml/TestCorePlusExtensionsParser.java       | 18 ++--
 .../xml/TestCorePlusQueriesParser.java          | 18 ++--
 .../spatial3d/geom/GeoConcavePolygon.java       | 50 ++++++++---
 .../lucene/spatial3d/geom/GeoConvexPolygon.java | 40 ++++++++-
 7 files changed, 203 insertions(+), 88 deletions(-)
----------------------------------------------------------------------