mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-86445 - NPE: Breakpoint.createOrWaitPrepare
This commit is contained in:
@@ -44,6 +44,8 @@ import java.util.*;
|
||||
public class CompoundPositionManager extends PositionManagerEx implements MultiRequestPositionManager{
|
||||
private static final Logger LOG = Logger.getInstance(CompoundPositionManager.class);
|
||||
|
||||
public static final CompoundPositionManager EMPTY = new CompoundPositionManager();
|
||||
|
||||
private final ArrayList<PositionManager> myPositionManagers = new ArrayList<>();
|
||||
|
||||
@SuppressWarnings("UnusedDeclaration")
|
||||
|
||||
@@ -60,11 +60,7 @@ public class ContextUtil {
|
||||
if (location == null) {
|
||||
return null;
|
||||
}
|
||||
CompoundPositionManager positionManager = debugProcess.getPositionManager();
|
||||
if (positionManager == null) { // process already closed
|
||||
return null;
|
||||
}
|
||||
return positionManager.getSourcePosition(location);
|
||||
return debugProcess.getPositionManager().getSourcePosition(location);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -129,7 +129,7 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
|
||||
private final Map<Type, NodeRenderer> myNodeRenderersMap = new HashMap<>();
|
||||
|
||||
private final SuspendManagerImpl mySuspendManager = new SuspendManagerImpl(this);
|
||||
protected CompoundPositionManager myPositionManager = null;
|
||||
protected CompoundPositionManager myPositionManager = CompoundPositionManager.EMPTY;
|
||||
private final DebuggerManagerThreadImpl myDebuggerManagerThread;
|
||||
|
||||
private final Semaphore myWaitFor = new Semaphore();
|
||||
@@ -777,7 +777,7 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
|
||||
finally {
|
||||
final VirtualMachineProxyImpl vm = myVirtualMachineProxy;
|
||||
myVirtualMachineProxy = null;
|
||||
myPositionManager = null;
|
||||
myPositionManager = CompoundPositionManager.EMPTY;
|
||||
myReturnValueWatcher = null;
|
||||
myNodeRenderersMap.clear();
|
||||
myRenderers.clear();
|
||||
@@ -1453,6 +1453,7 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
|
||||
return mySuspendManager;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public CompoundPositionManager getPositionManager() {
|
||||
return myPositionManager;
|
||||
|
||||
@@ -109,9 +109,7 @@ public class PositionManagerImpl implements PositionManager, MultiRequestPositio
|
||||
classPattern = parentQName + "*";
|
||||
prepareRequestor = new ClassPrepareRequestor() {
|
||||
public void processClassPrepare(DebugProcess debuggerProcess, ReferenceType referenceType) {
|
||||
final CompoundPositionManager positionManager = ((DebugProcessImpl)debuggerProcess).getPositionManager();
|
||||
final List<ReferenceType> positionClasses = positionManager.getAllClasses(position);
|
||||
if (positionClasses.contains(referenceType)) {
|
||||
if (((DebugProcessImpl)debuggerProcess).getPositionManager().getAllClasses(position).contains(referenceType)) {
|
||||
requestor.processClassPrepare(debuggerProcess, referenceType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,10 +165,7 @@ class ReloadClassesWorker {
|
||||
processException(e);
|
||||
}
|
||||
|
||||
CompoundPositionManager positionManager = debugProcess.getPositionManager();
|
||||
if (positionManager != null) {
|
||||
positionManager.clearCache();
|
||||
}
|
||||
debugProcess.getPositionManager().clearCache();
|
||||
|
||||
DebuggerContextImpl context = myDebuggerSession.getContextManager().getContext();
|
||||
SuspendContextImpl suspendContext = context.getSuspendContext();
|
||||
|
||||
@@ -45,6 +45,7 @@ public interface DebugProcess {
|
||||
|
||||
RequestManager getRequestsManager();
|
||||
|
||||
@NotNull
|
||||
PositionManager getPositionManager();
|
||||
|
||||
VirtualMachineProxy getVirtualMachineProxy();
|
||||
|
||||
Reference in New Issue
Block a user