Skip to content

Commit

Permalink
chore: remove refs to deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
kmruiz committed Jan 16, 2025
1 parent ace3453 commit e26d663
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.mongodb.jbplugin.observability.probe

import com.intellij.codeInspection.ProblemsHolder
import com.intellij.database.util.common.containsElements
import com.intellij.openapi.application.readAction
import com.intellij.openapi.components.Service
import com.intellij.openapi.diagnostic.Logger
Expand Down Expand Up @@ -162,10 +161,10 @@ class InspectionStatusChangedProbe(
psiElement: () -> PsiElement
): Boolean = runCatching {
readAction<Boolean> {
elementsWithProblems.containsElements {
elementsWithProblems.find {
it.on.get()?.source == psiElement ||
it.on.get()?.source?.isEquivalentTo(psiElement()) == true
}
} != null
}
}.getOrDefault(false)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.mongodb.jbplugin.dialects.springquery

import com.intellij.database.util.common.containsElements
import com.intellij.lang.injection.InjectedLanguageManager
import com.intellij.psi.JavaPsiFacade
import com.intellij.psi.PsiAnnotation
Expand Down Expand Up @@ -272,9 +271,9 @@ object SpringAtQueryDialectParser : DialectParser<PsiElement> {
private fun findParentMethodWithQueryAnnotation(source: PsiElement): PsiMethod? {
return source.findTopParentBy { method ->
method as? PsiMethod ?: return@findTopParentBy false
method.annotations.containsElements {
method.annotations.find {
it.hasQualifiedName(QUERY_FQN)
}
} != null
} as? PsiMethod
}

Expand Down

0 comments on commit e26d663

Please sign in to comment.