From ba826a22c63b5045d93a91f13c2ba856bdf77a64 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 11 Feb 2014 16:45:52 +0100 Subject: Simplify string handling Change-Id: I1b79bfd7e7e92fc8f4937e6b9ae9ec9468839ea6 --- jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'jvmfwk') 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(); -- cgit