lundi 25 mai 2015

Boolean multireturn refactoring

What do you think will be the best way to refactor this kind of boolean method?

if (someService.isTrue(importantArg)) {
    return true;
} else if (someService.isSomeTrue(anotherArg)) {
    return isAnotherCondition(entry);
} else {
    return super.thisMethod();
}

Aucun commentaire:

Enregistrer un commentaire