mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
[jvm] Fix exception when making inner class runnable
Don't generate action when nested class hierarchy is empty. #EA-1081624 Fixed GitOrigin-RevId: 934b238d81d6c1696e226199a75e37c8ed2ae883
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7e78082cce
commit
d6b40e6c72
@@ -340,7 +340,7 @@ private class JUnitMalformedSignatureVisitor(
|
||||
override fun getActions(project: Project): List<(JvmModifiersOwner) -> List<IntentionAction>> {
|
||||
val list = super.getActions(project).toMutableList()
|
||||
list.add { owner ->
|
||||
val outerClass = owner.sourceElement?.toUElementOfType<UClass>()?.nestedClassHierarchy()?.last()!!
|
||||
val outerClass = owner.sourceElement?.toUElementOfType<UClass>()?.nestedClassHierarchy()?.lastOrNull() ?: return@add emptyList()
|
||||
val request = annotationRequest(ORG_JUNIT_RUNNER_RUN_WITH, classAttribute(
|
||||
PsiAnnotation.DEFAULT_REFERENCED_METHOD_NAME,
|
||||
ORG_JUNIT_EXPERIMENTAL_RUNNERS_ENCLOSED
|
||||
|
||||
Reference in New Issue
Block a user