johnyangk commented on a change in pull request #270: [NEMO-429] SWPP TEAM4
Code Smell Fix
URL: https://github.com/apache/incubator-nemo/pull/270#discussion_r353590004
##########
File path: common/src/main/java/org/apache/nemo/common/StateMachine.java
##########
@@ -270,7 +273,7 @@ public Builder addState(final Enum stateEnum, final String
description) {
*/
public Builder setInitialState(final Enum stateToSet) {
if (!stateEnumSet.contains(stateToSet)) {
- throw new RuntimeException("A state " + stateToSet + " should be added
first");
+ throw new RuntimeException(RE_prefix + stateToSet + RE_suffix);
}
Review comment:
checkState(stateToSet)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services