diff --git a/java/codeserver/highlighting/resources/messages/JavaCompilationErrorBundle.properties b/java/codeserver/highlighting/resources/messages/JavaCompilationErrorBundle.properties
index 9fac7fcba964..8886b7b14540 100644
--- a/java/codeserver/highlighting/resources/messages/JavaCompilationErrorBundle.properties
+++ b/java/codeserver/highlighting/resources/messages/JavaCompilationErrorBundle.properties
@@ -14,7 +14,7 @@ annotation.not.allowed.var='var' type may not be annotated
annotation.not.allowed.class=Class literal type may not be annotated
annotation.not.allowed.ref=Annotation is not applicable to this kind of reference
annotation.not.allowed.static=Static member qualifying type may not be annotated
-annotation.not.allowed.on.package=Package annotations should be in the package-info.java file
+annotation.not.allowed.on.package=Package annotations only allowed in a 'package-info.java' file
annotation.not.allowed.in.permit.list=Annotations not allowed in 'permits' list
annotation.type.expected=Annotation type expected
annotation.missing.attribute={0} missing but required
@@ -528,7 +528,7 @@ catch.type.parameter=Cannot catch type parameters
module.no.package=A module file should not have a 'package' statement
module.conflicting.packages=Package ''{0}'' exists in another module: {1}
module.conflicting.reads=Module ''{0}'' reads package ''{1}'' from both ''{2}'' and ''{3}''
-module.file.wrong.name=Module declaration should be in a file named 'module-info.java'
+module.file.wrong.name=Module declarations only allowed in a 'module-info.java' file
module.file.duplicate='module-info.java' already exists in the module
module.duplicate.requires=Duplicate ''requires'': {0}
module.duplicate.exports=Duplicate ''exports'': {0}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/packageAnnotationNotInPackageInfo.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/packageAnnotationNotInPackageInfo.java
index c7d992a0a919..ae33e34bde0f 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/packageAnnotationNotInPackageInfo.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/packageAnnotationNotInPackageInfo.java
@@ -1 +1 @@
-@Deprecated package annotations.packageAnnotationNotInPackageInfo;
\ No newline at end of file
+@Deprecated package annotations.packageAnnotationNotInPackageInfo;
\ No newline at end of file
diff --git a/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/ModuleHighlightingTest.kt b/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/ModuleHighlightingTest.kt
index bb35e0630e46..fe051c53dc24 100644
--- a/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/ModuleHighlightingTest.kt
+++ b/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/ModuleHighlightingTest.kt
@@ -189,7 +189,7 @@ class ModuleHighlightingTest : LightJava9ModulesCodeInsightFixtureTestCase() {
}
fun testWrongFileName() {
- highlight("M.java", """/* ... */ module M { }""")
+ highlight("M.java", """/* ... */ module M { }""")
}
fun testFileDuplicate() {