diff --git a/java/java-psi-impl/resources/messages/JavaErrorBundle.properties b/java/java-psi-impl/resources/messages/JavaErrorBundle.properties
index 308827841b2b..a8ded7291ab6 100644
--- a/java/java-psi-impl/resources/messages/JavaErrorBundle.properties
+++ b/java/java-psi-impl/resources/messages/JavaErrorBundle.properties
@@ -30,7 +30,7 @@ annotation.duplicate.explained=Duplicate annotation. {0}
annotation.non.repeatable=The declaration of ''{0}'' does not have a valid java.lang.annotation.Repeatable annotation
annotation.container.wrong.place=Container annotation ''{0}'' must not be present at the same time as the element it contains
annotation.container.not.applicable=Container annotation ''@{0}'' is not applicable to {1}
-annotation.not.allowed.in.permit.list = Annotation is not allowed in permit list
+annotation.not.allowed.in.permit.list=Annotations not allowed in 'permits' list
receiver.wrong.context=Receivers are not allowed outside of method parameter list
receiver.static.context=The receiver cannot be used in a static context
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingSealedTypes/PermitsList.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingSealedTypes/PermitsList.java
index 1e5d388869d0..fdc8bfe50c8f 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingSealedTypes/PermitsList.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingSealedTypes/PermitsList.java
@@ -30,6 +30,8 @@ sealed class Parent permits TypedChildpermits I {}
+
class TestWithAnnotations{
@Target(ElementType.TYPE_USE)
@interface Ann {
@@ -38,7 +40,7 @@ class TestWithAnnotations{
public static void main(String[] args) {
}
- sealed class PermittedAnnotations permits @Ann SealedOne {
+ sealed class PermittedAnnotations permits @Ann SealedOne {
}
non-sealed class SealedOne extends PermittedAnnotations {