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,10 +59,12 @@ public class NodeFactory
case Customer: case Customer:
n = new Customer(startMoney); n = new Customer(startMoney);
break; break;
default:
} }
if (n != null)
{
String[] subs = subsChannels.split(";"); String[] subs = subsChannels.split(";");
for (String s : subs) for (String s : subs)
{ {
String[] el = s.split(" "); String[] el = s.split(" ");
@ -70,7 +72,7 @@ public class NodeFactory
ChannelPool temp = FoodChain.getFactoryManager().getPoolDatabaseInstance().getChannelPoolInstance(); ChannelPool temp = FoodChain.getFactoryManager().getPoolDatabaseInstance().getChannelPoolInstance();
n.subscribeToChannel(temp.findByType(ProductType.valueOf(el[0])), ChannelSubscriptionType.valueOf(el[1])); n.subscribeToChannel(temp.findByType(ProductType.valueOf(el[0])), ChannelSubscriptionType.valueOf(el[1]));
} }
}
return n; return n;
} }
} }