Merge branch 'feature/factory_impl' into develop

This commit is contained in:
Nikita Iryupin 2020-12-26 17:00:51 +01:00
commit c81e2b0332

View File

@ -59,18 +59,20 @@ public class NodeFactory
case Customer:
n = new Customer(startMoney);
break;
default:
}
String[] subs = subsChannels.split(";");
for (String s : subs)
if (n != null)
{
String[] el = s.split(" ");
String[] subs = subsChannels.split(";");
for (String s : subs)
{
String[] el = s.split(" ");
ChannelPool temp = FoodChain.getFactoryManager().getPoolDatabaseInstance().getChannelPoolInstance();
n.subscribeToChannel(temp.findByType(ProductType.valueOf(el[0])), ChannelSubscriptionType.valueOf(el[1]));
ChannelPool temp = FoodChain.getFactoryManager().getPoolDatabaseInstance().getChannelPoolInstance();
n.subscribeToChannel(temp.findByType(ProductType.valueOf(el[0])), ChannelSubscriptionType.valueOf(el[1]));
}
}
return n;
}
}