EA-39129 - NPE: AbstractSuppressByNoInspectionCommentFix.getLineCommentPrefix

This commit is contained in:
peter
2012-09-12 11:36:29 +02:00
parent e7216936e0
commit fbab25d386
@@ -77,11 +77,9 @@ public abstract class AbstractSuppressByNoInspectionCommentFix extends SuppressI
}
@Nullable
protected static String getLineCommentPrefix(final PsiElement comment) {
protected static String getLineCommentPrefix(@NotNull final PsiElement comment) {
final Commenter commenter = LanguageCommenters.INSTANCE.forLanguage(comment.getLanguage());
assert commenter != null;
return commenter.getLineCommentPrefix();
return commenter == null ? null : commenter.getLineCommentPrefix();
}
protected void createSuppression(final Project project,