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;
|
||||
|
||||
@@ -30,8 +30,7 @@ import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
*/
|
||||
public abstract class AbstractIntegrationTest {
|
||||
|
||||
protected static final Log log = LogFactory
|
||||
.getLog(AbstractIntegrationTest.class);
|
||||
protected static final Log log = LogFactory.getLog(AbstractIntegrationTest.class);
|
||||
|
||||
protected static final int POLL_INTERVAL = 1;
|
||||
|
||||
|
||||
@@ -48,8 +48,7 @@ import org.springframework.util.StringUtils;
|
||||
public class DefaultEndpointLocator implements EndpointLocator,
|
||||
ApplicationListener<ServletWebServerInitializedEvent> {
|
||||
|
||||
private static final Log log = LogFactory
|
||||
.getLog(DefaultEndpointLocator.class);
|
||||
private static final Log log = LogFactory.getLog(DefaultEndpointLocator.class);
|
||||
|
||||
private static final String IP_ADDRESS_PROP_NAME = "spring.cloud.client.ipAddress";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user