[Libreoffice-commits] core.git: jvmfwk/source

Stephan Bergmann sbergman at redhat.com
Tue Apr 11 13:08:08 UTC 2017


 jvmfwk/source/framework.cxx |   10 +---------
 jvmfwk/source/framework.hxx |    5 ++---
 2 files changed, 3 insertions(+), 12 deletions(-)

New commits:
commit a730dc1b566565472ea7e4b94f0dea9705d0a809
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Apr 11 15:07:42 2017 +0200

    Remove unnecessary jfw::CJavaInfo::cloneJavaInfo
    
    Change-Id: Ia9e807c0d1e5b0664d711c551a5e70afccbcc564

diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index a56c29488f1f..22d066516326 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -603,7 +603,7 @@ javaFrameworkError jfw_findAndSelectJRE(JavaInfo **pInfo)
             if (pInfo !=nullptr)
             {
                 //copy to out param
-                *pInfo = aCurrentInfo.cloneJavaInfo();
+                *pInfo = jfw::CJavaInfo::copyJavaInfo(aCurrentInfo.pInfo);
             }
         }
         else
@@ -1063,14 +1063,6 @@ JavaInfo * CJavaInfo::copyJavaInfo(const JavaInfo * pInfo)
     return pInfo == nullptr ? nullptr : new JavaInfo(*pInfo);
 }
 
-
-JavaInfo* CJavaInfo::cloneJavaInfo() const
-{
-    if (pInfo == nullptr)
-        return nullptr;
-    return copyJavaInfo(pInfo);
-}
-
 CJavaInfo & CJavaInfo::operator = (const CJavaInfo& info)
 {
     if (&info == this)
diff --git a/jvmfwk/source/framework.hxx b/jvmfwk/source/framework.hxx
index 8e433054fd3a..9521a723c54a 100644
--- a/jvmfwk/source/framework.hxx
+++ b/jvmfwk/source/framework.hxx
@@ -67,8 +67,6 @@ namespace jfw
 
 class CJavaInfo
 {
-    static JavaInfo * copyJavaInfo(const JavaInfo * pInfo);
-
     enum _transfer_ownership {TRANSFER};
     /*Attaching the pointer to this class. The argument pInfo must not
     be freed afterwards.
@@ -96,10 +94,11 @@ public:
     ::JavaInfo * detach();
     const ::JavaInfo* operator ->() const { return pInfo;}
     operator ::JavaInfo* () { return pInfo;}
-    ::JavaInfo* cloneJavaInfo() const;
 
     OUString getLocation() const;
     sal_uInt64 getFeatures() const;
+
+    static JavaInfo * copyJavaInfo(const JavaInfo * pInfo);
 };
 
 class FrameworkException : public std::exception


More information about the Libreoffice-commits mailing list