cleanup [injection testFramework]: drop unnecessary ?: and !!

GitOrigin-RevId: 54773f83ef7a24528faeae93cf0bed197b61d5be
This commit is contained in:
Max Medvedev
2026-08-12 17:51:50 +00:00
committed by intellij-monorepo-bot
parent 20d1b01a3e
commit 2c19d9ba1d
@@ -31,7 +31,7 @@ class InjectionTestFixture(private val javaFixture: CodeInsightTestFixture) {
val injectedElement: PsiElement?
get() {
return injectedLanguageManager.findInjectedElementAt(topLevelFile ?: return null, topLevelCaretPosition)
return injectedLanguageManager.findInjectedElementAt(topLevelFile, topLevelCaretPosition)
}
fun assertInjectedLangAtCaret(lang: String?) {
@@ -118,7 +118,7 @@ class InjectionTestFixture(private val javaFixture: CodeInsightTestFixture) {
get() = topLevelEditor.caretModel.offset
val topLevelEditor: Editor
get() = (FileEditorManager.getInstance(javaFixture.project).getSelectedEditor(topLevelFile!!.virtualFile) as TextEditor).editor
get() = (FileEditorManager.getInstance(javaFixture.project).getSelectedEditor(topLevelFile.virtualFile) as TextEditor).editor
}
data class InjectionAssertionData(val text: String, val injectedLanguage: String? = null) {