Merge pull request #9832 from Johnny Lim

* gh-9832:
  Use currentHealth consistently in getHealth()
pull/9840/merge
Andy Wilkinson 7 years ago
commit be535103a7

@ -165,7 +165,7 @@ public class HealthMvcEndpoint extends AbstractEndpointMvcAdapter<HealthEndpoint
private Health getHealth(HttpServletRequest request, Principal principal) {
Health currentHealth = getCurrentHealth();
if (exposeHealthDetails(request, principal)) {
return this.cachedHealth.health;
return currentHealth;
}
return Health.status(currentHealth.getStatus()).build();
}

Loading…
Cancel
Save