mirror of https://github.com/apache/lucene.git
Fix 5 javac warnings: 'yield' may become a restricted identifier in a future release.
This commit is contained in:
parent
e84a23529e
commit
b97afd79ca
|
@ -192,7 +192,7 @@ public class SolrCoreTest extends SolrTestCaseJ4 {
|
||||||
final CoreContainer cores = h.getCoreContainer();
|
final CoreContainer cores = h.getCoreContainer();
|
||||||
for (int i = 0; i < MT; ++i) {
|
for (int i = 0; i < MT; ++i) {
|
||||||
Callable<Integer> call = new Callable<Integer>() {
|
Callable<Integer> call = new Callable<Integer>() {
|
||||||
void yield(int n) {
|
void yieldInt(int n) {
|
||||||
try {
|
try {
|
||||||
Thread.sleep(0, (n % 13 + 1) * 10);
|
Thread.sleep(0, (n % 13 + 1) * 10);
|
||||||
} catch (InterruptedException xint) {
|
} catch (InterruptedException xint) {
|
||||||
|
@ -208,16 +208,16 @@ public class SolrCoreTest extends SolrTestCaseJ4 {
|
||||||
r += 1;
|
r += 1;
|
||||||
core = cores.getCore(SolrTestCaseJ4.DEFAULT_TEST_CORENAME);
|
core = cores.getCore(SolrTestCaseJ4.DEFAULT_TEST_CORENAME);
|
||||||
// sprinkle concurrency hinting...
|
// sprinkle concurrency hinting...
|
||||||
yield(l);
|
yieldInt(l);
|
||||||
assertTrue("Refcount < 1", core.getOpenCount() >= 1);
|
assertTrue("Refcount < 1", core.getOpenCount() >= 1);
|
||||||
yield(l);
|
yieldInt(l);
|
||||||
assertTrue("Refcount > 17", core.getOpenCount() <= 17);
|
assertTrue("Refcount > 17", core.getOpenCount() <= 17);
|
||||||
yield(l);
|
yieldInt(l);
|
||||||
assertTrue("Handler is closed", handler1.closed == false);
|
assertTrue("Handler is closed", handler1.closed == false);
|
||||||
yield(l);
|
yieldInt(l);
|
||||||
core.close();
|
core.close();
|
||||||
core = null;
|
core = null;
|
||||||
yield(l);
|
yieldInt(l);
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Reference in New Issue