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