SUPPORT-8841: change to exception

This commit is contained in:
Alexandr Shalaginov 2025-01-13 08:18:08 +03:00
parent f8482124ba
commit f6fea26f85

View file

@ -81,9 +81,11 @@ public class FileScanService {
private void checkScanResult(String result, String originalFileName) { private void checkScanResult(String result, String originalFileName) {
if (!result.contains(passwordProtectedResultName)) { if (!result.contains(passwordProtectedResultName)) {
LOGGER.warn("File scan result doesn't contains \"{}\", " throw new AvException(String.format(
+ "please check property \"password.protected.result.name\" is correct", "File scan result doesn't contains \"%s\", "
passwordProtectedResultName); + "please check property \"password.protected.result.name\" is correct",
passwordProtectedResultName
));
} }
for (String line : result.split("\n")) { for (String line : result.split("\n")) {