summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-04-11 15:04:30 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-04-11 15:04:30 +0200
commite4627e83de6ccae825944004604316b5b419f2ac (patch)
tree2e7f836ac36033d845ce2b2ea60282ea9450ae5e /desktop
parent3927105e19d335da6461d853ba5cedda788067da (diff)
Use jfw::JavaInfoGuard
Change-Id: I2eb0a82d3e935f183729f76375feed927a34d74f
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/migration/services/jvmfwk.cxx27
1 files changed, 3 insertions, 24 deletions
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.");