From 6cc13ab8816f70ab843aa41841d27121613f2740 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Fri, 30 Apr 2010 15:31:12 +0000 Subject: [PATCH] Clarify method. --- .../eclipse/cdt/dsf/debug/service/command/CommandCache.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/command/CommandCache.java b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/command/CommandCache.java index a21c655c22f..08bd677026a 100644 --- a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/command/CommandCache.java +++ b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/command/CommandCache.java @@ -607,6 +607,10 @@ public class CommandCache implements ICommandListener CommandInfo cachedCmd = new CommandInfo( CommandStyle.NONCOALESCED, genericCommand, null) ; + // It is important to actually fetch the content of the fPendingQCommandsNotYetSent map + // instead of only using 'cachedCmd'. This is because although cachedCmd can be considered + // equal to unqueuedCommand, it is not identical and we need the full content of unqueuedCommand. + // For instance, cachedCmd does not have the list of requestMonitors that unqueuedCommand has. for ( CommandInfo unqueuedCommand : new ArrayList(fPendingQCommandsNotYetSent) ) { if ( unqueuedCommand.equals( cachedCmd )) { fPendingQCommandsNotYetSent.remove(unqueuedCommand);