Skip to content

Commit 43809c9

Browse files
committed
chore: attempt to drain the stream iterator
Related #2696
1 parent 96e4049 commit 43809c9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎google-cloud-storage/src/main/java/com/google/cloud/storage/GapicUnbufferedReadableByteChannel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public void close() {
212212
} catch (IOException e) {
213213
if (ioException == null) {
214214
ioException = e;
215-
} else {
215+
} else if (ioException != e) {
216216
ioException.addSuppressed(e);
217217
}
218218
}

‎google-cloud-storage/src/main/java/com/google/cloud/storage/GrpcStorageOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ static void closeAllStreams(Iterable<InputStream> inputStreams) throws IOExcepti
10981098
} catch (IOException e) {
10991099
if (ioException == null) {
11001100
ioException = e;
1101-
} else {
1101+
} else if (ioException != e) {
11021102
ioException.addSuppressed(e);
11031103
}
11041104
}

0 commit comments

Comments
 (0)