Update FAQ.md
This commit is contained in:
parent
935b75d685
commit
b4f63905c5
@ -22,7 +22,7 @@ public PhotoSize getPhoto(Update update) {
|
||||
|
||||
// We fetch the bigger photo
|
||||
return photos.stream()
|
||||
.max(Comparator.comparing(PhotoSize::getFileSize)).get();
|
||||
.max(Comparator.comparing(PhotoSize::getFileSize)).orElse(null);
|
||||
}
|
||||
|
||||
// Return null if not found
|
||||
|
Loading…
Reference in New Issue
Block a user