From f6fea26f850bc38cba639a98d1caa7904ecd04c0 Mon Sep 17 00:00:00 2001 From: Alexandr Shalaginov Date: Mon, 13 Jan 2025 08:18:08 +0300 Subject: [PATCH] SUPPORT-8841: change to exception --- .../ru/micord/av/service/service/FileScanService.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/ru/micord/av/service/service/FileScanService.java b/src/main/java/ru/micord/av/service/service/FileScanService.java index b6cfc9f..460f013 100644 --- a/src/main/java/ru/micord/av/service/service/FileScanService.java +++ b/src/main/java/ru/micord/av/service/service/FileScanService.java @@ -81,9 +81,11 @@ public class FileScanService { private void checkScanResult(String result, String originalFileName) { if (!result.contains(passwordProtectedResultName)) { - LOGGER.warn("File scan result doesn't contains \"{}\", " - + "please check property \"password.protected.result.name\" is correct", - passwordProtectedResultName); + throw new AvException(String.format( + "File scan result doesn't contains \"%s\", " + + "please check property \"password.protected.result.name\" is correct", + passwordProtectedResultName + )); } for (String line : result.split("\n")) {