Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow initial state null #22

Merged
merged 1 commit into from
Nov 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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