Skip to content

Commit

Permalink
Remove null-check b/c org.jsoup is @NonnullByDefault
Browse files Browse the repository at this point in the history
  • Loading branch information
sepe81 committed May 29, 2023
1 parent 1f0ac22 commit d36e5b0
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,10 @@ private static PoliceTicker crawl(final String url) {
} catch (final IOException e) {
throw new UncheckedIOException("Request for url " + url + " failed.", e);
}
PoliceTicker result = null;
if (doc != null) {
result = convertToDataModel(doc);
result.setUrl(url);
result.setId(Utils.generateHashForUrl(url));
logger.info("Crawled {}.", url);
}
final PoliceTicker result = convertToDataModel(doc);
result.setUrl(url);
result.setId(Utils.generateHashForUrl(url));
logger.info("Crawled {}.", url);
if (logger.isDebugEnabled()) {
logger.debug("Extracted {}.", result);
}
Expand Down

0 comments on commit d36e5b0

Please sign in to comment.