Skip to content

Commit 2b83da6

Browse files
committed
refactor(HttpURLConnectionDownloaderService): remove a superfluous check.
ArrayUtils.contains() returns false when null is passed in. [skip ci]
1 parent b78ce5b commit 2b83da6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/ru/mystamps/web/feature/series/HttpURLConnectionDownloaderService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ private Code validateConnection(HttpURLConnection conn) throws IOException {
174174
// We need only the first part from "text/html; charset=UTF-8"
175175
contentType = StringUtils.substringBefore(contentType, ";");
176176

177-
if (allowedContentTypes != null && !ArrayUtils.contains(allowedContentTypes, contentType)) {
177+
if (!ArrayUtils.contains(allowedContentTypes, contentType)) {
178178
// FIXME(security): fix possible log injection
179179
LOG.debug("Couldn't download file: unsupported file type '{}'", contentType);
180180
return Code.INVALID_FILE_TYPE;

0 commit comments

Comments
 (0)