Skip to content

Commit

Permalink
fix: Apply fixes after code review
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Kopysov <[email protected]>
  • Loading branch information
o-kopysov committed Aug 5, 2024
1 parent 01e536f commit 3221d85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/lpvs/service/LPVSQueueProcessorService.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/lpvs/service/scan/LPVSDetectService.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ public void runSingleScan() {
List<LPVSLicenseService.Conflict<String, String>> 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();
Expand Down

0 comments on commit 3221d85

Please sign in to comment.