From 5a8e31d3d7047954af4a5ec51637978106cbb447 Mon Sep 17 00:00:00 2001 From: Stuart Taylor Date: Mon, 23 Jan 2023 17:39:36 +0000 Subject: [PATCH] Fix groovy.lang.MissingMethodException when scanSet property is used --- .../dependencycheck/gradle/tasks/AbstractAnalyze.groovy | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/groovy/org/owasp/dependencycheck/gradle/tasks/AbstractAnalyze.groovy b/src/main/groovy/org/owasp/dependencycheck/gradle/tasks/AbstractAnalyze.groovy index 167cb07..368e602 100644 --- a/src/main/groovy/org/owasp/dependencycheck/gradle/tasks/AbstractAnalyze.groovy +++ b/src/main/groovy/org/owasp/dependencycheck/gradle/tasks/AbstractAnalyze.groovy @@ -416,10 +416,11 @@ abstract class AbstractAnalyze extends ConfiguredTask { } } else { config.scanSet.each { - if (it.exists()) { - engine.scan(it, project.name) + File f = project.file it + if (f.exists()) { + engine.scan(f, project.name) } else { - logger.warn("ScanSet file `${it}` does not exist in ${project.name}") + logger.warn("ScanSet file `${f}` does not exist in ${project.name}") } } }