summaryrefslogtreecommitdiff
path: root/jvmfwk
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-09-11 16:44:51 +0200
committerMichael Stahl <mstahl@redhat.com>2014-09-11 16:45:40 +0200
commitc5cdcd8f5ac16b571e083d3222e7447e5c5ed03a (patch)
tree2a94190ff300a170902c482309f139e8ee08d408 /jvmfwk
parentfd35ddd3e1cf16876bbc57d29c7472e551304f0f (diff)
jvmfwk: print a warning if running java fa
Change-Id: Ibfcd6678ed1503cfab0881f3ec67c4c158d798cb
Diffstat (limited to 'jvmfwk')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 4e46a67ad0d0..0815ea83a704 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -390,12 +390,16 @@ bool getJavaProps(const OUString & exePath,
OUString sThisLib;
if (osl_getModuleURLFromAddress((void *) (sal_IntPtr)& getJavaProps,
& sThisLib.pData) == sal_False)
+ {
return false;
+ }
sThisLib = getDirFromFile(sThisLib);
OUString sClassPath;
if (osl_getSystemPathFromFileURL(sThisLib.pData, & sClassPath.pData)
!= osl_File_E_None)
+ {
return false;
+ }
#ifdef MACOSX
if (sClassPath.endsWith("/"))
@@ -456,6 +460,8 @@ bool getJavaProps(const OUString & exePath,
{
JFW_TRACE2("[Java framework] Execution failed. \n");
*bProcessRun = false;
+ SAL_WARN("jfw",
+ "osl_executeProcess failed (" << ret << "): \"" << exePath << "\"");
return ret;
}
else
@@ -885,7 +891,9 @@ rtl::Reference<VendorBase> getJREInfoByPath(
OUString sResolvedDir = resolveDirPath(path);
// If this path is invalid then there is no chance to find a JRE here
if (sResolvedDir.isEmpty())
+ {
return 0;
+ }
//check if the directory path is good, that is a JRE was already recognized.
//Then we need not detect it again
@@ -936,13 +944,17 @@ rtl::Reference<VendorBase> getJREInfoByPath(
//The file path (to java exe) is not valid
cit_path ifull = find(vecBadPaths.begin(), vecBadPaths.end(), sFullPath);
if (ifull == vecBadPaths.end())
+ {
vecBadPaths.push_back(sFullPath);
+ }
continue;
}
cit_path ifile = find(vecBadPaths.begin(), vecBadPaths.end(), sFilePath);
if (ifile != vecBadPaths.end())
+ {
continue;
+ }
MapIt entry = mapJREs.find(sFilePath);
if (entry != mapJREs.end())
@@ -1008,7 +1020,9 @@ rtl::Reference<VendorBase> getJREInfoByPath(
}
if (props.empty())
+ {
return rtl::Reference<VendorBase>();
+ }
//find java.vendor property
typedef vector<pair<OUString, OUString> >::const_iterator c_ip;
@@ -1040,7 +1054,9 @@ rtl::Reference<VendorBase> getJREInfoByPath(
}
}
if (!ret.is())
+ {
vecBadPaths.push_back(sFilePath);
+ }
else
{
JFW_TRACE2(OUString("[Java framework] sunjavaplugin")