diff --git a/core/src/main/java/org/elasticsearch/common/component/Lifecycle.java b/core/src/main/java/org/elasticsearch/common/component/Lifecycle.java
index 479496dd9b65b..4f0ef4c688763 100644
--- a/core/src/main/java/org/elasticsearch/common/component/Lifecycle.java
+++ b/core/src/main/java/org/elasticsearch/common/component/Lifecycle.java
@@ -19,7 +19,6 @@
package org.elasticsearch.common.component;
-
/**
* Lifecycle state. Allows the following transitions:
*
@@ -56,7 +55,7 @@
*/
public class Lifecycle {
- public static enum State {
+ public enum State {
INITIALIZED,
STOPPED,
STARTED,
@@ -141,9 +140,9 @@ public boolean canMoveToStopped() throws IllegalStateException {
return false;
}
if (localState == State.CLOSED) {
- throw new IllegalStateException("Can't move to started state when closed");
+ throw new IllegalStateException("Can't move to stopped state when closed");
}
- throw new IllegalStateException("Can't move to started with unknown state");
+ throw new IllegalStateException("Can't move to stopped with unknown state");
}
public boolean moveToStopped() throws IllegalStateException {
@@ -156,9 +155,9 @@ public boolean moveToStopped() throws IllegalStateException {
return false;
}
if (localState == State.CLOSED) {
- throw new IllegalStateException("Can't move to started state when closed");
+ throw new IllegalStateException("Can't move to stopped state when closed");
}
- throw new IllegalStateException("Can't move to started with unknown state");
+ throw new IllegalStateException("Can't move to stopped with unknown state");
}
public boolean canMoveToClosed() throws IllegalStateException {
@@ -172,7 +171,6 @@ public boolean canMoveToClosed() throws IllegalStateException {
return true;
}
-
public boolean moveToClosed() throws IllegalStateException {
State localState = state;
if (localState == State.CLOSED) {
@@ -189,4 +187,5 @@ public boolean moveToClosed() throws IllegalStateException {
public String toString() {
return state.toString();
}
+
}