Refactoring: make createCommand non-nullable

(cherry picked from commit 67cc9b5)
This commit is contained in:
Nikolay Krasko
2016-10-10 20:23:38 +03:00
committed by Nikolay Krasko
parent f7813263ee
commit 78525ed7c6
2 changed files with 14 additions and 19 deletions
@@ -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();
@@ -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 {