Skip to content

Commit 5b7a21a

Browse files
committed
okhttp: Remove wrong status description
The != should have been ==. However, it is provable that the exception won't be null, but we want to make that fact obvious when auditing. So we just fail if the exception is ever null.
1 parent fb8402f commit 5b7a21a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

okhttp/src/main/java/io/grpc/okhttp/OkHttpClientTransport.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -548,10 +548,8 @@ int getPendingStreamSize() {
548548
* Finish all active streams due to an IOException, then close the transport.
549549
*/
550550
void onException(Throwable failureCause) {
551+
Preconditions.checkNotNull(failureCause, "failureCause");
551552
Status status = Status.UNAVAILABLE.withCause(failureCause);
552-
if (failureCause != null) {
553-
status = status.augmentDescription("No provided cause");
554-
}
555553
startGoAway(0, ErrorCode.INTERNAL_ERROR, status);
556554
}
557555

0 commit comments

Comments
 (0)