[Libreoffice-commits] core.git: desktop/source
Stephan Bergmann
sbergman at redhat.com
Tue Apr 11 13:04:54 UTC 2017
desktop/source/migration/services/jvmfwk.cxx | 27 +++------------------------
1 file changed, 3 insertions(+), 24 deletions(-)
New commits:
commit e4627e83de6ccae825944004604316b5b419f2ac
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Apr 11 15:04:30 2017 +0200
Use jfw::JavaInfoGuard
Change-Id: I2eb0a82d3e935f183729f76375feed927a34d74f
diff --git a/desktop/source/migration/services/jvmfwk.cxx b/desktop/source/migration/services/jvmfwk.cxx
index f766011d4821..042609a69433 100644
--- a/desktop/source/migration/services/jvmfwk.cxx
+++ b/desktop/source/migration/services/jvmfwk.cxx
@@ -57,27 +57,6 @@ using namespace com::sun::star::configuration::backend;
namespace migration
{
-class CJavaInfo
-{
-public:
- JavaInfo* pData;
- CJavaInfo();
- ~CJavaInfo();
- CJavaInfo(const CJavaInfo&) = delete;
- const CJavaInfo& operator=(const CJavaInfo&) = delete;
- operator JavaInfo* () const { return pData;}
-};
-
-CJavaInfo::CJavaInfo(): pData(nullptr)
-{
-}
-
-CJavaInfo::~CJavaInfo()
-{
- delete pData;
-}
-
-
class JavaMigration : public ::cppu::WeakImplHelper<
css::lang::XServiceInfo,
css::lang::XInitialization,
@@ -258,12 +237,12 @@ void JavaMigration::migrateJavarc()
if (bSuccess && !sValue.isEmpty())
{
//get the directory
- CJavaInfo aInfo;
- javaFrameworkError err = jfw_getJavaInfoByPath(sValue.pData, &aInfo.pData);
+ jfw::JavaInfoGuard aInfo;
+ javaFrameworkError err = jfw_getJavaInfoByPath(sValue.pData, &aInfo.info);
if (err == JFW_E_NONE)
{
- if (jfw_setSelectedJRE(aInfo) != JFW_E_NONE)
+ if (jfw_setSelectedJRE(aInfo.info) != JFW_E_NONE)
{
OSL_FAIL("[Service implementation " IMPL_NAME
"] XJob::execute: jfw_setSelectedJRE failed.");
More information about the Libreoffice-commits
mailing list