mirror of https://github.com/apache/nifi.git
NIFI-1282 This closes #228. Fixed error message when attempting to start a disabled port
Fixed error message when attempting to start a disabled port Signed-off-by: joewitt <joewitt@apache.org>
This commit is contained in:
parent
cae5b109c0
commit
ef0018cf66
|
@ -539,8 +539,13 @@ public abstract class AbstractPort implements Port {
|
|||
public void verifyCanStart() {
|
||||
readLock.lock();
|
||||
try {
|
||||
if (scheduledState.get() != ScheduledState.STOPPED) {
|
||||
throw new IllegalStateException(this + " is not stopped");
|
||||
switch (scheduledState.get()) {
|
||||
case DISABLED:
|
||||
throw new IllegalStateException(this + " cannot be started because it is disabled");
|
||||
case RUNNING:
|
||||
throw new IllegalStateException(this + " cannot be started because it is already running");
|
||||
case STOPPED:
|
||||
break;
|
||||
}
|
||||
verifyNoActiveThreads();
|
||||
|
||||
|
|
Loading…
Reference in New Issue