diff --git a/idea/src/org/jetbrains/kotlin/idea/debugger/stepping/DebuggerSteppingHelper.java b/idea/src/org/jetbrains/kotlin/idea/debugger/stepping/DebuggerSteppingHelper.java index e0878c44e7d..2faabe32ded 100644 --- a/idea/src/org/jetbrains/kotlin/idea/debugger/stepping/DebuggerSteppingHelper.java +++ b/idea/src/org/jetbrains/kotlin/idea/debugger/stepping/DebuggerSteppingHelper.java @@ -65,15 +65,13 @@ public class DebuggerSteppingHelper { SuspendContextCommandImpl command = action.createCommand(debugProcess, suspendContext, ignoreBreakpoints); - if (command != null) { - createStepRequest( - suspendContext, getContextThread(), - debugProcess.getVirtualMachineProxy().eventRequestManager(), - StepRequest.STEP_LINE, StepRequest.STEP_OUT); + createStepRequest( + suspendContext, getContextThread(), + debugProcess.getVirtualMachineProxy().eventRequestManager(), + StepRequest.STEP_LINE, StepRequest.STEP_OUT); - command.contextAction(); - return; - } + command.contextAction(); + return; } debugProcess.createStepOutCommand(suspendContext).contextAction(); @@ -108,16 +106,13 @@ public class DebuggerSteppingHelper { ); SuspendContextCommandImpl command = action.createCommand(debugProcess, suspendContext, ignoreBreakpoints); + createStepRequest( + suspendContext, getContextThread(), + debugProcess.getVirtualMachineProxy().eventRequestManager(), + StepRequest.STEP_LINE, StepRequest.STEP_OUT); - if (command != null) { - createStepRequest( - suspendContext, getContextThread(), - debugProcess.getVirtualMachineProxy().eventRequestManager(), - StepRequest.STEP_LINE, StepRequest.STEP_OUT); - - command.contextAction(); - return; - } + command.contextAction(); + return; } debugProcess.createStepOverCommand(suspendContext, ignoreBreakpoints).contextAction(); diff --git a/idea/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSteppingCommandProvider.kt b/idea/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSteppingCommandProvider.kt index fdca48cf3ec..ea53936033c 100644 --- a/idea/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSteppingCommandProvider.kt +++ b/idea/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSteppingCommandProvider.kt @@ -48,7 +48,7 @@ import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCall import org.jetbrains.kotlin.resolve.inline.InlineUtil import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode -class KotlinSteppingCommandProvider: JvmSteppingCommandProvider() { +class KotlinSteppingCommandProvider : JvmSteppingCommandProvider() { override fun getStepOverCommand( suspendContext: SuspendContextImpl?, ignoreBreakpoints: Boolean, @@ -332,7 +332,7 @@ sealed class Action(val position: XSourcePositionImpl?) { debugProcess: DebugProcessImpl, suspendContext: SuspendContextImpl, ignoreBreakpoints: Boolean - ): SuspendContextCommandImpl? { + ): SuspendContextCommandImpl { return when (this) { is Action.RUN_TO_CURSOR -> { runReadAction {