Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
NightlyNexus authored Jan 16, 2017
1 parent e2d7a13 commit dd17e5b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ final class StringSetAdapter implements Preference.Adapter<Set<String>> {
static final StringSetAdapter INSTANCE = new StringSetAdapter();

@Override public Set<String> get(@NonNull String key, @NonNull SharedPreferences preferences) {
return Collections.unmodifiableSet(preferences.getStringSet(key, null));
Set<String> set = preferences.getStringSet(key, null);
if (set == null) {
return null;
}
return Collections.unmodifiableSet(set);
}

@Override public void set(@NonNull String key, @NonNull Set<String> value,
Expand Down

0 comments on commit dd17e5b

Please sign in to comment.