mirror of https://github.com/apache/activemq.git
AMQ-6602 - Removing lambdas for java 7 compatibility
This commit is contained in:
parent
79069598b1
commit
1f53b124bc
|
@ -46,14 +46,24 @@ public class TaskRunnerFactoryTest {
|
||||||
final List<TaskRunner> runners = Collections.synchronizedList(new ArrayList<>(10));
|
final List<TaskRunner> runners = Collections.synchronizedList(new ArrayList<>(10));
|
||||||
|
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
service.execute(() -> {
|
service.execute(new Runnable() {
|
||||||
try {
|
|
||||||
latch1.await();
|
@Override
|
||||||
} catch (InterruptedException e) {
|
public void run() {
|
||||||
throw new IllegalStateException(e);
|
try {
|
||||||
|
latch1.await();
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
throw new IllegalStateException(e);
|
||||||
|
}
|
||||||
|
runners.add(factory.createTaskRunner(new Task() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean iterate() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}, "task"));
|
||||||
|
latch2.countDown();
|
||||||
}
|
}
|
||||||
runners.add(factory.createTaskRunner(() -> true, "task") );
|
|
||||||
latch2.countDown();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue