src/java.base/share/classes/java/util/concurrent/AbstractExecutorService.java
changeset 48541 946e34c2dec9
parent 47216 71c04702a3d5
equal deleted inserted replaced
48540:221cf8307606 48541:946e34c2dec9
   243             }
   243             }
   244             for (int i = 0, size = futures.size(); i < size; i++) {
   244             for (int i = 0, size = futures.size(); i < size; i++) {
   245                 Future<T> f = futures.get(i);
   245                 Future<T> f = futures.get(i);
   246                 if (!f.isDone()) {
   246                 if (!f.isDone()) {
   247                     try { f.get(); }
   247                     try { f.get(); }
   248                     catch (CancellationException ignore) {}
   248                     catch (CancellationException | ExecutionException ignore) {}
   249                     catch (ExecutionException ignore) {}
       
   250                 }
   249                 }
   251             }
   250             }
   252             return futures;
   251             return futures;
   253         } catch (Throwable t) {
   252         } catch (Throwable t) {
   254             cancelAll(futures);
   253             cancelAll(futures);
   281 
   280 
   282             for (; j < size; j++) {
   281             for (; j < size; j++) {
   283                 Future<T> f = futures.get(j);
   282                 Future<T> f = futures.get(j);
   284                 if (!f.isDone()) {
   283                 if (!f.isDone()) {
   285                     try { f.get(deadline - System.nanoTime(), NANOSECONDS); }
   284                     try { f.get(deadline - System.nanoTime(), NANOSECONDS); }
   286                     catch (CancellationException ignore) {}
   285                     catch (CancellationException | ExecutionException ignore) {}
   287                     catch (ExecutionException ignore) {}
       
   288                     catch (TimeoutException timedOut) {
   286                     catch (TimeoutException timedOut) {
   289                         break timedOut;
   287                         break timedOut;
   290                     }
   288                     }
   291                 }
   289                 }
   292             }
   290             }