mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
EA-985378 NPE: PySmartStepIntoHandler.findVariants
GitOrigin-RevId: feac8a755036a24f1e11acc1ce2a795c09d4ee1b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cb36158fb8
commit
e45d6031b5
@@ -4,6 +4,7 @@ package com.jetbrains.python.debugger.pydev;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.jetbrains.python.debugger.PyDebuggerException;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -39,7 +40,7 @@ public class GetSmartStepIntoVariantsCommand extends AbstractFrameCommand {
|
||||
myVariants = ProtocolParser.parseSmartStepIntoVariants(payload);
|
||||
}
|
||||
|
||||
public List<Pair<String, Boolean>> getVariants() {
|
||||
public @Nullable List<Pair<String, Boolean>> getVariants() {
|
||||
return myVariants;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -625,10 +625,12 @@ public class PyDebugProcess extends XDebugProcess implements IPyDebugProcess, Pr
|
||||
}
|
||||
}
|
||||
|
||||
public List<Pair<String, Boolean>> getSmartStepIntoVariants(int startContextLine, int endContextLine) {
|
||||
public @NotNull List<Pair<String, Boolean>> getSmartStepIntoVariants(int startContextLine, int endContextLine) {
|
||||
try {
|
||||
PyStackFrame frame = currentFrame();
|
||||
return myDebugger.getSmartStepIntoVariants(frame.getThreadId(), frame.getFrameId(), startContextLine, endContextLine);
|
||||
var smartStepIntoVariants = myDebugger.getSmartStepIntoVariants(
|
||||
frame.getThreadId(), frame.getFrameId(), startContextLine, endContextLine);
|
||||
return smartStepIntoVariants != null ? smartStepIntoVariants : Collections.emptyList();
|
||||
}
|
||||
catch (PyDebuggerException e) {
|
||||
return Collections.emptyList();
|
||||
|
||||
Reference in New Issue
Block a user