Commit 2a632aee authored by R.W.Majeed's avatar R.W.Majeed
Browse files

Fixed error during destination chain building

parent 0fd0cf75
......@@ -64,10 +64,12 @@ public class RunConfiguration implements Closeable{
private void buildDestinationChain(Configuration conf){
PluginRef[] ds = conf.getDestinations();
destinationChain = (Consumer<Observation>)plugins[getPluginIndex(conf, ds[0].getPlugin())];
destinationChain = null;
// chain subsequent destinations in order of configuration
for( int i=1; i<ds.length; i++ ){
destinationChain.andThen((Consumer<Observation>)plugins[getPluginIndex(conf, ds[0].getPlugin())]);
for( int i=0; i<ds.length; i++ ){
Consumer<Observation> dest = (Consumer<Observation>)plugins[getPluginIndex(conf, ds[i].getPlugin())];
if( destinationChain == null )destinationChain = dest;
else destinationChain = destinationChain.andThen(dest);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment