Replace manual array t collection copy
This commit is contained in:
parent
84b196746b
commit
01fa0a56ea
|
@ -7,6 +7,7 @@ import android.util.Log;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
@ -316,9 +317,7 @@ public class GpodnetPreferences {
|
|||
|
||||
private static Set<String> readListFromString(String s) {
|
||||
Set<String> result = new HashSet<>();
|
||||
for (String item : s.split(" ")) {
|
||||
result.add(item);
|
||||
}
|
||||
Collections.addAll(result, s.split(" "));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue