@@ -4,7 +4,10 @@ import com.github.javaparser.ParserConfiguration
44import com.github.javaparser.StaticJavaParser
55import com.github.javaparser.ast.CompilationUnit
66import com.github.javaparser.ast.Modifier
7- import com.github.javaparser.ast.body.*
7+ import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration
8+ import com.github.javaparser.ast.body.FieldDeclaration
9+ import com.github.javaparser.ast.body.MethodDeclaration
10+ import com.github.javaparser.ast.body.VariableDeclarator
811import com.github.javaparser.ast.expr.StringLiteralExpr
912import com.github.javaparser.ast.nodeTypes.NodeWithModifiers
1013import com.github.javaparser.ast.stmt.ExplicitConstructorInvocationStmt
@@ -255,17 +258,6 @@ private fun registerCheckConfigStringsTask(project: Project, extension: Supporte
255258 }
256259}
257260
258- private val INSTRUMENTER_MODULE_TYPES = setOf (
259- " InstrumenterModule" ,
260- " InstrumenterModule.Tracing" ,
261- " InstrumenterModule.Profiling" ,
262- " InstrumenterModule.AppSec" ,
263- " InstrumenterModule.Iast" ,
264- " InstrumenterModule.Usm" ,
265- " InstrumenterModule.CiVisibility" ,
266- " InstrumenterModule.ContextTracking"
267- )
268-
269261/* * Checks that [key] exists in [supported] and [aliases], and that all [expectedAliases] are values of that alias entry. */
270262private fun MutableList<String>.checkKeyAndAliases (
271263 key : String ,
@@ -366,7 +358,7 @@ private fun registerCheckInstrumenterModuleConfigurations(project: Project, exte
366358 ) { configFields, rel, cu ->
367359 cu.findAll(ClassOrInterfaceDeclaration ::class .java).forEach classLoop@{ classDecl ->
368360 // Only examine classes extending InstrumenterModule.*
369- val extendsModule = classDecl.extendedTypes.any { it.toString() in INSTRUMENTER_MODULE_TYPES }
361+ val extendsModule = classDecl.extendedTypes.any { it.toString().startsWith( " InstrumenterModule " ) }
370362 if (! extendsModule) return @classLoop
371363
372364 classDecl.findAll(ExplicitConstructorInvocationStmt ::class .java)
0 commit comments