Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2008-04-24 11:45:37 -0400
committerMarkus Schorn2008-04-24 11:45:37 -0400
commit6875e287df14a80e58994d8be46b3ae453bb3b1c (patch)
tree91c2d76e290421aa939664d36cb5325a7d4da683 /core/org.eclipse.cdt.core.win32/src
parent9ae3086a2719e7d679ec18fc71eef43fea3b8881 (diff)
downloadorg.eclipse.cdt-6875e287df14a80e58994d8be46b3ae453bb3b1c.tar.gz
org.eclipse.cdt-6875e287df14a80e58994d8be46b3ae453bb3b1c.tar.xz
org.eclipse.cdt-6875e287df14a80e58994d8be46b3ae453bb3b1c.zip
Fix warnings.
Diffstat (limited to 'core/org.eclipse.cdt.core.win32/src')
-rw-r--r--core/org.eclipse.cdt.core.win32/src/org/eclipse/cdt/internal/core/win32/ProcessList.java25
1 files changed, 14 insertions, 11 deletions
diff --git a/core/org.eclipse.cdt.core.win32/src/org/eclipse/cdt/internal/core/win32/ProcessList.java b/core/org.eclipse.cdt.core.win32/src/org/eclipse/cdt/internal/core/win32/ProcessList.java
index d5f1513ac7..c818292098 100644
--- a/core/org.eclipse.cdt.core.win32/src/org/eclipse/cdt/internal/core/win32/ProcessList.java
+++ b/core/org.eclipse.cdt.core.win32/src/org/eclipse/cdt/internal/core/win32/ProcessList.java
@@ -22,6 +22,7 @@ import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.IProcessInfo;
import org.eclipse.cdt.core.IProcessList;
import org.eclipse.cdt.utils.spawner.ProcessFactory;
+import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.osgi.framework.Bundle;
@@ -44,17 +45,19 @@ public class ProcessList implements IProcessList {
Bundle bundle = Platform.getBundle(CCorePlugin.PLUGIN_ID);
try {
- URL url = Platform.find(bundle, new Path("$os$/listtasks.exe")); //$NON-NLS-1$
- url = Platform.resolve(url);
- String path = url.getFile();
- File file = new File(path);
- if (file.exists()) {
- command = file.getCanonicalPath();
- if (command != null) {
- p = ProcessFactory.getFactory().exec(command);
- in = p.getInputStream();
- InputStreamReader reader = new InputStreamReader(in);
- return parseListTasks(reader);
+ URL url = FileLocator.find(bundle, new Path("$os$/listtasks.exe"), null); //$NON-NLS-1$
+ if (url != null) {
+ url = FileLocator.resolve(url);
+ String path = url.getFile();
+ File file = new File(path);
+ if (file.exists()) {
+ command = file.getCanonicalPath();
+ if (command != null) {
+ p = ProcessFactory.getFactory().exec(command);
+ in = p.getInputStream();
+ InputStreamReader reader = new InputStreamReader(in);
+ return parseListTasks(reader);
+ }
}
}
} catch (IOException e) {

Back to the top