summaryrefslogtreecommitdiff
path: root/jvmfwk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-02-11 16:45:52 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-02-12 08:07:48 +0100
commitba826a22c63b5045d93a91f13c2ba856bdf77a64 (patch)
tree0aa93f531e08412ee4a3072bc04dec1a2b88fc4f /jvmfwk
parent972d71dafda82f227149cb2e4fc6eb3a84886d89 (diff)
Simplify string handling
Change-Id: I1b79bfd7e7e92fc8f4937e6b9ae9ec9468839ea6
Diffstat (limited to 'jvmfwk')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 481847e1cdfc..a7ee90a29cc2 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -646,7 +646,6 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
options[n].optionString= (char *) "abort";
options[n].extraInfo= (void* )(sal_IntPtr)abort_handler;
++n;
- OString sClassPathProp("-Djava.class.path=");
OString sClassPathOption;
for (int i = 0; i < cOptions; i++)
{
@@ -654,12 +653,12 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
// Until java 1.5 we need to put a plugin.jar or javaplugin.jar (<1.4.2)
// in the class path in order to have applet support.
OString sClassPath = arOptions[i].optionString;
- if (sClassPath.match(sClassPathProp, 0))
+ if (sClassPath.startsWith("-Djava.class.path="))
{
- char sep[] = {SAL_PATHSEPARATOR, 0};
OString sAddPath = getPluginJarPath(pInfo->sVendor, pInfo->sLocation,pInfo->sVersion);
if (!sAddPath.isEmpty())
- sClassPathOption = sClassPath + OString(sep) + sAddPath;
+ sClassPathOption = sClassPath + OString(SAL_PATHSEPARATOR)
+ + sAddPath;
else
sClassPathOption = sClassPath;
options[n].optionString = (char *) sClassPathOption.getStr();