diff --git a/app/src/main/java/com/udacity/stockhawk/data/PrefUtils.java b/app/src/main/java/com/udacity/stockhawk/data/PrefUtils.java index 4e489b52..afab5fa9 100644 --- a/app/src/main/java/com/udacity/stockhawk/data/PrefUtils.java +++ b/app/src/main/java/com/udacity/stockhawk/data/PrefUtils.java @@ -39,7 +39,7 @@ public static Set getStocks(Context context) { private static void editStockPref(Context context, String symbol, Boolean add) { String key = context.getString(R.string.pref_stocks_key); - Set stocks = getStocks(context); + Set stocks = new HashSet<>(getStocks(context)); if (add) { stocks.add(symbol);