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();
|
||||
for (int i = 0; i < MT; ++i) {
|
||||
Callable<Integer> call = new Callable<Integer>() {
|
||||
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 {
|
||||
|
|
Loading…
Reference in New Issue