Menu

#1392 SimplifyStartsWith false-negative

PMD-5.3.4
closed
None
PMD
4-Minor
Bug
5.3.3
2015-09-11
2015-08-08
No

The following code:

private static boolean isImmediatelyFollowedByText(DetailNode tag) {
    final DetailNode nextSibling = JavadocUtils.getNextSibling(tag);
    return nextSibling.getType() == JavadocTokenTypes.NEWLINE
            || nextSibling.getType() == JavadocTokenTypes.EOF
            || nextSibling.getText().startsWith(" ");
}

does not trigger violation of SimplifyStartsWith, but line with nextSibling.getText().startsWith(" ") should be marked.

Discussion

  • Andreas Dangel

    Andreas Dangel - 2015-09-11
    • status: open --> closed
    • assigned_to: Andreas Dangel
    • Milestone: New Tickets --> PMD-5.3.4
     

Log in to post a comment.