Fixed NodeFactory enum check

This commit is contained in:
Daniel Poustka 2020-12-26 15:46:57 +01:00
parent 853bf05ee5
commit faffec4f1c

View File

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