Fixed the compilation failure.

This commit is contained in:
Ali Dehghani 2019-08-04 20:39:13 +04:30
parent d72ed9ad11
commit f8e37b3162
6 changed files with 189 additions and 184 deletions

View File

@ -8,6 +8,8 @@ import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonProperty;
import okhttp3.HttpUrl;
import okhttp3.Interceptor;
import okhttp3.Request;
@ -16,6 +18,7 @@ import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.ANY;
import static java.util.stream.Collectors.toList;
public interface LastFmService {
@ -77,7 +80,8 @@ public interface LastFmService {
}
return all;
} catch (Exception e) {
}
catch (Exception e) {
return Collections.emptyMap();
}
}
@ -93,7 +97,8 @@ public interface LastFmService {
try {
List<Map<String, Object>> artists = (List<Map<String, Object>>) this.artists.get("artist");
return artists.stream().map(e -> ((String) e.get("name"))).collect(toList());
} catch (Exception e) {
}
catch (Exception e) {
return Collections.emptyList();
}
}