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

Stephan Bergmann sbergman at redhat.com
Thu May 8 03:58:29 PDT 2014


 include/jvmfwk/framework.h  |   33 ++-------------------------------
 jvmfwk/source/framework.cxx |   29 ++---------------------------
 2 files changed, 4 insertions(+), 58 deletions(-)

New commits:
commit 5a8b1b16de62bf595df7927891d539691ac26a89
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu May 8 12:58:01 2014 +0200

    Remove unused jfw_setJRELocations
    
    Change-Id: If71cc5052f7ddfbc2d69ba01aa0cd3be2a4def8e

diff --git a/include/jvmfwk/framework.h b/include/jvmfwk/framework.h
index 50480da..570f852 100644
--- a/include/jvmfwk/framework.h
+++ b/include/jvmfwk/framework.h
@@ -337,7 +337,7 @@ JVMFWK_DLLPUBLIC javaFrameworkError SAL_CALL jfw_isVMRunning(sal_Bool *bRunning)
     installation and checks if they there is one among them that supports
     a set of features (currently only accessibilty is possible). If none was
     found then it also uses a list of paths, which have been registered
-    by <code>jfw_addJRELocation</code> or <code>jfw_setJRELocations</code>
+    by <code>jfw_addJRELocation</code>
     to find JREs. Found JREs are examined in the same way.</p>
     <p>
     A JRE installation is only selected if it meets the version requirements.
@@ -394,7 +394,7 @@ JVMFWK_DLLPUBLIC javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pIn
     the plug-in libraries to provide lists of available <code>JavaInfo</code>
     objects where each object represents a JRE (see vendorplugin.h,
     getAllJavaInfos). It also uses a list of paths, which have been registered
-    by <code>jfw_addJRELocation</code> or <code>jfw_setJRELocations</code>.
+    by <code>jfw_addJRELocation</code>.
     It is checked if the path still contains a valid JRE and if so the respective
     <code>JavaInfo</code> object will be appended to the array unless there is
     already an equal object.</p>
@@ -729,38 +729,9 @@ JVMFWK_DLLPUBLIC javaFrameworkError SAL_CALL jfw_getUserClassPath(rtl_uString **
     JFW_E_CONFIGURATION mode was not properly set or their prerequisites
     were not met.<br/>
     JFW_E_DIRECT_MODE the function cannot be used in this mode.
-    @see jfw_setJRELocations
  */
 JVMFWK_DLLPUBLIC javaFrameworkError SAL_CALL jfw_addJRELocation(rtl_uString * sLocation);
 
-/** saves the locations of a number of JREs.
-
-    <p>
-    The function does not verify if the paths points to JRE. However,
-    it makes sure that every path is unique. That is, if the array
-    contains strings which are the same then only one is stored.</p>
-    <p>
-    If <code>arLocations</code> is NULL or it has the length null (nSize = 0)
-    then all previously stored paths are deleted. Otherwise,
-    the old values are overwritten.</p>
-
-    @param arLocations
-    [in] array of paths to locations of JREs.
-
-    @param nSize
-    [in] the size of the array <code>arLocations</code>
-
-    @return
-    JFW_E_NONE function ran successfully.<br/>
-    JFW_E_INVALIDARG arLocation is NULL and nSize is not null.<br/>
-    JFW_E_ERROR An error occurred.<br/>
-    JFW_E_CONFIGURATION mode was not properly set or their prerequisites
-    were not met.<br/>
-    JFW_E_DIRECT_MODE the function cannot be used in this mode.
-    @see jfw_addJRELocations
- */
-JVMFWK_DLLPUBLIC javaFrameworkError SAL_CALL jfw_setJRELocations(
-    rtl_uString ** arLocations, sal_Int32 nSize);
 /** obtains an array containing paths to JRE installations.
 
     <p>
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index dcaac1b..56e24c6 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -171,7 +171,7 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi
             rtl_freeMemory(arInfos);
 
             //Check if the current plugin can detect JREs at the location
-            // of the paths added by jfw_setJRELocations or jfw_addJRELocation
+            // of the paths added by jfw_addJRELocation
             //get the function from the plugin
 #ifndef DISABLE_DYNLOADING
             jfw_plugin_getJavaInfoByPath_ptr jfw_plugin_getJavaInfoByPathFunc =
@@ -591,7 +591,7 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo)
                 if (!pluginLib.is())
                     return JFW_E_NO_PLUGIN;
                 //Check if the current plugin can detect JREs at the location
-                // of the paths added by jfw_setJRELocations or jfw_addJRELocation
+                // of the paths added by jfw_addJRELocation
                 //get the function from the plugin
                 jfw_plugin_getJavaInfoByPath_ptr jfw_plugin_getJavaInfoByPathFunc =
                     (jfw_plugin_getJavaInfoByPath_ptr) pluginLib.getFunctionSymbol(
@@ -1109,31 +1109,6 @@ javaFrameworkError SAL_CALL jfw_addJRELocation(rtl_uString * sLocation)
 
 }
 
-javaFrameworkError SAL_CALL jfw_setJRELocations(
-    rtl_uString ** arLocations, sal_Int32 nLen)
-{
-    javaFrameworkError errcode = JFW_E_NONE;
-    try
-    {
-        osl::MutexGuard guard(jfw::FwkMutex::get());
-        if (jfw::getMode() == jfw::JFW_MODE_DIRECT)
-            return JFW_E_DIRECT_MODE;
-        jfw::NodeJava node(jfw::NodeJava::USER);
-        if (arLocations == NULL && nLen != 0)
-            return JFW_E_INVALID_ARG;
-        node.setJRELocations(arLocations, nLen);
-        node.write();
-    }
-    catch (const jfw::FrameworkException& e)
-    {
-        errcode = e.errorCode;
-        fprintf(stderr, "%s\n", e.message.getStr());
-        OSL_FAIL(e.message.getStr());
-    }
-    return errcode;
-
-}
-
 javaFrameworkError SAL_CALL jfw_getJRELocations(
     rtl_uString *** parLocations, sal_Int32 *pLen)
 {


More information about the Libreoffice-commits mailing list