PMD rule: combined two if statements