Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Kaegi2009-01-21 23:00:49 +0000
committerSimon Kaegi2009-01-21 23:00:49 +0000
commitf95dffe5eb7ab11ebf37bf125e001a8fdb3c5248 (patch)
tree313d58e14b6e6e2f8183c05e922c56bba31d9644 /bundles/org.eclipse.equinox.frameworkadmin
parentde56b7015efb7c702be1b498522def72293721f8 (diff)
downloadrt.equinox.p2-f95dffe5eb7ab11ebf37bf125e001a8fdb3c5248.tar.gz
rt.equinox.p2-f95dffe5eb7ab11ebf37bf125e001a8fdb3c5248.tar.xz
rt.equinox.p2-f95dffe5eb7ab11ebf37bf125e001a8fdb3c5248.zip
Bug 253862 [fwkAdmin] Remove program argument need to specify a number of arguments
Diffstat (limited to 'bundles/org.eclipse.equinox.frameworkadmin')
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java20
1 files changed, 19 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java
index a5dcb34d8..914be985a 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java
@@ -137,7 +137,25 @@ public class LauncherData {
}
public void removeProgramArg(String arg) {
- programArgs.remove(arg);
+ // We want to handle program args as key/value pairs subsequently
+ // a key MUST start with a "-", all other args are ignored. For
+ // backwards compatibility we remove all program args until the
+ // next program arg key
+ // (see bug 253862)
+ if (!arg.startsWith("-"))
+ return;
+
+ int index = programArgs.indexOf(arg);
+ if (index == -1)
+ return;
+
+ programArgs.remove(index);
+ while (index < programArgs.size()) {
+ String next = (String) programArgs.get(index);
+ if (next.charAt(0) == '-')
+ return;
+ programArgs.remove(index);
+ }
}
public void setFwConfigLocation(File fwConfigLocation) {

Back to the top