Skip to content

Commit

Permalink
update 2 for fix issue JabRef#6199, remove redundant null check.
Browse files Browse the repository at this point in the history
Since list would be init with Collections.emptyList() if get Optional.empty().
  • Loading branch information
devinluo27 authored Apr 25, 2021
1 parent ec43298 commit 1859970
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ private Optional<String> getUrlValue(Url url) {
Optional<List<Object>> urlContent = Optional.ofNullable(url).map(Url::getContent);
List<Object> list = urlContent.orElse(Collections.emptyList());
Optional<String> ret;
if (list==null || list.size() == 0) {
if (list.size() == 0) {
return Optional.empty();
}
else {
Expand Down

0 comments on commit 1859970

Please sign in to comment.