Replace fori with foreach loop

This commit is contained in:
Fynn Godau 2020-04-26 23:02:14 +02:00
parent f71bd29d58
commit 9bc7a470ab
1 changed files with 2 additions and 3 deletions

View File

@ -38,9 +38,8 @@ public class BandcampSuggestionExtractor extends SuggestionExtractor {
ArrayList<String> suggestions = new ArrayList<>();
for (int i = 0; i < jsonArray.size(); i++) {
JsonObject fuzzyResult = jsonArray.getObject(i);
String res = fuzzyResult.getString("name");
for (Object fuzzyResult : jsonArray) {
String res = ((JsonObject) fuzzyResult).getString("name");
if (!suggestions.contains(res)) suggestions.add(res);
}