Repository: jhipster/jhipster-lite
Pull request #10570 (2024-08-15 16:36:25)

Grammar
<img width="330" alt="image" src="https://github.com/user-attachments/assets/e57b1758-6cc5-47b5-9436-5ed41f3850cb">
<hr>
<img width="223" alt="image" src="https://github.com/user-attachments/assets/bf802aee-2f24-45f5-ad1e-12faa780f8c4">
<hr>
<img width="324" alt="image" src="https://github.com/user-attachments/assets/197977dc-eb19-4034-ae92-d404c1fb2cdc">



Patch:
diff --git a/src/main/java/tech/jhipster/lite/shared/error/domain/Assert.java b/src/main/java/tech/jhipster/lite/shared/error/domain/Assert.java
index d80b232e6..306159c57 100644
--- a/src/main/java/tech/jhipster/lite/shared/error/domain/Assert.java
+++ b/src/main/java/tech/jhipster/lite/shared/error/domain/Assert.java
@@ -30,7 +30,7 @@ public final class Assert {
    * Ensure that the input is not null
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          input to check
    * @throws MissingMandatoryValueException
@@ -46,7 +46,7 @@ public final class Assert {
    * Ensure that the value is not blank (null, empty or only whitespace)
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          input to check
    * @throws MissingMandatoryValueException
@@ -60,7 +60,7 @@ public final class Assert {
    * Ensure that the given collection is not empty
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param collection
    *          collection to check
    * @throws MissingMandatoryValueException
@@ -74,7 +74,7 @@ public final class Assert {
    * Ensure that the value contains no whitespace
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          input to check
    * @throws MissingMandatoryValueException
@@ -100,7 +100,7 @@ public final class Assert {
    * </pre>
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          string to check
    * @return A {@link StringAsserter} for this field and value
@@ -125,7 +125,7 @@ public final class Assert {
    * </pre>
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          value to check
    * @return An {@link IntegerAsserter} for this field and value
@@ -150,7 +150,7 @@ public final class Assert {
    * </pre>
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          value to check
    * @return An {@link LongAsserter} for this field and value
@@ -175,7 +175,7 @@ public final class Assert {
    * </pre>
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          value to check
    * @return An {@link DoubleAsserter} for this field and value
@@ -200,7 +200,7 @@ public final class Assert {
    * </pre>
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          value to check
    * @return An {@link DoubleAsserter} for this field and value
@@ -225,7 +225,7 @@ public final class Assert {
    * </pre>
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          value to check
    * @return An {@link BigDecimalAsserter} for this field and value
@@ -250,7 +250,7 @@ public final class Assert {
    * </pre>
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          collection to check
    * @return A {@link CollectionAsserter} for this field and value
@@ -275,7 +275,7 @@ public final class Assert {
    * </pre>
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          array to check
    * @return A {@link ArrayAsserter} for this field and value
@@ -300,7 +300,7 @@ public final class Assert {
    * </pre>
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          value to check
    * @return An {@link InstantAsserter} for this field and value
@@ -1262,7 +1262,7 @@ public final class Assert {
      * @throws MissingMandatoryValueException
      *           if the input value is null
      * @throws NotAfterTimeException
-     *           if the input instant is in past
+     *           if the input instant is in the past
      */
     public InstantAsserter inFuture() {
       return afterOrAt(Instant.now());
@@ -1272,7 +1272,7 @@ public final class Assert {
      * Ensure that the input instant is after the given instant
      *
      * @param other
-     *          exclusive after instant
+     *          exclusive after an instant
      * @return The current asserter
      * @throws MissingMandatoryValueException
      *           if input or other are null
@@ -1294,7 +1294,7 @@ public final class Assert {
      * Ensure that the input instant is after the given instant
      *
      * @param other
-     *          inclusive after instant
+     *          inclusive after an instant
      * @return The current asserter
      * @throws MissingMandatoryValueException
      *           if input or other are null
@@ -1329,7 +1329,7 @@ public final class Assert {
      * Ensure that the input instant is before the given instant
      *
      * @param other
-     *          exclusive before instant
+     *          exclusive before an instant
      * @return The current asserter
      * @throws MissingMandatoryValueException
      *           if input or other are null
@@ -1351,7 +1351,7 @@ public final class Assert {
      * Ensure that the input instant is before the given instant
      *
      * @param other
-     *          inclusive before instant
+     *          inclusive before an instant
      * @return The current asserter
      * @throws MissingMandatoryValueException
      *           if input or other are null
diff --git a/src/main/resources/generator/server/javatool/base/main/error/Assert.java.mustache b/src/main/resources/generator/server/javatool/base/main/error/Assert.java.mustache
index bae79d46c..053f76a0c 100644
--- a/src/main/resources/generator/server/javatool/base/main/error/Assert.java.mustache
+++ b/src/main/resources/generator/server/javatool/base/main/error/Assert.java.mustache
@@ -28,7 +28,7 @@ public final class Assert {
    * Ensure that the input is not null
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          input to check
    * @throws MissingMandatoryValueException
@@ -44,7 +44,7 @@ public final class Assert {
    * Ensure that the value is not blank (null, empty or only whitespace)
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          input to check
    * @throws MissingMandatoryValueException
@@ -58,7 +58,7 @@ public final class Assert {
    * Ensure that the given collection is not empty
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param collection
    *          collection to check
    * @throws MissingMandatoryValueException
@@ -72,7 +72,7 @@ public final class Assert {
    * Ensure that the given map is not empty
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param map
    *          map to check
    * @throws MissingMandatoryValueException
@@ -102,7 +102,7 @@ public final class Assert {
    * </pre>
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          string to check
    * @return A {@link StringAsserter} for this field and value
@@ -127,7 +127,7 @@ public final class Assert {
    * </pre>
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          value to check
    * @return An {@link IntegerAsserter} for this field and value
@@ -152,7 +152,7 @@ public final class Assert {
    * </pre>
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          value to check
    * @return An {@link LongAsserter} for this field and value
@@ -177,7 +177,7 @@ public final class Assert {
    * </pre>
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          value to check
    * @return An {@link DoubleAsserter} for this field and value
@@ -202,7 +202,7 @@ public final class Assert {
    * </pre>
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          value to check
    * @return An {@link DoubleAsserter} for this field and value
@@ -227,7 +227,7 @@ public final class Assert {
    * </pre>
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          value to check
    * @return An {@link BigDecimalAsserter} for this field and value
@@ -252,7 +252,7 @@ public final class Assert {
    * </pre>
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          collection to check
    * @return A {@link CollectionAsserter} for this field and value
@@ -277,7 +277,7 @@ public final class Assert {
    * </pre>
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          array to check
    * @return A {@link ArrayAsserter} for this field and value
@@ -302,7 +302,7 @@ public final class Assert {
    * </pre>
    *
    * @param field
-   *          name of the field to check (will be displayed in exception message)
+   *          name of the field to check (will be displayed in an exception message)
    * @param input
    *          value to check
    * @return An {@link InstantAsserter} for this field and value
@@ -1211,7 +1211,7 @@ public final class Assert {
      * @throws MissingMandatoryValueException
      *           if the input value is null
      * @throws NotAfterTimeException
-     *           if the input instant is in past
+     *           if the input instant is in the past
      */
     public InstantAsserter inFuture() {
       return afterOrAt(Instant.now());
@@ -1221,7 +1221,7 @@ public final class Assert {
      * Ensure that the input instant is after the given instant
      *
      * @param other
-     *          exclusive after instant
+     *          exclusive after an instant
      * @return The current asserter
      * @throws MissingMandatoryValueException
      *           if input or other are null
@@ -1243,7 +1243,7 @@ public final class Assert {
      * Ensure that the input instant is after the given instant
      *
      * @param other
-     *          inclusive after instant
+     *          inclusive after an instant
      * @return The current asserter
      * @throws MissingMandatoryValueException
      *           if input or other are null
@@ -1278,7 +1278,7 @@ public final class Assert {
      * Ensure that the input instant is before the given instant
      *
      * @param other
-     *          exclusive before instant
+     *          exclusive before an instant
      * @return The current asserter
      * @throws MissingMandatoryValueException
      *           if input or other are null
@@ -1300,7 +1300,7 @@ public final class Assert {
      * Ensure that the input instant is before the given instant
      *
      * @param other
-     *          inclusive before instant
+     *          inclusive before an instant
      * @return The current asserter
      * @throws MissingMandatoryValueException
      *           if input or other are null


Test patch:
diff --git a/src/test/java/tech/jhipster/lite/module/domain/JHipsterModulesFixture.java b/src/test/java/tech/jhipster/lite/module/domain/JHipsterModulesFixture.java
index b236ebab2..95f7c1396 100644
--- a/src/test/java/tech/jhipster/lite/module/domain/JHipsterModulesFixture.java
+++ b/src/test/java/tech/jhipster/lite/module/domain/JHipsterModulesFixture.java
@@ -77,7 +77,7 @@ public final class JHipsterModulesFixture {
     .mandatoryReplacements()
       .in(path("src/main/java/com/company/myapp/errors/Assert.java"))
         .add(text("Ensure that the input is not null"), "Dummy replacement")
-        .add(regex("will be displayed in [^ ]+ message"), "Another dummy replacement")
+        .add(regex("will be displayed in an [^ ]+ message"), "Another dummy replacement")
         .add(lineBeforeText("import java.util.Objects;"), "import java.util.Collection;")
         .and()
       .and()