AMQ-6602 - Removing lambdas for java 7 compatibility

(cherry picked from commit 1f53b124bc)
This commit is contained in:
Christopher L. Shannon (cshannon) 2017-02-23 10:55:20 -05:00
parent 7ca411feee
commit 789f82b34b
1 changed files with 17 additions and 7 deletions

View File

@ -46,14 +46,24 @@ public class TaskRunnerFactoryTest {
final List<TaskRunner> runners = Collections.synchronizedList(new ArrayList<>(10));
for (int i = 0; i < 10; i++) {
service.execute(() -> {
service.execute(new Runnable() {
@Override
public void run() {
try {
latch1.await();
} catch (InterruptedException e) {
throw new IllegalStateException(e);
}
runners.add(factory.createTaskRunner(() -> true, "task") );
runners.add(factory.createTaskRunner(new Task() {
@Override
public boolean iterate() {
return false;
}
}, "task"));
latch2.countDown();
}
});
}