Skip to content
Snippets Groups Projects
Commit b17f61f2 authored by Nelson Tavares de Sousa's avatar Nelson Tavares de Sousa
Browse files

Merge remote-tracking branch 'origin/master' into connector-survey

parents 7c39568b 624a9de1
No related branches found
No related tags found
No related merge requests found
#FindBugs User Preferences
#Tue Jun 16 14:12:15 CEST 2015
#Thu Jun 18 09:21:56 CEST 2015
detector_threshold=2
effort=max
excludefilter0=.fbExcludeFilterFile|true
......
......
......@@ -27,7 +27,7 @@ import teetime.framework.validation.InvalidPortConnection;
public abstract class AbstractStage extends Stage {
private static final IPipe DUMMY_PORT = new DummyPipe();
private static final IPipe DUMMY_PIPE = new DummyPipe();
private final Set<Class<? extends ISignal>> triggeredSignalTypes = new HashSet<Class<? extends ISignal>>();
......@@ -90,22 +90,7 @@ public abstract class AbstractStage extends Stage {
@Override
public void onInitializing() throws Exception {
this.connectUnconnectedOutputPorts();
currentState = StageState.INITIALIZED;
logger.trace("Initialized.");
}
@Override
public void onValidating(final List<InvalidPortConnection> invalidPortConnections) {
this.validateOutputPorts(invalidPortConnections);
currentState = StageState.VALIDATED;
logger.trace("Validated.");
}
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Override
public void onStarting() throws Exception {
currentState = StageState.STARTED;
logger.trace("Started.");
changeState(StageState.INITIALIZED);
}
@SuppressWarnings("PMD.DataflowAnomalyAnalysis")
......@@ -115,16 +100,32 @@ public abstract class AbstractStage extends Stage {
if (logger.isInfoEnabled()) {
this.logger.info("Unconnected output port: " + outputPort + ". Connecting with a dummy output port.");
}
outputPort.setPipe(DUMMY_PORT);
outputPort.setPipe(DUMMY_PIPE);
}
}
}
private void changeState(final StageState newState) {
currentState = newState;
logger.trace(newState.toString());
}
@Override
public void onValidating(final List<InvalidPortConnection> invalidPortConnections) {
this.validateOutputPorts(invalidPortConnections);
changeState(StageState.VALIDATED);
}
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Override
public void onStarting() throws Exception {
changeState(StageState.STARTED);
}
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Override
public void onTerminating() throws Exception {
currentState = StageState.TERMINATED;
logger.trace("Terminated.");
changeState(StageState.TERMINATED);
}
/**
......
......
wiki @ 0a5bd4dd
Subproject commit 0a5bd4ddb82684ce1ae2ec84c67ff2117ebff143
......@@ -131,7 +131,7 @@ public class DistributorTest {
}
@Test
public void cloneForSimpleBeanShoulWork() throws Exception {
public void cloneForSimpleBeanShouldWork() throws Exception {
final Distributor<SimpleBean> distributor = new Distributor<SimpleBean>(new CloneStrategy());
final List<SimpleBean> results = new ArrayList<SimpleBean>();
final SimpleBean originalBean = new SimpleBean(42);
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment