Skip to content

Commit 15c417c

Browse files
committed
corrected diagnostics grammer
1 parent a32d502 commit 15c417c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/resources/io/openliberty/tools/intellij/lsp4jakarta/messages/messages.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ AnnotationStringMethods = The {0} annotation can only be used on String and Char
6565
AnnotationStringFields = The {0} annotation can only be used on String and CharSequence type fields.
6666
AnnotationDateMethods = The {0} annotation can only be used on: Date, Calendar, Instant, LocalDate, LocalDateTime, LocalTime, MonthDay, OffsetDateTime, OffsetTime, Year, YearMonth, ZonedDateTime, HijrahDate, JapaneseDate, JapaneseDate, MinguoDate and ThaiBuddhistDate type methods.
6767
AnnotationDateFields = The {0} annotation can only be used on: Date, Calendar, Instant, LocalDate, LocalDateTime, LocalTime, MonthDay, OffsetDateTime, OffsetTime, Year, YearMonth, ZonedDateTime, HijrahDate, JapaneseDate, JapaneseDate, MinguoDate and ThaiBuddhistDate type fields.
68-
SizeOrNonEmptyAnnotationsField = This annotation can only be used on CharSequence, Collection, Array, Map type fields.
69-
SizeOrNonEmptyAnnotationsMethod = This annotation can only be used on CharSequence, Collection, Array, Map return type methods.
68+
SizeOrNonEmptyAnnotationsField = This annotation can only be used on fields that have CharSequence, Collection, Array or Map as a return type.
69+
SizeOrNonEmptyAnnotationsMethod = This annotation can only be used on methods that have CharSequence, Collection, Array or Map as a return type.
7070
# The next two messages do not include CharSequence
7171
AnnotationMinMaxMethods = The {0} annotation can only be used on \n- BigDecimal \n- BigInteger\n- byte, short, int, long (and their respective wrappers) \n type methods.
7272
AnnotationMinMaxFields = The {0} annotation can only be used on \n- BigDecimal \n- BigInteger\n- byte, short, int, long (and their respective wrappers) \n type fields.

src/test/java/io/openliberty/tools/intellij/lsp4jakarta/it/beanvalidation/BeanValidationTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@ public void fieldConstraintValidation() throws Exception {
163163
"Constraint annotations are not allowed on static fields.",
164164
DiagnosticSeverity.Error, "jakarta-bean-validation", "MakeNotStatic", "jakarta.validation.constraints.Past");
165165
Diagnostic d21 = d(66, 20, 26,
166-
"This annotation can only be used on CharSequence, Collection, Array, Map type fields.",
166+
"This annotation can only be used on fields that have CharSequence, Collection, Array or Map as a return type.",
167167
DiagnosticSeverity.Error, "jakarta-bean-validation", "FixTypeOfElement", "jakarta.validation.constraints.Size");
168168
Diagnostic d22 = d(69, 29, 45,
169-
"This annotation can only be used on CharSequence, Collection, Array, Map type fields.",
169+
"This annotation can only be used on fields that have CharSequence, Collection, Array or Map as a return type.",
170170
DiagnosticSeverity.Error, "jakarta-bean-validation", "FixTypeOfElement", "jakarta.validation.constraints.NotEmpty");
171171
assertJavaDiagnostics(diagnosticsParams, utils, d1, d2, d3, d4, d5, d6, d7, d8,
172172
d9, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19, d20, d21, d22);
@@ -352,7 +352,7 @@ public void methodConstraintValidation() throws Exception {
352352
"Constraint annotations are not allowed on static methods.",
353353
DiagnosticSeverity.Error, "jakarta-bean-validation", "MakeNotStatic", "jakarta.validation.constraints.AssertFalse");
354354
Diagnostic d4 = d(36, 19, 28,
355-
"This annotation can only be used on CharSequence, Collection, Array, Map return type methods.",
355+
"This annotation can only be used on methods that have CharSequence, Collection, Array or Map as a return type.",
356356
DiagnosticSeverity.Error, "jakarta-bean-validation", "FixTypeOfElement", "jakarta.validation.constraints.Size");
357357
assertJavaDiagnostics(diagnosticsParams, utils, d1, d2, d3, d4);
358358

0 commit comments

Comments
 (0)