Fixed the compilation failure.
@@ -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();
}
}
