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.
This bug will be fixed with PMD 5.3.4.
Commit: https://github.com/pmd/pmd/commit/ac9fd51f8473a391dadc3f9fd0987d73755d79bb