Skip to content

Commit 9356781

Browse files
committed
Disable @PublishedApi quickfix
1 parent 3eb5b3e commit 9356781

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

idea/src/org/jetbrains/kotlin/idea/quickfix/replaceWith/ReplaceProtectedToPublishedApiCallFix.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package org.jetbrains.kotlin.idea.quickfix.replaceWith
1818

1919
import com.intellij.codeInsight.intention.IntentionAction
20+
import com.intellij.openapi.application.ApplicationManager
2021
import com.intellij.openapi.editor.Editor
2122
import com.intellij.openapi.project.Project
2223
import com.intellij.psi.SmartPsiElementPointer
@@ -90,6 +91,7 @@ class ReplaceProtectedToPublishedApiCallFix(
9091
}
9192

9293
override fun createAction(diagnostic: Diagnostic): IntentionAction? {
94+
if (!ApplicationManager.getApplication().isUnitTestMode) return null
9395
val psiElement = diagnostic.psiElement as? KtExpression ?: return null
9496
val descriptor = DiagnosticFactory.cast(diagnostic, Errors.PROTECTED_CALL_FROM_PUBLIC_INLINE).a.let {
9597
if (it is CallableMemberDescriptor) DescriptorUtils.getDirectMember(it) else it

0 commit comments

Comments
 (0)