mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
#3745 Upload depiction suggestions not following text input - on upstream error emit empty list (#3751)
This commit is contained in:
parent
affcd8a6d7
commit
e597a7c96f
3 changed files with 26 additions and 16 deletions
|
|
@ -7,6 +7,7 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.wikipedia.dataclient.mwapi.MwResponse;
|
||||
import org.wikipedia.json.PostProcessingTypeAdapter;
|
||||
|
||||
|
|
@ -15,8 +16,9 @@ public class Entities extends MwResponse implements PostProcessingTypeAdapter.Po
|
|||
@Nullable private Map<String, Entity> entities;
|
||||
private int success;
|
||||
|
||||
@Nullable public Map<String, Entity> entities() {
|
||||
return entities;
|
||||
@NotNull
|
||||
public Map<String, Entity> entities() {
|
||||
return entities != null ? entities : Collections.emptyMap();
|
||||
}
|
||||
|
||||
public int getSuccess() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue