diff --git a/src/main/java/seedu/cafectrl/storage/Decoder.java b/src/main/java/seedu/cafectrl/storage/Decoder.java index eca5d40f06..a12653be4f 100644 --- a/src/main/java/seedu/cafectrl/storage/Decoder.java +++ b/src/main/java/seedu/cafectrl/storage/Decoder.java @@ -31,6 +31,7 @@ public class Decoder { private static final String INGREDIENT_DIVIDER = " - "; private static final Ui ui = new Ui(); private static Logger logger = Logger.getLogger(CafeCtrl.class.getName()); + //@@author ShaniceTang /** * Decodes an ArrayList of string lines into a Menu object, reconstructing its content. @@ -125,6 +126,7 @@ public static Pantry decodePantryStockData(ArrayList encodedPantryStock) // Check whether the parameters are correct if (!Parser.containsSpecialChar(ingredientName) + && !Parser.isNameLengthInvalid(ingredientName) && !Parser.isRepeatedIngredientName(ingredientName, pantryStock) && !Parser.isInvalidQty(qty) && !Parser.isEmptyUnit(unit) @@ -226,5 +228,4 @@ private static ArrayList fillOrderListSize(ArrayList order } return orderLists; } - }