From 3bbf5a50e330be372f387ff9a279591b1d05c754 Mon Sep 17 00:00:00 2001 From: Elizaveta Shashkova Date: Tue, 9 Jun 2020 19:07:31 +0300 Subject: [PATCH] PY-40019 PY-42899 View as DataFrame is broken in Python Console Revert accidentally removed `return` Signed-off-by: Elizaveta Shashkova GitOrigin-RevId: e04003ced7923b9bdc60df732fb2a23744692166 --- .../console/PydevConsoleCommunication.java | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/python/src/com/jetbrains/python/console/PydevConsoleCommunication.java b/python/src/com/jetbrains/python/console/PydevConsoleCommunication.java index 5a3df36973c1..285abb9456f4 100644 --- a/python/src/com/jetbrains/python/console/PydevConsoleCommunication.java +++ b/python/src/com/jetbrains/python/console/PydevConsoleCommunication.java @@ -124,7 +124,9 @@ public abstract class PydevConsoleCommunication extends AbstractConsoleCommunica throw new RuntimeException(e); } } - return false; + else { + return false; + } } /** @@ -493,7 +495,9 @@ public abstract class PydevConsoleCommunication extends AbstractConsoleCommunica "Error in evaluate():" ); } - return null; + else { + return null; + } } @Nullable @@ -510,7 +514,9 @@ public abstract class PydevConsoleCommunication extends AbstractConsoleCommunica "Error in loadFrame():" ); } - return new XValueChildrenList(); + else { + return new XValueChildrenList(); + } } public synchronized int getNextFullValueSeq() { @@ -565,7 +571,9 @@ public abstract class PydevConsoleCommunication extends AbstractConsoleCommunica "Error in loadVariable():" ); } - return new XValueChildrenList(); + else { + return new XValueChildrenList(); + } } @Override @@ -610,7 +618,7 @@ public abstract class PydevConsoleCommunication extends AbstractConsoleCommunica public ArrayChunk getArrayItems(PyDebugValue var, int rowOffset, int colOffset, int rows, int cols, String format) throws PyDebuggerException { if (!isCommunicationClosed()) { - executeBackgroundTask( + return executeBackgroundTask( () -> { GetArrayResponse ret = getPythonConsoleBackendClient().getArray(var.getName(), rowOffset, colOffset, rows, cols, format); return createArrayChunk(ret, this); @@ -620,7 +628,9 @@ public abstract class PydevConsoleCommunication extends AbstractConsoleCommunica "Error in getArrayItems():" ); } - return null; + else { + return null; + } } @Nullable