Skip to content

Commit

Permalink
do not use !!-operator
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingDepot committed Jun 17, 2024
1 parent 0ce362e commit 606d967
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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: " +
Expand Down

0 comments on commit 606d967

Please sign in to comment.