NPE guard for null response; fixes gh-1224
This commit is contained in:
@@ -249,6 +249,9 @@ class HttpClientBeanPostProcessor implements BeanPostProcessor {
|
||||
|
||||
protected void handle(HttpClientResponse httpClientResponse,
|
||||
Throwable throwable) {
|
||||
if (httpClientResponse == null) {
|
||||
return;
|
||||
}
|
||||
AtomicReference reference = httpClientResponse.currentContext()
|
||||
.getOrDefault(AtomicReference.class, null);
|
||||
if (reference == null || reference.get() == null) {
|
||||
|
||||
@@ -77,8 +77,7 @@ class Issue546TestsApp {
|
||||
@RestController
|
||||
class Controller {
|
||||
|
||||
private static final Log log = LogFactory
|
||||
.getLog(Controller.class);
|
||||
private static final Log log = LogFactory.getLog(Controller.class);
|
||||
|
||||
private final AsyncRestTemplate traceAsyncRestTemplate;
|
||||
|
||||
|
||||
@@ -69,8 +69,7 @@ public class WebClientExceptionTests {
|
||||
@ClassRule
|
||||
public static final SpringClassRule SCR = new SpringClassRule();
|
||||
|
||||
private static final Log log = LogFactory
|
||||
.getLog(WebClientExceptionTests.class);
|
||||
private static final Log log = LogFactory.getLog(WebClientExceptionTests.class);
|
||||
|
||||
@Rule
|
||||
public final SpringMethodRule springMethodRule = new SpringMethodRule();
|
||||
|
||||
@@ -74,8 +74,7 @@ import static org.assertj.core.api.BDDAssertions.then;
|
||||
@DirtiesContext
|
||||
public class TraceZuulIntegrationTests {
|
||||
|
||||
private static final Log log = LogFactory
|
||||
.getLog(TraceZuulIntegrationTests.class);
|
||||
private static final Log log = LogFactory.getLog(TraceZuulIntegrationTests.class);
|
||||
|
||||
@Autowired
|
||||
Tracing tracing;
|
||||
|
||||
Reference in New Issue
Block a user