I have a use-case where I want to return boolean value from the function
private boolean checkStatus(String param) {
return param != null ? randomBool() : true;
}
private boolean randomBool() {
// return true or false on the basis of some condition
}
I am getting complaint issue over true
statement. What could be the other way to achieve the same?
Aucun commentaire:
Enregistrer un commentaire