Skip to content

Commit

Permalink
minor: refactor method
Browse files Browse the repository at this point in the history
  • Loading branch information
nrmancuso committed Dec 2, 2022
1 parent 488ed2d commit 90350a2
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,8 @@ private static DetailAST getWhitespaceFollowedNode(DetailAST ast) {
* @return true if whitespace after ast should be checked
*/
private static boolean shouldCheckWhitespaceAfter(DetailAST ast) {
boolean checkWhitespace = true;
final DetailAST previousSibling = ast.getPreviousSibling();
if (previousSibling != null && previousSibling.getType() == TokenTypes.ANNOTATIONS) {
checkWhitespace = false;
}
return checkWhitespace;
return previousSibling == null || previousSibling.getType() != TokenTypes.ANNOTATIONS;
}

/**
Expand Down

0 comments on commit 90350a2

Please sign in to comment.