From 21552076aae98e770a629cee596892722b642747 Mon Sep 17 00:00:00 2001 From: Oleg Kopysov Date: Wed, 10 Apr 2024 11:53:17 +0300 Subject: [PATCH] fix: Fix one more Svace defect (#492) * fix: Fix one more Svace defect Signed-off-by: Oleg Kopysov * fix: Added error messages with more details Signed-off-by: Oleg Kopysov --------- Signed-off-by: Oleg Kopysov --- pom.xml | 2 +- src/main/java/com/lpvs/entity/LPVSFile.java | 2 +- .../lpvs/service/scan/scanner/LPVSScanossDetectService.java | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 9cb36f09..492f7a0f 100644 --- a/pom.xml +++ b/pom.xml @@ -155,6 +155,7 @@ single + true jar-with-dependencies @@ -164,7 +165,6 @@ com.lpvs.LicensePreValidationService - false diff --git a/src/main/java/com/lpvs/entity/LPVSFile.java b/src/main/java/com/lpvs/entity/LPVSFile.java index 153d5ebd..ee4657c0 100644 --- a/src/main/java/com/lpvs/entity/LPVSFile.java +++ b/src/main/java/com/lpvs/entity/LPVSFile.java @@ -156,7 +156,7 @@ public String convertBytesToLinesNumbers() { if (matchedLines == null || matchedLines.isEmpty()) { return ""; - } else if (matchedLines != null && !matchedLines.startsWith("BYTES:")) { + } else if (!matchedLines.startsWith("BYTES:")) { return matchedLines; } diff --git a/src/main/java/com/lpvs/service/scan/scanner/LPVSScanossDetectService.java b/src/main/java/com/lpvs/service/scan/scanner/LPVSScanossDetectService.java index e7aeb513..fa6dbca9 100644 --- a/src/main/java/com/lpvs/service/scan/scanner/LPVSScanossDetectService.java +++ b/src/main/java/com/lpvs/service/scan/scanner/LPVSScanossDetectService.java @@ -281,7 +281,8 @@ public List checkLicenses(LPVSQueue webhookConfig) { // close reader reader.close(); } catch (IOException | IllegalArgumentException ex) { - log.error(ex.toString()); + log.error("Error while processing Webhook ID = " + webhookConfig.getId()); + log.error(ex.getMessage()); } return detectedFiles; }