Skip to content

Commit

Permalink
update for fix issue JabRef#6199, replace null with emptyList() to av…
Browse files Browse the repository at this point in the history
…oid null check.

Co-authored-by: Christoph <siedlerkiller@gmail.com>
  • Loading branch information
devinluo27 and Siedlerchr committed Apr 25, 2021
1 parent 82fd623 commit ec43298
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ private Optional<String> getUrl(Record record) {

private Optional<String> getUrlValue(Url url) {
Optional<List<Object>> urlContent = Optional.ofNullable(url).map(Url::getContent);
List<Object> list = urlContent.orElse(null);
List<Object> list = urlContent.orElse(Collections.emptyList());
Optional<String> ret;
if (list==null || list.size() == 0) {
return Optional.empty();
Expand Down

0 comments on commit ec43298

Please sign in to comment.