return early if not canRedefineClasses

GitOrigin-RevId: 24da3e09be200cde72b7f03fbe724b1bd3b795d6
This commit is contained in:
Egor Ushakov
2019-07-26 15:02:42 +03:00
committed by intellij-monorepo-bot
parent 5de95b5b25
commit 68b8d4365d
@@ -48,6 +48,9 @@ public class StackFrameProxyImpl extends JdiProxy implements StackFrameProxy {
public boolean isObsolete() throws EvaluateException {
DebuggerManagerThreadImpl.assertIsManagerThread();
if (!getVirtualMachine().canRedefineClasses()) {
return false;
}
checkValid();
if (myIsObsolete != ThreeState.UNSURE) {
return myIsObsolete.toBoolean();
@@ -56,7 +59,7 @@ public class StackFrameProxyImpl extends JdiProxy implements StackFrameProxy {
for (int attempt = 0; attempt < 2; attempt++) {
try {
Method method = DebuggerUtilsEx.getMethod(location());
boolean isObsolete = (getVirtualMachine().canRedefineClasses() && (method == null || method.isObsolete()));
boolean isObsolete = method == null || method.isObsolete();
myIsObsolete = ThreeState.fromBoolean(isObsolete);
return isObsolete;
}