jvmfwk: Use appropriate OUString functions on string constants
Change-Id: I3e0b70c61c4e92f2cbd27ce7c45e67ae04dfe14c
This commit is contained in:
parent
43e889da02
commit
f582ad2c69
@ -946,8 +946,7 @@ rtl::Reference<VendorBase> getJREInfoByPath(
|
||||
if (path.getLength() == sizeof("file:///") - 1)
|
||||
sFullPath = sResolvedDir + (*i);
|
||||
else
|
||||
sFullPath = sResolvedDir +
|
||||
OUString("/") + (*i);
|
||||
sFullPath = sResolvedDir + "/" + (*i);
|
||||
|
||||
sFilePath = resolveFilePath(sFullPath);
|
||||
|
||||
@ -1103,8 +1102,6 @@ void addJavaInfosFromPath(
|
||||
{
|
||||
#if !defined JVM_ONE_PATH_CHECK
|
||||
// Get Java from PATH environment variable
|
||||
static const char sCurDir[] = ".";
|
||||
static const char sParentDir[] = "..";
|
||||
char *szPath= getenv("PATH");
|
||||
if(szPath)
|
||||
{
|
||||
@ -1119,15 +1116,13 @@ void addJavaInfosFromPath(
|
||||
if(!usTokenUrl.isEmpty())
|
||||
{
|
||||
OUString usBin;
|
||||
// "."
|
||||
if(usTokenUrl.equals(sCurDir))
|
||||
if(usTokenUrl == ".")
|
||||
{
|
||||
OUString usWorkDirUrl;
|
||||
if(osl_Process_E_None == osl_getProcessWorkingDir(&usWorkDirUrl.pData))
|
||||
usBin= usWorkDirUrl;
|
||||
}
|
||||
// ".."
|
||||
else if(usTokenUrl.equals(sParentDir))
|
||||
else if(usTokenUrl == "..")
|
||||
{
|
||||
OUString usWorkDir;
|
||||
if(osl_Process_E_None == osl_getProcessWorkingDir(&usWorkDir.pData))
|
||||
|
@ -84,7 +84,7 @@ struct SameOrSubDirJREMap
|
||||
if (s1 == s2.first)
|
||||
return true;
|
||||
OUString sSub;
|
||||
sSub = s2.first + OUString("/");
|
||||
sSub = s2.first + "/";
|
||||
if (s1.match(sSub))
|
||||
return true;
|
||||
return false;
|
||||
|
@ -232,7 +232,7 @@ std::vector<OUString> VendorSettings::getSupportedVendors()
|
||||
|
||||
for (sal_Int32 i = 1; ; i++)
|
||||
{
|
||||
OUString sName = OUString(UNO_JAVA_JFW_PARAMETER) + OUString::number(i);
|
||||
OUString sName = UNO_JAVA_JFW_PARAMETER + OUString::number(i);
|
||||
OUString sValue;
|
||||
if (Bootstrap::get()->getFrom(sName, sValue))
|
||||
{
|
||||
@ -436,8 +436,7 @@ JFW_MODE getMode()
|
||||
OUString sEnvClasspath(UNO_JAVA_JFW_ENV_CLASSPATH);
|
||||
if (!aBoot->getFrom(sEnvClasspath, sValue))
|
||||
{
|
||||
OUString sParams = OUString(
|
||||
UNO_JAVA_JFW_PARAMETER) +
|
||||
OUString sParams = UNO_JAVA_JFW_PARAMETER +
|
||||
OUString::number(1);
|
||||
if (!aBoot->getFrom(sParams, sValue))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user