Replace manual array t collection copy

This commit is contained in:
Martin Fietz 2018-01-14 17:59:51 +01:00
parent 84b196746b
commit 01fa0a56ea
1 changed files with 2 additions and 3 deletions

View File

@ -7,6 +7,7 @@ import android.util.Log;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
@ -316,9 +317,7 @@ public class GpodnetPreferences {
private static Set<String> readListFromString(String s) { private static Set<String> readListFromString(String s) {
Set<String> result = new HashSet<>(); Set<String> result = new HashSet<>();
for (String item : s.split(" ")) { Collections.addAll(result, s.split(" "));
result.add(item);
}
return result; return result;
} }