File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
spring-web/src/main/java/org/springframework/http/client Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2024 the original author or authors.
2
+ * Copyright 2002-2025 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
19
19
import java .io .IOException ;
20
20
import java .io .InputStream ;
21
21
import java .net .HttpURLConnection ;
22
+ import java .util .Objects ;
22
23
23
24
import org .springframework .http .HttpHeaders ;
24
25
import org .springframework .http .HttpStatusCode ;
@@ -103,6 +104,7 @@ public void close() {
103
104
if (this .responseStream == null ) {
104
105
getBody ();
105
106
}
107
+ Objects .requireNonNull (this .responseStream );
106
108
StreamUtils .drain (this .responseStream );
107
109
this .responseStream .close ();
108
110
}
You can’t perform that action at this time.
0 commit comments