Menu

#1320 Enhance SimplifyBooleanReturns checks

PMD-5.3.0
closed
None
PMD
4-Minor
Feature-Request
PMD-5.2.3
2015-04-01
2015-03-12
No

SimplifyBooleanReturns does not handle the scenario when no else statement is present. Request to add in a check that would flag this method

public boolean exists(Object obj) { 
    if (myObjectList.contains(obj)) { 
    return true;
    } 
    return false;
}

Discussion

  • Andreas Dangel

    Andreas Dangel - 2015-03-15
    • status: open --> closed
    • assigned_to: Andreas Dangel
    • Milestone: New Tickets --> PMD-Next
     
  • Andreas Dangel

    Andreas Dangel - 2015-03-15

    Will be included with the next release.

     

Log in to post a comment.