Bug 569891 - [AddJVMArgumentAction] IllegalArgumentException
trim whitespaces from argument before parsing
Change-Id: I02b4eab72a7e8ecb6edc9805919c9e6a04d2952f
Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF
index 0c67700..39e9446 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.equinox.p2.touchpoint.eclipse;singleton:=true
-Bundle-Version: 2.2.700.qualifier
+Bundle-Version: 2.2.800.qualifier
Bundle-Activator: org.eclipse.equinox.internal.p2.touchpoint.eclipse.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml
index a7ed58f..1aa4f30 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.p2.touchpoint.eclipse</artifactId>
- <version>2.2.700-SNAPSHOT</version>
+ <version>2.2.800-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java
index 6c11207..1a5a565 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 2020 IBM Corporation and others.
*
* This
* program and the accompanying materials are made available under the terms of
@@ -10,6 +10,7 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors: IBM Corporation - initial API and implementation
+ * Christoph Läubrich - Bug 569891
******************************************************************************/
package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
@@ -59,11 +60,11 @@
File storageArea = (File) parameters.get(ActionConstants.PARM_PROFILE_DATA_DIRECTORY);
try {
if (arg.startsWith(XMS))
- addByteArg(arg, XMS, launcherData, storageArea);
+ addByteArg(arg.trim(), XMS, launcherData, storageArea);
else if (arg.startsWith(XMX))
- addByteArg(arg, XMX, launcherData, storageArea);
+ addByteArg(arg.trim(), XMX, launcherData, storageArea);
else if (arg.startsWith(XX_MAX_PERM_SIZE))
- addByteArg(arg, XX_MAX_PERM_SIZE, launcherData, storageArea);
+ addByteArg(arg.trim(), XX_MAX_PERM_SIZE, launcherData, storageArea);
else
// Argument with a non-byte value, no special handling
launcherData.addJvmArg(arg);