desktop/source/migration/services/jvmfwk.cxx | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-)
New commits: commit e4627e83de6ccae825944004604316b5b419f2ac Author: Stephan Bergmann <sberg...@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."); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits