copyright: artificial blank lines added in groovy (IDEA-135228)

This commit is contained in:
Anna Kozlova
2015-01-14 16:45:50 +01:00
parent f0c7fe99b5
commit 4cf4b58ca2
@@ -159,8 +159,11 @@ public abstract class UpdatePsiFileCopyright extends AbstractUpdateCopyright {
return; // Nothing to do since the comment is the same
}
PsiElement next = getNextSibling(range.getLast());
if (next instanceof PsiWhiteSpace && countNewline(next.getText()) > 1) {
return;
if (next != null) {
final String text = next.getText();
if (StringUtil.isEmptyOrSpaces(text) && countNewline(text) > 1) {
return;
}
}
point = range.getFirst();
}