From 735a06f28c6aac411a640de009994ab888ed2bee Mon Sep 17 00:00:00 2001 From: Janne Valkealahti Date: Wed, 9 Nov 2016 14:18:35 +0000 Subject: [PATCH] Fix typos - "contextOjb" vs. "contextObj" - Fixes #269 --- .../statemachine/StateMachinePersist.java | 8 ++++---- .../persist/AbstractStateMachinePersister.java | 8 ++++---- .../persist/RepositoryStateMachinePersist.java | 8 ++++---- .../persist/StateMachinePersister.java | 8 ++++---- .../docs/DocsConfigurationSampleTests5.java | 8 ++++---- .../persist/StateMachinePersistTests.java | 16 ++++++++-------- .../persist/StateMachinePersistTests2.java | 8 ++++---- .../persist/StateMachinePersistTests3.java | 8 ++++---- .../persist/StateMachinePersistTests4.java | 8 ++++---- .../recipes/TestStateMachinePersist.java | 4 ++-- .../demo/eventservice/EventServiceTests.java | 8 ++++---- 11 files changed, 46 insertions(+), 46 deletions(-) diff --git a/spring-statemachine-core/src/main/java/org/springframework/statemachine/StateMachinePersist.java b/spring-statemachine-core/src/main/java/org/springframework/statemachine/StateMachinePersist.java index 481e05ad..531db715 100644 --- a/spring-statemachine-core/src/main/java/org/springframework/statemachine/StateMachinePersist.java +++ b/spring-statemachine-core/src/main/java/org/springframework/statemachine/StateMachinePersist.java @@ -33,19 +33,19 @@ public interface StateMachinePersist { * with a context object {@code T}. * * @param context the context - * @param contextOjb the context ojb + * @param contextObj the context ojb * @throws Exception the exception */ - void write(StateMachineContext context, T contextOjb) throws Exception; + void write(StateMachineContext context, T contextObj) throws Exception; /** * Read a {@link StateMachineContext} from a persistent store * with a context object {@code T}. * - * @param contextOjb the context ojb + * @param contextObj the context ojb * @return the state machine context * @throws Exception the exception */ - StateMachineContext read(T contextOjb) throws Exception; + StateMachineContext read(T contextObj) throws Exception; } diff --git a/spring-statemachine-core/src/main/java/org/springframework/statemachine/persist/AbstractStateMachinePersister.java b/spring-statemachine-core/src/main/java/org/springframework/statemachine/persist/AbstractStateMachinePersister.java index 6ca58e5c..b2161d57 100644 --- a/spring-statemachine-core/src/main/java/org/springframework/statemachine/persist/AbstractStateMachinePersister.java +++ b/spring-statemachine-core/src/main/java/org/springframework/statemachine/persist/AbstractStateMachinePersister.java @@ -61,13 +61,13 @@ public abstract class AbstractStateMachinePersister implements StateMac } @Override - public final void persist(StateMachine stateMachine, T contextOjb) throws Exception { - stateMachinePersist.write(buildStateMachineContext(stateMachine), contextOjb); + public final void persist(StateMachine stateMachine, T contextObj) throws Exception { + stateMachinePersist.write(buildStateMachineContext(stateMachine), contextObj); } @Override - public final StateMachine restore(StateMachine stateMachine, T contextOjb) throws Exception { - final StateMachineContext context = stateMachinePersist.read(contextOjb); + public final StateMachine restore(StateMachine stateMachine, T contextObj) throws Exception { + final StateMachineContext context = stateMachinePersist.read(contextObj); stateMachine.stop(); stateMachine.getStateMachineAccessor().doWithAllRegions(new StateMachineFunction>() { diff --git a/spring-statemachine-core/src/main/java/org/springframework/statemachine/persist/RepositoryStateMachinePersist.java b/spring-statemachine-core/src/main/java/org/springframework/statemachine/persist/RepositoryStateMachinePersist.java index aad87d7f..ef0a5b16 100644 --- a/spring-statemachine-core/src/main/java/org/springframework/statemachine/persist/RepositoryStateMachinePersist.java +++ b/spring-statemachine-core/src/main/java/org/springframework/statemachine/persist/RepositoryStateMachinePersist.java @@ -42,13 +42,13 @@ public class RepositoryStateMachinePersist implements StateMachinePersist< } @Override - public void write(StateMachineContext context, String contextOjb) throws Exception { - repository.save(context, contextOjb); + public void write(StateMachineContext context, String contextObj) throws Exception { + repository.save(context, contextObj); } @Override - public StateMachineContext read(String contextOjb) throws Exception { - return repository.getContext(contextOjb); + public StateMachineContext read(String contextObj) throws Exception { + return repository.getContext(contextObj); } } diff --git a/spring-statemachine-core/src/main/java/org/springframework/statemachine/persist/StateMachinePersister.java b/spring-statemachine-core/src/main/java/org/springframework/statemachine/persist/StateMachinePersister.java index 9e829d1b..2a462fea 100644 --- a/spring-statemachine-core/src/main/java/org/springframework/statemachine/persist/StateMachinePersister.java +++ b/spring-statemachine-core/src/main/java/org/springframework/statemachine/persist/StateMachinePersister.java @@ -33,19 +33,19 @@ public interface StateMachinePersister { * Persist a state machine with a given context object. * * @param stateMachine the state machine - * @param contextOjb the context ojb + * @param contextObj the context ojb * @throws Exception the exception in case or any persist error */ - void persist(StateMachine stateMachine, T contextOjb) throws Exception; + void persist(StateMachine stateMachine, T contextObj) throws Exception; /** * Reset a state machine with a given context object. * Returned machine has been reseted and is ready to be used. * * @param stateMachine the state machine - * @param contextOjb the context ojb + * @param contextObj the context ojb * @return the state machine * @throws Exception the exception in case or any persist error */ - StateMachine restore(StateMachine stateMachine, T contextOjb) throws Exception; + StateMachine restore(StateMachine stateMachine, T contextObj) throws Exception; } diff --git a/spring-statemachine-core/src/test/java/org/springframework/statemachine/docs/DocsConfigurationSampleTests5.java b/spring-statemachine-core/src/test/java/org/springframework/statemachine/docs/DocsConfigurationSampleTests5.java index 0acca574..45d54aa4 100644 --- a/spring-statemachine-core/src/test/java/org/springframework/statemachine/docs/DocsConfigurationSampleTests5.java +++ b/spring-statemachine-core/src/test/java/org/springframework/statemachine/docs/DocsConfigurationSampleTests5.java @@ -104,13 +104,13 @@ public class DocsConfigurationSampleTests5 extends AbstractStateMachineTests { private final HashMap> contexts = new HashMap<>(); @Override - public void write(StateMachineContext context, String contextOjb) throws Exception { - contexts.put(contextOjb, context); + public void write(StateMachineContext context, String contextObj) throws Exception { + contexts.put(contextObj, context); } @Override - public StateMachineContext read(String contextOjb) throws Exception { - return contexts.get(contextOjb); + public StateMachineContext read(String contextObj) throws Exception { + return contexts.get(contextObj); } } // end::snippetB[] diff --git a/spring-statemachine-core/src/test/java/org/springframework/statemachine/persist/StateMachinePersistTests.java b/spring-statemachine-core/src/test/java/org/springframework/statemachine/persist/StateMachinePersistTests.java index 3b4437c5..d974e780 100644 --- a/spring-statemachine-core/src/test/java/org/springframework/statemachine/persist/StateMachinePersistTests.java +++ b/spring-statemachine-core/src/test/java/org/springframework/statemachine/persist/StateMachinePersistTests.java @@ -661,13 +661,13 @@ public class StateMachinePersistTests extends AbstractStateMachineTests { private final HashMap> contexts = new HashMap<>(); @Override - public void write(StateMachineContext context, String contextOjb) throws Exception { - contexts.put(contextOjb, context); + public void write(StateMachineContext context, String contextObj) throws Exception { + contexts.put(contextObj, context); } @Override - public StateMachineContext read(String contextOjb) throws Exception { - return contexts.get(contextOjb); + public StateMachineContext read(String contextObj) throws Exception { + return contexts.get(contextObj); } } @@ -676,13 +676,13 @@ public class StateMachinePersistTests extends AbstractStateMachineTests { private final HashMap> contexts = new HashMap<>(); @Override - public void write(StateMachineContext context, String contextOjb) throws Exception { - contexts.put(contextOjb, context); + public void write(StateMachineContext context, String contextObj) throws Exception { + contexts.put(contextObj, context); } @Override - public StateMachineContext read(String contextOjb) throws Exception { - return contexts.get(contextOjb); + public StateMachineContext read(String contextObj) throws Exception { + return contexts.get(contextObj); } } diff --git a/spring-statemachine-core/src/test/java/org/springframework/statemachine/persist/StateMachinePersistTests2.java b/spring-statemachine-core/src/test/java/org/springframework/statemachine/persist/StateMachinePersistTests2.java index 5aedf4e6..a80dce63 100644 --- a/spring-statemachine-core/src/test/java/org/springframework/statemachine/persist/StateMachinePersistTests2.java +++ b/spring-statemachine-core/src/test/java/org/springframework/statemachine/persist/StateMachinePersistTests2.java @@ -282,13 +282,13 @@ public class StateMachinePersistTests2 extends AbstractStateMachineTests { private final Map> contexts = new HashMap<>(); @Override - public void write(StateMachineContext stateMachineContext, String contextOjb) throws Exception { - contexts.put(contextOjb,stateMachineContext); + public void write(StateMachineContext stateMachineContext, String contextObj) throws Exception { + contexts.put(contextObj,stateMachineContext); } @Override - public StateMachineContext read(String contextOjb) throws Exception { - return contexts.get(contextOjb); + public StateMachineContext read(String contextObj) throws Exception { + return contexts.get(contextObj); } } } diff --git a/spring-statemachine-core/src/test/java/org/springframework/statemachine/persist/StateMachinePersistTests3.java b/spring-statemachine-core/src/test/java/org/springframework/statemachine/persist/StateMachinePersistTests3.java index 9f892538..787e6146 100644 --- a/spring-statemachine-core/src/test/java/org/springframework/statemachine/persist/StateMachinePersistTests3.java +++ b/spring-statemachine-core/src/test/java/org/springframework/statemachine/persist/StateMachinePersistTests3.java @@ -176,13 +176,13 @@ public class StateMachinePersistTests3 extends AbstractStateMachineTests { private final HashMap> contexts = new HashMap<>(); @Override - public void write(StateMachineContext context, String contextOjb) throws Exception { - contexts.put(contextOjb, context); + public void write(StateMachineContext context, String contextObj) throws Exception { + contexts.put(contextObj, context); } @Override - public StateMachineContext read(String contextOjb) throws Exception { - return contexts.get(contextOjb); + public StateMachineContext read(String contextObj) throws Exception { + return contexts.get(contextObj); } } } diff --git a/spring-statemachine-core/src/test/java/org/springframework/statemachine/persist/StateMachinePersistTests4.java b/spring-statemachine-core/src/test/java/org/springframework/statemachine/persist/StateMachinePersistTests4.java index 054a406f..229fa2d8 100644 --- a/spring-statemachine-core/src/test/java/org/springframework/statemachine/persist/StateMachinePersistTests4.java +++ b/spring-statemachine-core/src/test/java/org/springframework/statemachine/persist/StateMachinePersistTests4.java @@ -162,13 +162,13 @@ public class StateMachinePersistTests4 extends AbstractStateMachineTests { private final HashMap> contexts = new HashMap<>(); @Override - public void write(StateMachineContext context, String contextOjb) throws Exception { - contexts.put(contextOjb, context); + public void write(StateMachineContext context, String contextObj) throws Exception { + contexts.put(contextObj, context); } @Override - public StateMachineContext read(String contextOjb) throws Exception { - return contexts.get(contextOjb); + public StateMachineContext read(String contextObj) throws Exception { + return contexts.get(contextObj); } } } diff --git a/spring-statemachine-recipes/src/test/java/org/springframework/statemachine/recipes/TestStateMachinePersist.java b/spring-statemachine-recipes/src/test/java/org/springframework/statemachine/recipes/TestStateMachinePersist.java index 2ed44b04..8438a7be 100644 --- a/spring-statemachine-recipes/src/test/java/org/springframework/statemachine/recipes/TestStateMachinePersist.java +++ b/spring-statemachine-recipes/src/test/java/org/springframework/statemachine/recipes/TestStateMachinePersist.java @@ -35,7 +35,7 @@ public class TestStateMachinePersist implements StateMachinePersist context, Void contextOjb) throws Exception { + public void write(StateMachineContext context, Void contextObj) throws Exception { synchronized (this) { contexts.add(context); } @@ -44,7 +44,7 @@ public class TestStateMachinePersist implements StateMachinePersist read(Void contextOjb) throws Exception { + public StateMachineContext read(Void contextObj) throws Exception { return context; } diff --git a/spring-statemachine-samples/eventservice/src/test/java/demo/eventservice/EventServiceTests.java b/spring-statemachine-samples/eventservice/src/test/java/demo/eventservice/EventServiceTests.java index 04049d68..766042c6 100644 --- a/spring-statemachine-samples/eventservice/src/test/java/demo/eventservice/EventServiceTests.java +++ b/spring-statemachine-samples/eventservice/src/test/java/demo/eventservice/EventServiceTests.java @@ -119,13 +119,13 @@ public class EventServiceTests { private final HashMap> contexts = new HashMap<>(); @Override - public void write(StateMachineContext context, String contextOjb) throws Exception { - contexts.put(contextOjb, context); + public void write(StateMachineContext context, String contextObj) throws Exception { + contexts.put(contextObj, context); } @Override - public StateMachineContext read(String contextOjb) throws Exception { - return contexts.get(contextOjb); + public StateMachineContext read(String contextObj) throws Exception { + return contexts.get(contextObj); } } }