jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/Queue.java
equal
deleted
inserted
replaced
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 { |