Fixed Product constructor usage

This commit is contained in:
Daniel Poustka 2020-12-25 18:45:57 +01:00
parent 76ca92e676
commit 8aa2c490c1

View File

@ -20,9 +20,11 @@ public class ProductFactory
{
String name = input.getAttribute("name");
ProductType productType = ProductType.valueOf(input.getChild("type"));
ProductState productState = ProductState.valueOf(input.getChild("state"));
//ProductState productState = ProductState.valueOf(input.getChild("state"));
int price = Integer.getInteger(input.getChild("price"));
p = new Product(name, productType, productState);
//p = new Product(name, price, productType, productState);
p = new Product(name, productType, price);
}
catch (IllegalArgumentException e)
{