diff --git a/compiler/frontend/src/org/jetbrains/kotlin/parsing/JetParsing.java b/compiler/frontend/src/org/jetbrains/kotlin/parsing/JetParsing.java index ce8dcae55ea..8bbf1106aca 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/parsing/JetParsing.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/parsing/JetParsing.java @@ -435,7 +435,7 @@ public class JetParsing extends AbstractJetParsing { */ boolean parseModifierList( @NotNull AnnotationParsingMode annotationParsingMode, - @Nullable TokenSet noModifiersBefore + @NotNull TokenSet noModifiersBefore ) { return parseModifierList(null, annotationParsingMode, noModifiersBefore); } @@ -448,7 +448,7 @@ public class JetParsing extends AbstractJetParsing { boolean parseModifierList( @Nullable Consumer tokenConsumer, @NotNull AnnotationParsingMode annotationParsingMode, - @Nullable TokenSet noModifiersBefore + @NotNull TokenSet noModifiersBefore ) { PsiBuilder.Marker list = mark(); boolean empty = true; @@ -477,12 +477,12 @@ public class JetParsing extends AbstractJetParsing { return !empty; } - private boolean tryParseModifier(@Nullable Consumer tokenConsumer, @Nullable TokenSet noModifiersBefore) { + private boolean tryParseModifier(@Nullable Consumer tokenConsumer, @NotNull TokenSet noModifiersBefore) { PsiBuilder.Marker marker = mark(); if (atSet(MODIFIER_KEYWORDS)) { IElementType lookahead = lookahead(1); - if (noModifiersBefore == null || lookahead != null && !noModifiersBefore.contains(lookahead)) { + if (lookahead != null && !noModifiersBefore.contains(lookahead)) { IElementType tt = tt(); if (tokenConsumer != null) { tokenConsumer.consume(tt);