Repository: iluwatar/java-design-patterns
Issue: Fix typos in javadocs of Event sourcing
Labels: type: feature
epic: documentation

I'll correct typos and grammatical errors suggested by ide or sonarlint :)

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/event-sourcing/README.md b/event-sourcing/README.md
index 8bec3c52a4e8..423f892cb24a 100644
--- a/event-sourcing/README.md
+++ b/event-sourcing/README.md
@@ -16,7 +16,7 @@ Instead of storing just the current state of the data in a domain, use an append
 ## Applicability
 Use the Event Sourcing pattern when
 
-* You need very high performance on persisting your application state even your application state have a complex relational data structure  
+* You need very high performance on persisting your application state even your application state has a complex relational data structure  
 * You need log of changes of your application state and ability to restore a state of any moment in time.
 * You need to debug production problems by replaying the past events. 
 
diff --git a/event-sourcing/src/main/java/com/iluwatar/event/sourcing/app/App.java b/event-sourcing/src/main/java/com/iluwatar/event/sourcing/app/App.java
index ac11782cf7d7..d356a8b99f8a 100644
--- a/event-sourcing/src/main/java/com/iluwatar/event/sourcing/app/App.java
+++ b/event-sourcing/src/main/java/com/iluwatar/event/sourcing/app/App.java
@@ -34,7 +34,7 @@
 import lombok.extern.slf4j.Slf4j;
 
 /**
- * Event Sourcing : Instead of storing just the current state of the data in a domain, use an
+ * Event Sourcing: Instead of storing just the current state of the data in a domain, use an
  * append-only store to record the full series of actions taken on that data. The store acts as the
  * system of record and can be used to materialize the domain objects. This can simplify tasks in
  * complex domains, by avoiding the need to synchronize the data model and the business domain,
@@ -42,11 +42,11 @@
  * transactional data, and maintain full audit trails and history that can enable compensating
  * actions.
  *
- * <p>This App class is an example usage of Event Sourcing pattern. As an example, two bank account
- * is created, then some money deposit and transfer actions are taken so a new state of accounts is
- * created. At that point, state is cleared in order to represent a system shot down. After the shot
- * down, system state is recovered by re-creating the past events from event journal. Then state is
- * printed so a user can view the last state is same with the state before system shot down.
+ * <p>This App class is an example usage of an Event Sourcing pattern. As an example, two bank accounts
+ * are created, then some money deposit and transfer actions are taken, so a new state of accounts is
+ * created. At that point, state is cleared in order to represent a system shut-down. After the shut-down,
+ * system state is recovered by re-creating the past events from event journals. Then state is
+ * printed so a user can view the last state is same with the state before a system shut-down.
  *
  * <p>Created by Serdar Hamzaogullari on 06.08.2017.
  */
diff --git a/event-sourcing/src/main/java/com/iluwatar/event/sourcing/domain/Account.java b/event-sourcing/src/main/java/com/iluwatar/event/sourcing/domain/Account.java
index 429fd61d262b..177348be86a3 100644
--- a/event-sourcing/src/main/java/com/iluwatar/event/sourcing/domain/Account.java
+++ b/event-sourcing/src/main/java/com/iluwatar/event/sourcing/domain/Account.java
@@ -115,7 +115,7 @@ public void handleEvent(MoneyDepositEvent moneyDepositEvent) {
   /**
    * Handles the AccountCreateEvent.
    *
-   * @param accountCreateEvent the account create event
+   * @param accountCreateEvent the account created event
    */
   public void handleEvent(AccountCreateEvent accountCreateEvent) {
     AccountAggregate.putAccount(this);
diff --git a/event-sourcing/src/main/java/com/iluwatar/event/sourcing/event/AccountCreateEvent.java b/event-sourcing/src/main/java/com/iluwatar/event/sourcing/event/AccountCreateEvent.java
index 71ea65ca3419..9e6b40e62ee0 100644
--- a/event-sourcing/src/main/java/com/iluwatar/event/sourcing/event/AccountCreateEvent.java
+++ b/event-sourcing/src/main/java/com/iluwatar/event/sourcing/event/AccountCreateEvent.java
@@ -29,8 +29,9 @@
 import lombok.Getter;
 
 /**
- * This is the class that implements account create event. Holds the necessary info for an account
- * create event. Implements the process function that finds the event related domain objects and
+ * This is the class that implements account created event.
+ * Holds the necessary info for an account created event.
+ * Implements the process function that finds the event-related domain objects and
  * calls the related domain object's handle event functions
  *
  * <p>Created by Serdar Hamzaogullari on 06.08.2017.
@@ -42,7 +43,7 @@ public class AccountCreateEvent extends DomainEvent {
   private final String owner;
 
   /**
-   * Instantiates a new Account create event.
+   * Instantiates a new Account created event.
    *
    * @param sequenceId  the sequence id
    * @param createdTime the created time
diff --git a/event-sourcing/src/main/java/com/iluwatar/event/sourcing/event/MoneyDepositEvent.java b/event-sourcing/src/main/java/com/iluwatar/event/sourcing/event/MoneyDepositEvent.java
index f094e8f6b61e..96afd4640012 100644
--- a/event-sourcing/src/main/java/com/iluwatar/event/sourcing/event/MoneyDepositEvent.java
+++ b/event-sourcing/src/main/java/com/iluwatar/event/sourcing/event/MoneyDepositEvent.java
@@ -31,7 +31,7 @@
 
 /**
  * This is the class that implements money deposit event. Holds the necessary info for a money
- * deposit event. Implements the process function that finds the event related domain objects and
+ * deposit event. Implements the process function that finds the event-related domain objects and
  * calls the related domain object's handle event functions
  *
  * <p>Created by Serdar Hamzaogullari on 06.08.2017.
diff --git a/event-sourcing/src/main/java/com/iluwatar/event/sourcing/event/MoneyTransferEvent.java b/event-sourcing/src/main/java/com/iluwatar/event/sourcing/event/MoneyTransferEvent.java
index 2f0a0cb52fdd..18d98cded008 100644
--- a/event-sourcing/src/main/java/com/iluwatar/event/sourcing/event/MoneyTransferEvent.java
+++ b/event-sourcing/src/main/java/com/iluwatar/event/sourcing/event/MoneyTransferEvent.java
@@ -31,7 +31,7 @@
 
 /**
  * This is the class that implements money transfer event. Holds the necessary info for a money
- * transfer event. Implements the process function that finds the event related domain objects and
+ * transfer event. Implements the process function that finds the event-related domain objects and
  * calls the related domain object's handle event functions
  *
  * <p>Created by Serdar Hamzaogullari on 06.08.2017.
diff --git a/event-sourcing/src/main/java/com/iluwatar/event/sourcing/processor/JsonFileJournal.java b/event-sourcing/src/main/java/com/iluwatar/event/sourcing/processor/JsonFileJournal.java
index 42283c460e64..048e270e2eaa 100644
--- a/event-sourcing/src/main/java/com/iluwatar/event/sourcing/processor/JsonFileJournal.java
+++ b/event-sourcing/src/main/java/com/iluwatar/event/sourcing/processor/JsonFileJournal.java
@@ -91,7 +91,7 @@ public void write(DomainEvent domainEvent) {
     } else if (domainEvent instanceof MoneyTransferEvent) {
       jsonElement = gson.toJsonTree(domainEvent, MoneyTransferEvent.class);
     } else {
-      throw new RuntimeException("Journal Event not recegnized");
+      throw new RuntimeException("Journal Event not recognized");
     }
 
     try (var output = new BufferedWriter(
@@ -113,7 +113,7 @@ public void reset() {
 
 
   /**
-   * Read next domain event.
+   * Read the next domain event.
    *
    * @return the domain event
    */


Test patch:
diff --git a/event-sourcing/src/test/java/IntegrationTest.java b/event-sourcing/src/test/java/IntegrationTest.java
index 6d30a89fc582..9e15a2163bcc 100644
--- a/event-sourcing/src/test/java/IntegrationTest.java
+++ b/event-sourcing/src/test/java/IntegrationTest.java
@@ -37,7 +37,7 @@
 import org.junit.jupiter.api.Test;
 
 /**
- * Intergartion Test for Event Sourcing state recovery
+ * Integration Test for Event-Sourcing state recovery
  * <p>
  * Created by Serdar Hamzaogullari on 19.08.2017.
  */
@@ -95,4 +95,4 @@ void testStateRecovery() {
     assertEquals(accountOfJonBeforeShotDown.getMoney(), accountOfJonAfterShotDown.getMoney());
   }
 
-}
\ No newline at end of file
+}