summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-04-11 18:04:54 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-04-11 18:04:54 +0200
commitf0454e72c1d1b11c3bcbacb23048a62fdecd037c (patch)
tree14159abbfbc60777e4c6fbf7d711aed22bac33fd /desktop
parent6bb4c48812224237c29acf31264cc05e2938f242 (diff)
Use std::unique_ptr<JavaInfo> for lifecycle management in jvmfwk/framework.hxx
Change-Id: Ie604c75e92c407ff3118aaa58155648d956c91fb
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/migration/services/jvmfwk.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/desktop/source/migration/services/jvmfwk.cxx b/desktop/source/migration/services/jvmfwk.cxx
index 042609a69433..9fb42e96c9e8 100644
--- a/desktop/source/migration/services/jvmfwk.cxx
+++ b/desktop/source/migration/services/jvmfwk.cxx
@@ -37,6 +37,7 @@
#include <com/sun/star/configuration/backend/TemplateIdentifier.hpp>
#include <jvmfwk/framework.hxx>
#include "jvmfwk.hxx"
+#include <memory>
#include <stack>
#include <stdio.h>
@@ -237,12 +238,12 @@ void JavaMigration::migrateJavarc()
if (bSuccess && !sValue.isEmpty())
{
//get the directory
- jfw::JavaInfoGuard aInfo;
- javaFrameworkError err = jfw_getJavaInfoByPath(sValue.pData, &aInfo.info);
+ std::unique_ptr<JavaInfo> aInfo;
+ javaFrameworkError err = jfw_getJavaInfoByPath(sValue.pData, &aInfo);
if (err == JFW_E_NONE)
{
- if (jfw_setSelectedJRE(aInfo.info) != JFW_E_NONE)
+ if (jfw_setSelectedJRE(aInfo.get()) != JFW_E_NONE)
{
OSL_FAIL("[Service implementation " IMPL_NAME
"] XJob::execute: jfw_setSelectedJRE failed.");