Sonarqube сообщает мне эту ошибку: «NullpointerException» может быть брошено; "getBody ()" может вернуть NULL.
Это код:
if (holdingResponseEntity == null || holdingResponseEntity.getBody() == null || holdingResponseEntity.getBody().getError() || holdingResponseEntity.getBody().getResult() == null) { throw new HoldingNotFoundException("Holding whit id=" + idHolding + " not found-"); }
Подробнее здесь: https://stackoverflow.com/questions/650 ... -be-thrown