Fixed the compilation failure.
This commit is contained in:
parent
d72ed9ad11
commit
f8e37b3162
@ -8,6 +8,8 @@ import java.util.Map;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import okhttp3.HttpUrl;
|
import okhttp3.HttpUrl;
|
||||||
import okhttp3.Interceptor;
|
import okhttp3.Interceptor;
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
@ -16,6 +18,7 @@ import retrofit2.Call;
|
|||||||
import retrofit2.http.GET;
|
import retrofit2.http.GET;
|
||||||
import retrofit2.http.Query;
|
import retrofit2.http.Query;
|
||||||
|
|
||||||
|
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.ANY;
|
||||||
import static java.util.stream.Collectors.toList;
|
import static java.util.stream.Collectors.toList;
|
||||||
|
|
||||||
public interface LastFmService {
|
public interface LastFmService {
|
||||||
@ -77,7 +80,8 @@ public interface LastFmService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return all;
|
return all;
|
||||||
} catch (Exception e) {
|
}
|
||||||
|
catch (Exception e) {
|
||||||
return Collections.emptyMap();
|
return Collections.emptyMap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -93,7 +97,8 @@ public interface LastFmService {
|
|||||||
try {
|
try {
|
||||||
List<Map<String, Object>> artists = (List<Map<String, Object>>) this.artists.get("artist");
|
List<Map<String, Object>> artists = (List<Map<String, Object>>) this.artists.get("artist");
|
||||||
return artists.stream().map(e -> ((String) e.get("name"))).collect(toList());
|
return artists.stream().map(e -> ((String) e.get("name"))).collect(toList());
|
||||||
} catch (Exception e) {
|
}
|
||||||
|
catch (Exception e) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user