jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/Queue.java
changeset 43730 b6847c320451
parent 42460 7133f144981a
child 44854 5a486e0acd29
equal deleted inserted replaced
43729:21db38703675 43730:b6847c320451
   116 
   116 
   117     @Override
   117     @Override
   118     public synchronized void closeExceptionally(Throwable t) {
   118     public synchronized void closeExceptionally(Throwable t) {
   119         if (exception == null) exception = t;
   119         if (exception == null) exception = t;
   120         else if (t != null && t != exception) {
   120         else if (t != null && t != exception) {
   121             Stream.of(exception.getSuppressed())
   121             if (!Stream.of(exception.getSuppressed())
   122                 .filter(x -> x == t)
   122                 .filter(x -> x == t)
   123                 .findFirst()
   123                 .findFirst()
   124                 .ifPresentOrElse((x) -> {},
   124                 .isPresent())
   125                                  () -> exception.addSuppressed(t));
   125             {
       
   126                 exception.addSuppressed(t);
       
   127             }
   126         }
   128         }
   127         close();
   129         close();
   128     }
   130     }
   129 
   131 
   130     public synchronized T take() throws IOException {
   132     public synchronized T take() throws IOException {