ConfusingTernary does not ignore else if blocks even when property is set
A source code analyzer
Brought to you by:
adangel,
juansotuyo
PMD is set to ignore elseif blocks, but still flags these as a warning. This elseif block is nested inside another if / else, but this does not seem to affect the results of the check
Configuration setting:
<property name="ignoreElseIf" value="true"/>
Code:
if (noSave) { //continue on } else { if (goBack == "Step") { //do logic } else if (currentStateID != -1 && selectedNextState != -2) { //do different logic } else { //more logic } }
Diff:
Will be fixed with the next release.