From 606d9679488efdba2e2cf10af1e74e88a5ee7d71 Mon Sep 17 00:00:00 2001 From: Robert Haimerl Date: Mon, 17 Jun 2024 12:03:14 +0200 Subject: [PATCH] do not use !!-operator --- .../codyze/backends/cpg/coko/evaluators/ArgumentEvaluator.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codyze-backends/cpg/src/main/kotlin/de/fraunhofer/aisec/codyze/backends/cpg/coko/evaluators/ArgumentEvaluator.kt b/codyze-backends/cpg/src/main/kotlin/de/fraunhofer/aisec/codyze/backends/cpg/coko/evaluators/ArgumentEvaluator.kt index 6c2aebdaa..f4261b8df 100644 --- a/codyze-backends/cpg/src/main/kotlin/de/fraunhofer/aisec/codyze/backends/cpg/coko/evaluators/ArgumentEvaluator.kt +++ b/codyze-backends/cpg/src/main/kotlin/de/fraunhofer/aisec/codyze/backends/cpg/coko/evaluators/ArgumentEvaluator.kt @@ -43,7 +43,7 @@ class ArgumentEvaluator(val targetCall: Op, val argPos: Int, val originCall: Op) for (call in targetCalls) { val arg: VariableDeclaration? = (call.arguments.getOrNull(argPos) as? Reference)?.refersTo as? VariableDeclaration - if (arg in variables && !arg!!.allowsInvalidPaths(originCalls.toList(), call)) { + if (arg in variables && arg?.allowsInvalidPaths(originCalls.toList(), call) == false) { findings.add( CpgFinding( message = "Complies with rule: " +