Skip to content

Commit

Permalink
Update ImageSourceManager.java
Browse files Browse the repository at this point in the history
  • Loading branch information
cikiPAD authored Dec 6, 2023
1 parent c0698d2 commit a74d4a0
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main/java/ImageSourceManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,15 @@ public List<InputStream> getImageStream(String type, Map<String, Object> params)


public List<String> getImageUrls(String type, Map<String, Object> params) {
if (sources.containsKey(type)) {
return sources.get(type).getImageUrl(filterNullValues(params));
try {
if (sources.containsKey(type)) {
return sources.get(type).getImageUrl(filterNullValues(params));
} else {
return new ArrayList<>();
}
}
else {
throw new IllegalArgumentException("不支持类型");
catch (Exception e){
return new ArrayList<>();
}
}

Expand Down

0 comments on commit a74d4a0

Please sign in to comment.