Skip to content

Commit

Permalink
Merge pull request #22 from izumin5210/allow-null-state
Browse files Browse the repository at this point in the history
Allow initial state null
  • Loading branch information
Masayuki IZUMI committed Nov 29, 2015
2 parents a478715 + eada2dd commit 7ee8b54
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ private MethodSpec createBuildMethodSpec() {
.beginControlFlow("if ($N == null)", reducerModel.getVariableName())
.addStatement("throw new $T(\"" + ERROR_MESSAGE_NOT_INITIALIZED_EXCEPTION + "\")",
NotInitializedException.class, reducerModel.getClassName())
.endControlFlow()
.beginControlFlow("if ($N == null)", reducerModel.getStateVariableName())
.addStatement("throw new $T(\"" + ERROR_MESSAGE_NOT_INITIALIZED_EXCEPTION + "\")",
NotInitializedException.class, reducerModel.getState())
.endControlFlow();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,6 @@ public static class Counter {
" if (counterReducer == null) {",
" throw new NotInitializedException(\"CounterReducer has not been initialized.\");",
" }",
" if (counter == null) {",
" throw new NotInitializedException(\"Counter has not been initialized.\");",
" }",
" return new DroiduxRootStore(this);",
" }",
" }",
Expand Down Expand Up @@ -285,15 +282,9 @@ public static class CombinedTwoReducers {
" if (counterReducer == null) {",
" throw new NotInitializedException(\"CounterReducer has not been initialized.\");",
" }",
" if (counter == null) {",
" throw new NotInitializedException(\"Counter has not been initialized.\");",
" }",
" if (todoListReducer == null) {",
" throw new NotInitializedException(\"TodoListReducer has not been initialized.\");",
" }",
" if (todoList == null) {",
" throw new NotInitializedException(\"TodoList has not been initialized.\");",
" }",
" return new DroiduxRootStore(this);",
" }",
" }",
Expand Down

0 comments on commit 7ee8b54

Please sign in to comment.