# HG changeset patch # User john.dean.3@nokia.com # Date 1250004692 18000 # Node ID 154ecf9c91861f382d4b7bc3a0e263d3b6ae8144 # Parent ad8d147e8273f7939b41e9f2402e0fa3419ccc70 Updated after code review. Modified attribute check for efficiency and hardened OSProcess selection using OSProcess.parseProcess() diff -r ad8d147e8273 -r 154ecf9c9186 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/AttachLaunchDelegate.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/AttachLaunchDelegate.java Mon Aug 10 15:50:55 2009 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/AttachLaunchDelegate.java Tue Aug 11 10:31:32 2009 -0500 @@ -133,7 +133,7 @@ String defaultProcessName = exeFile.getPath().removeFileExtension().lastSegment(); OSProcess attachTarget = null; String choosenProcessTarget = config.getAttribute(SettingsData.AttachToProcessDialog_Selection, ""); - if (!choosenProcessTarget.contentEquals("")) { + if (choosenProcessTarget.length() > 0) { attachTarget = chooseProcessTargetNoUI(processesOnTarget, choosenProcessTarget); } else { attachTarget = chooseProcessTarget(processesOnTarget, defaultProcessName); @@ -206,7 +206,7 @@ attachTarget = null; for (OSProcess process : processesOnTarget) { - if (process.getName().contains(choosenProcessName)) { + if (process.parseProcess().getProcessName().equals(choosenProcessName)) { attachTarget = process; break; }