File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
sonar-kotlin-checks/src/main/java/org/sonarsource/kotlin/checks Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 16
16
*/
17
17
package org.sonarsource.kotlin.checks
18
18
19
+ import org.jetbrains.kotlin.analysis.api.resolution.KaFunctionCall
19
20
import org.jetbrains.kotlin.psi.KtCallExpression
20
- import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
21
21
import org.sonar.check.Rule
22
22
import org.sonarsource.kotlin.api.checks.CallAbstractCheck
23
23
import org.sonarsource.kotlin.api.checks.FunMatcher
24
24
import org.sonarsource.kotlin.api.frontend.KotlinFileContext
25
25
26
- @org.sonarsource.kotlin.api.frontend.K1only
27
26
@Rule(key = " S2151" )
28
27
class RunFinalizersCheck : CallAbstractCheck () {
29
28
@@ -32,7 +31,7 @@ class RunFinalizersCheck : CallAbstractCheck() {
32
31
FunMatcher (qualifier = " java.lang.System" , name = " runFinalizersOnExit" ) { withArguments(" kotlin.Boolean" ) },
33
32
)
34
33
35
- override fun visitFunctionCall (callExpression : KtCallExpression , resolvedCall : ResolvedCall <* >, kotlinFileContext : KotlinFileContext ) {
34
+ override fun visitFunctionCall (callExpression : KtCallExpression , resolvedCall : KaFunctionCall <* >, kotlinFileContext : KotlinFileContext ) {
36
35
kotlinFileContext.reportIssue(callExpression.calleeExpression!! , " Remove this call to \" runFinalizersOnExit()\" ." )
37
36
}
38
37
}
You can’t perform that action at this time.
0 commit comments