- i == 2 ? new TestListener2<Integer>( nNotifications, i ) :
- i == 3 ? new TestListener3<Integer>( nNotifications, i ) :
- new TestListener<Integer>( nNotifications, i );
- listeners.add( listener );
-
- new Thread( new Runnable() {
- @Override
- public void run() {
- for( int j = 1; j <= nNotifications; j++ ) {
- final Integer n = notifications[j-1];
- stagingExecutor.execute( new Runnable() {
- @Override
- public void run() {
- manager.submitNotification( listener, n );
- }
- } );
- }
+ i == 2 ? new TestListener2<>(nNotifications, i) :
+ i == 3 ? new TestListener3<>(nNotifications, i) :
+ new TestListener<>(nNotifications, i);
+ listeners.add(listener);
+
+ final Thread t = new Thread(() -> {
+ for (int j = 1; j <= nNotifications; j++) {
+ final Integer n = notifications[j - 1];
+ stagingExecutor.execute(() -> manager.submitNotification(listener, n));