From b97afd79cab2c247a4143efebc80e4dcec436095 Mon Sep 17 00:00:00 2001 From: Christine Poerschke Date: Tue, 10 Dec 2019 12:32:34 +0000 Subject: [PATCH] Fix 5 javac warnings: 'yield' may become a restricted identifier in a future release. --- .../src/test/org/apache/solr/core/SolrCoreTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java b/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java index d9411ba17db..6553c7ea912 100644 --- a/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java +++ b/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java @@ -192,7 +192,7 @@ public class SolrCoreTest extends SolrTestCaseJ4 { final CoreContainer cores = h.getCoreContainer(); for (int i = 0; i < MT; ++i) { Callable call = new Callable() { - void yield(int n) { + void yieldInt(int n) { try { Thread.sleep(0, (n % 13 + 1) * 10); } catch (InterruptedException xint) { @@ -208,16 +208,16 @@ public class SolrCoreTest extends SolrTestCaseJ4 { r += 1; core = cores.getCore(SolrTestCaseJ4.DEFAULT_TEST_CORENAME); // sprinkle concurrency hinting... - yield(l); + yieldInt(l); assertTrue("Refcount < 1", core.getOpenCount() >= 1); - yield(l); + yieldInt(l); assertTrue("Refcount > 17", core.getOpenCount() <= 17); - yield(l); + yieldInt(l); assertTrue("Handler is closed", handler1.closed == false); - yield(l); + yieldInt(l); core.close(); core = null; - yield(l); + yieldInt(l); } return r; } finally {