diff --git a/src/main/java/com/lpvs/service/LPVSQueueProcessorService.java b/src/main/java/com/lpvs/service/LPVSQueueProcessorService.java index f6232020..85be486b 100644 --- a/src/main/java/com/lpvs/service/LPVSQueueProcessorService.java +++ b/src/main/java/com/lpvs/service/LPVSQueueProcessorService.java @@ -62,8 +62,8 @@ protected void queueProcessor() throws Exception { queueService.checkForQueue(); // Process LPVSQueue elements until the trigger is set. - while ((trigger == null || trigger.isEmpty()) - && (localPath == null || localPath.isEmpty())) { + while ((trigger == null || trigger.isBlank()) + && (localPath == null || localPath.isBlank())) { // Get the first element from the LPVSQueue. LPVSQueue webhookConfig = queueService.getQueueFirstElement(); log.info("PROCESS Webhook id = " + webhookConfig.getId()); diff --git a/src/main/java/com/lpvs/service/scan/LPVSDetectService.java b/src/main/java/com/lpvs/service/scan/LPVSDetectService.java index edaa5dc8..eccba427 100644 --- a/src/main/java/com/lpvs/service/scan/LPVSDetectService.java +++ b/src/main/java/com/lpvs/service/scan/LPVSDetectService.java @@ -118,13 +118,13 @@ public void runSingleScan() { List> detectedConflicts = null; // Error case when both pull request scan and local files scan are set to true - if (trigger != null && !trigger.isEmpty() && localPath != null && !localPath.isEmpty()) { + if (trigger != null && !trigger.isBlank() && localPath != null && !localPath.isBlank()) { log.error( "Incorrect settings: both pull request scan and local files scan are set to true."); SpringApplication.exit(ctx, () -> 0); // Scan option - single pull request scan - } else if (trigger != null && !HtmlUtils.htmlEscape(trigger).isEmpty()) { + } else if (trigger != null && !HtmlUtils.htmlEscape(trigger).isBlank()) { log.info("Triggered single scan of pull request."); try { licenseService.reloadFromTables();