mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
diagnostics (EA-26212 - NPE: UpdatePsiFileCopyright.checkComments)
This commit is contained in:
@@ -232,7 +232,16 @@ public abstract class UpdatePsiFileCopyright extends AbstractUpdateCopyright {
|
||||
}
|
||||
}
|
||||
|
||||
addAction(new CommentAction(point == null ? 0 : point.getTextRange().getStartOffset(), prefix, suffix));
|
||||
final int pos;
|
||||
if (point == null) {
|
||||
pos = 0;
|
||||
}
|
||||
else {
|
||||
final TextRange textRange = point.getTextRange();
|
||||
assert textRange != null : point.getClass();
|
||||
pos = textRange.getStartOffset();
|
||||
}
|
||||
addAction(new CommentAction(pos, prefix, suffix));
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user