[Libreoffice-commits] core.git: 2 commits - jvmfwk/plugins jvmfwk/source
Stephan Bergmann
sbergman at redhat.com
Wed Nov 16 22:47:35 UTC 2016
jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 3 ++-
jvmfwk/source/framework.cxx | 7 ++-----
2 files changed, 4 insertions(+), 6 deletions(-)
New commits:
commit 36a329b6395257d7df2013d23ba4205a5ef72f4d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Nov 16 23:40:25 2016 +0100
Fix regression in bubbleSortVersion
...introduced with 789055bc2acb4c71483fd60ea258d158bd5aec10 "clang-tidy
performance-unnecessary-copy-initialization" (so partially revert it). Whatever
clang-tidy erroneously reported there, cur and next are lvalue references into
vec, so this attempted copy now actually overwrote one with the other. The
result was that if multiple JREs are detected on the system, "Options -
LibreOffice - Advanced" would list a single one multiple times.
Change-Id: I7ef454c0f37669722812383848602dc2bacf7cd1
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 153a939..d1a0088 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -731,8 +731,9 @@ void bubbleSortVersion(vector<rtl::Reference<VendorBase> >& vec)
}
if(nCmp == 1) // cur > next
{
+ rtl::Reference<VendorBase> less = next;
vec.at(j-1)= cur;
- vec.at(j)= next;
+ vec.at(j)= less;
}
}
++cIter;
commit 36c8fd8995f4e1c8439a69dde1f55e45e674d7b2
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Nov 16 23:03:09 2016 +0100
Clean up jfw_findAllJREs return value computation
Change-Id: Iace2281ec4b5cfaa6e1de44b58a6705ca3a18c58
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 81fd3fc..94f7c2c 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -49,11 +49,9 @@ bool areEqualJavaInfo(
javaFrameworkError jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSize)
{
- javaFrameworkError retVal = JFW_E_NONE;
try
{
osl::MutexGuard guard(jfw::FwkMutex::get());
- javaFrameworkError errcode = JFW_E_NONE;
if (pparInfo == nullptr || pSize == nullptr)
return JFW_E_INVALID_ARG;
@@ -186,15 +184,14 @@ javaFrameworkError jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSize)
(*pparInfo)[index++] = l->detach();
*pSize = nSize;
- return errcode;
+ return JFW_E_NONE;
}
catch (const jfw::FrameworkException& e)
{
- retVal = e.errorCode;
fprintf(stderr, "%s\n", e.message.getStr());
OSL_FAIL(e.message.getStr());
+ return e.errorCode;
}
- return retVal;
}
javaFrameworkError jfw_startVM(
More information about the Libreoffice-commits
mailing list