if (account != null) {
accountInfo = authenticationService.validateToken(account.getResult(), token);
} else {
accountInfo = authenticationService.validateToken(null, token);
}
<BUG>if (accountInfo != null && accountInfo.getEndpoints() != null) {
try {</BUG>
endpointListCache.cacheEndpointsForToken(token, accountInfo.getEndpoints());
} catch (IOException io) {
LOG.error("Caching Failure: " + io.getMessage(), io);

if (account != null) {
accountInfo = authenticationService.validateToken(account.getResult(), token);
} else {
accountInfo = authenticationService.validateToken(null, token);
}
if (accountInfo.getEndpoints() != null) {
try {
endpointListCache.cacheEndpointsForToken(token, accountInfo.getEndpoints());
} catch (IOException io) {
LOG.error("Caching Failure: " + io.getMessage(), io);
