Java: fix error message article and make messages more consistent

GitOrigin-RevId: c2931396183059e4a1d8ade8e16e527153c60345
This commit is contained in:
Bas Leijdekkers
2025-06-20 18:38:03 +00:00
committed by intellij-monorepo-bot
parent 109ff355e9
commit 22fcfb7dd9
3 changed files with 4 additions and 4 deletions
@@ -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}
@@ -1 +1 @@
<error descr="Package annotations should be in the package-info.java file">@Deprecated</error> package annotations.packageAnnotationNotInPackageInfo;
<error descr="Package annotations only allowed in a 'package-info.java' file">@Deprecated</error> package annotations.packageAnnotationNotInPackageInfo;
@@ -189,7 +189,7 @@ class ModuleHighlightingTest : LightJava9ModulesCodeInsightFixtureTestCase() {
}
fun testWrongFileName() {
highlight("M.java", """/* ... */ <error descr="Module declaration should be in a file named 'module-info.java'">module M</error> { }""")
highlight("M.java", """/* ... */ <error descr="Module declarations only allowed in a 'module-info.java' file">module M</error> { }""")
}
fun testFileDuplicate() {