diff --git a/src/Data.java b/src/Data.java index fbc45cb..16d3d84 100644 --- a/src/Data.java +++ b/src/Data.java @@ -67,113 +67,113 @@ public class Data { boolean eggs = false; - if (allergens != "") { + if (!allergens.isEmpty()) { eggs = true; } allergens = parts[5]; boolean peanuts = false; - if (allergens != "") { + if (!allergens.isEmpty()) { peanuts = true; } allergens = parts[6]; boolean fish = false; - if (allergens != "") { + if (!allergens.isEmpty()) { fish = true; } allergens = parts[7]; boolean grains = false; - if (allergens != "") { + if (!allergens.isEmpty()) { grains = true; } allergens = parts[8]; boolean crustaceans = false; - if (allergens != "") { + if (!allergens.isEmpty()) { crustaceans = true; } allergens = parts[9]; boolean lupines = false; - if (allergens != "") { + if (!allergens.isEmpty()) { lupines = true; } allergens = parts[10]; boolean milk = false; - if (allergens != "") { + if (!allergens.isEmpty()) { milk = true; } allergens = parts[11]; boolean nuts = false; - if (allergens != "") { + if (!allergens.isEmpty()) { nuts = true; } allergens = parts[12]; boolean sulfurDioxideAndSulfite = false; - if (allergens != "") { + if (!allergens.isEmpty()) { sulfurDioxideAndSulfite = true; } allergens = parts[13]; boolean celeriac = false; - if (allergens != "") { + if (!allergens.isEmpty()) { celeriac = true; } allergens = parts[14]; boolean mustards = false; - if (allergens != "") { + if (!allergens.isEmpty()) { mustards = true; } allergens = parts[15]; boolean sesame = false; - if (allergens != "") { + if (!allergens.isEmpty()) { sesame = true; } allergens = parts[16]; boolean soy = false; - if (allergens != "") { + if (!allergens.isEmpty()) { soy = true; } allergens = parts[17]; boolean molluscs = false; - if (allergens != "") { + if (!allergens.isEmpty()) { molluscs = true; } String additives = parts[18]; boolean antioxidant = false; - if (additives != "") { + if (!additives.isEmpty()) { antioxidant = true; } additives = parts[19]; boolean artificialColours = false; - if (additives != "") { + if (!additives.isEmpty()) { artificialColours = true; } additives = parts[20]; boolean flavourEnhancer = false; - if (additives != "") { + if (!additives.isEmpty()) { flavourEnhancer = true; } additives = parts[21]; boolean preservatives = false; - if (additives != "") { + if (!additives.isEmpty()) { preservatives = true; } additives = parts[22]; boolean nitrate = false; - if (additives != "") { + if (!additives.isEmpty()) { nitrate = true; } additives = parts[23]; boolean picklingSalt = false; - if (additives != "") { + if (!additives.isEmpty()) { picklingSalt = true; } additives = parts[24]; boolean phosphate = false; - if (additives != "") { + if (!additives.isEmpty()) { phosphate = true; } additives = parts[25]; boolean artificialSweetener = false; - if (additives != "") { + if (!additives.isEmpty()) { artificialSweetener = true; }