Skip to content

Commit 3e4f8f8

Browse files
committed
handle null
1 parent 97b04a5 commit 3e4f8f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/de/mediathekview/mserver/crawler/dw/tasks/DwFilmDetailTask.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ protected void processRestTarget(final CrawlerUrlDTO aDTO, final WebTarget aTarg
4545
} catch (Exception e) {
4646
LOG.error("error processing {} ", aDTO.getUrl(), e);
4747
}
48-
if (filmDetailDtoOptional.isEmpty()) {
48+
// Optional can be null if response code is 200 and response body is empty
49+
if (filmDetailDtoOptional == null|| filmDetailDtoOptional.isEmpty()) {
4950
crawler.incrementAndGetErrorCount();
5051
crawler.updateProgress();
5152
return;

0 commit comments

Comments
 (0)