Good afternoon, I am currently executing the following java code and sonarqube is throwing me a bug related to the response that returns a filter and setting in a list through functional programming:
else if(msgType.equals("RESPONSE")) {
if (!findPostpaidAccountInfoRs.getFindPostpaidAccountInfo().getBody().getFindPostpaidAccountInfoResponse().getValueAddedServices().isEmpty()) {
identityArrayList.stream().filter(p -> p.getAccount().equals(postpaidAcocunt)).peek(p -> p.getServices().add(Service.VALUE_ADDED_SERVICE.getValue())).findFirst();
}
}
Sonarqube warning that it is not giving me a bug:
What alternative can handle for my code? Try adding an orElseThrow and it says the same thing