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

2022-04-15 Thread Noel Grandin (via logerrit)
 jvmfwk/inc/fwkutil.hxx |2 +-
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx |6 +++---
 jvmfwk/plugins/sunmajor/pluginlib/util.hxx |2 +-
 jvmfwk/source/fwkutil.cxx  |6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 65e846d73c023cb8ed8a8393a91032d4a816f2a0
Author: Noel Grandin 
AuthorDate: Fri Apr 15 16:47:26 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Apr 15 21:33:17 2022 +0200

use more string_view in jvmfwk

Change-Id: I05f3b171578b8fef5b15dcbbf10ae9b7cf2d1b02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133075
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/jvmfwk/inc/fwkutil.hxx b/jvmfwk/inc/fwkutil.hxx
index 825355f42a47..76d437ae76b9 100644
--- a/jvmfwk/inc/fwkutil.hxx
+++ b/jvmfwk/inc/fwkutil.hxx
@@ -46,7 +46,7 @@ osl::Mutex& FwkMutex();
 rtl::ByteSequence encodeBase16(const rtl::ByteSequence& rawData);
 rtl::ByteSequence decodeBase16(const rtl::ByteSequence& data);
 
-OUString getDirFromFile(const OUString& usFilePath);
+OUString getDirFromFile(std::u16string_view usFilePath);
 
 enum FileStatus
 {
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index f7d786007544..b596e18cf480 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -1023,10 +1023,10 @@ Reference 
createInstance(createInstance_func pFunc,
 return aBase;
 }
 
-inline OUString getDirFromFile(const OUString& usFilePath)
+inline OUString getDirFromFile(std::u16string_view usFilePath)
 {
-sal_Int32 index = usFilePath.lastIndexOf('/');
-return usFilePath.copy(0, index);
+size_t index = usFilePath.rfind('/');
+return OUString(usFilePath.substr(0, index));
 }
 
 void addJavaInfosFromPath(
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx 
b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx
index 78df074f9de3..9ba0055832ed 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx
@@ -37,7 +37,7 @@ void addJREInfoFromBinPath(
 const OUString& path,
 std::vector> & allInfos,
 std::vector> & addedInfos);
-inline OUString getDirFromFile(const OUString& usFilePath);
+inline OUString getDirFromFile(std::u16string_view usFilePath);
 void addJavaInfosFromPath(
 std::vector> & allInfos,
 std::vector> & addedInfos);
diff --git a/jvmfwk/source/fwkutil.cxx b/jvmfwk/source/fwkutil.cxx
index ee083f064926..89cb2e5415cb 100644
--- a/jvmfwk/source/fwkutil.cxx
+++ b/jvmfwk/source/fwkutil.cxx
@@ -136,10 +136,10 @@ rtl::ByteSequence decodeBase16(const rtl::ByteSequence& 
data)
 return ret;
 }
 
-OUString getDirFromFile(const OUString& usFilePath)
+OUString getDirFromFile(std::u16string_view usFilePath)
 {
-sal_Int32 index = usFilePath.lastIndexOf('/');
-return usFilePath.copy(0, index);
+size_t index = usFilePath.rfind('/');
+return OUString(usFilePath.substr(0, index));
 }
 
 OUString getLibraryLocation()


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

2021-11-16 Thread Noel Grandin (via logerrit)
 jvmfwk/inc/fwkutil.hxx  |   20 +---
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |6 +--
 jvmfwk/source/elements.cxx  |2 -
 jvmfwk/source/framework.cxx |   32 ++--
 jvmfwk/source/fwkbase.cxx   |   18 +--
 jvmfwk/source/fwkutil.cxx   |   28 +
 6 files changed, 59 insertions(+), 47 deletions(-)

New commits:
commit 1170db278db9f1067c05d5df95faf81c1ce861bc
Author: Noel Grandin 
AuthorDate: Mon Nov 15 21:44:42 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Nov 16 12:29:38 2021 +0100

rtl::Static->thread-safe static in jvmfwk

Change-Id: I049148d82eb306e8ba7fdc9f0cc650f45b05da0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125257
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/jvmfwk/inc/fwkutil.hxx b/jvmfwk/inc/fwkutil.hxx
index fdef421f664f..e76a92769fc1 100644
--- a/jvmfwk/inc/fwkutil.hxx
+++ b/jvmfwk/inc/fwkutil.hxx
@@ -24,8 +24,8 @@
 #include 
 #include 
 #include 
-#include 
 #include 
+#include 
 
 namespace osl { class Mutex; }
 
@@ -40,23 +40,9 @@ OUString getLibraryLocation();
 /** provides a bootstrap class which already knows the values from the
 jvmfkwrc file.
 */
-struct Bootstrap :
-public ::rtl::StaticWithInit< const rtl::Bootstrap *, Bootstrap > {
-const rtl::Bootstrap * operator () () {
-OUString sIni = getLibraryLocation() +
-#ifdef MACOSX
-// For some reason the jvmfwk3rc file is traditionally in
-// LIBO_URE_ETC_FOLDER
-"/../" LIBO_URE_ETC_FOLDER
-#endif
-SAL_CONFIGFILE("/jvmfwk3");
-::rtl::Bootstrap *  bootstrap = new ::rtl::Bootstrap(sIni);
-SAL_INFO("jfw.level2", "Using configuration file " << sIni);
-return bootstrap;
-}
-};
+const rtl::Bootstrap * Bootstrap();
 
-struct FwkMutex: public ::rtl::Static {};
+osl::Mutex& FwkMutex();
 
 rtl::ByteSequence encodeBase16(const rtl::ByteSequence& rawData);
 rtl::ByteSequence decodeBase16(const rtl::ByteSequence& data);
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 70d6e7888097..29de226211f1 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -48,7 +48,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -100,8 +99,6 @@ using namespace jfw_plugin;
 
 namespace {
 
-struct PluginMutex: public ::rtl::Static {};
-
 #if defined(UNX) && !defined(ANDROID)
 OString getPluginJarPath(
 std::u16string_view sVendor,
@@ -616,10 +613,11 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
 JavaVM ** ppVm,
 JNIEnv ** ppEnv)
 {
+static osl::Mutex aPluginMutex;
 assert(pInfo != nullptr);
 assert(ppVm != nullptr);
 assert(ppEnv != nullptr);
-osl::MutexGuard guard(PluginMutex::get());
+osl::MutexGuard guard(aPluginMutex);
 javaPluginError errorcode = javaPluginError::NONE;
 #ifdef MACOSX
 rtl::Reference aVendorInfo = getJREInfoByPath( 
pInfo->sLocation );
diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx
index f5bdce32696d..c48f942ef8e8 100644
--- a/jvmfwk/source/elements.cxx
+++ b/jvmfwk/source/elements.cxx
@@ -961,7 +961,7 @@ void 
MergedSettings::getVmParametersArray(std::vector * parParams)
 const
 {
 assert(parParams != nullptr);
-osl::MutexGuard guard(FwkMutex::get());
+osl::MutexGuard guard(FwkMutex());
 
 *parParams = m_vmParams;
 }
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index ad1f636f00d0..40bbf629a36f 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -58,7 +58,7 @@ javaFrameworkError 
jfw_findAllJREs(std::vector> *pparI
 assert(pparInfo != nullptr);
 try
 {
-osl::MutexGuard guard(jfw::FwkMutex::get());
+osl::MutexGuard guard(jfw::FwkMutex());
 
 jfw::VendorSettings aVendorSettings;
 std::vector> vecInfo;
@@ -137,7 +137,7 @@ javaFrameworkError jfw_startVM(
 
 try
 {
-osl::MutexGuard guard(jfw::FwkMutex::get());
+osl::MutexGuard guard(jfw::FwkMutex());
 
 //We keep this pointer so we can determine if a VM has already
 //been created.
@@ -298,7 +298,7 @@ javaFrameworkError 
jfw_findAndSelectJRE(std::unique_ptr *pInfo)
 javaFrameworkError errcode = JFW_E_NONE;
 try
 {
-osl::MutexGuard guard(jfw::FwkMutex::get());
+osl::MutexGuard guard(jfw::FwkMutex());
 if (jfw::getMode() == jfw::JFW_MODE_DIRECT)
 return JFW_E_DIRECT_MODE;
 std::unique_ptr aCurrentInfo;
@@ -436,7 +436,7 @@ javaFrameworkError 
jfw_getSelectedJRE(std::unique_ptr *ppInfo)
 javaFrameworkError errcode = JFW_E_NONE;
 try
 {
-osl::MutexGuard 

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

2021-10-21 Thread Stephan Bergmann (via logerrit)
 jvmfwk/inc/fwkbase.hxx  |3 -
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |   46 
 jvmfwk/source/fwkbase.cxx   |4 -
 3 files changed, 23 insertions(+), 30 deletions(-)

New commits:
commit 3460c16d7f749d8d2a59d8b927df5ec31f64a083
Author: Stephan Bergmann 
AuthorDate: Thu Oct 21 10:14:38 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Oct 21 12:42:03 2021 +0200

Make getVersionInformation always return a VersionInfo

...even for JREs not listed in javavendors.xml, making it default to a
VersionInfo with sMinVersion = "1.8.0".

3d27b2fa9c5a03f78e5145377402f8a88e3da1be "tdf#124503: Support JRE 
installations
with unknown java.vendor property", which had changed getVersionInformation 
to
return an optional,  said in the commit message:  "For 
simplicity,
assume that any versions of such JREs are supported.  Our baseline is Java 
6,
and there are unlikely any older versions of JREs from unknown vendors out
there."  Our baseline is Java 8 by now, and there are still unlikely any 
older
JREs out there, but for macOS ARM64 we may want to restrict to at least 
Java 17
implementing  "JEP 391: macOS/AArch64 
Port",
and this commit is a prerequisite for such a change (where we would then 
e.g.
change the hardcoded "1.8.0" to "17" for just that one platform).

(OtherInfo::compareVersions in 
jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx
unconditionally returns 0, meaning "versions compare equal", so introducing 
a
default version of "1.8.0" should have no negative effect on any JREs that 
use
OtherInfo.)

Change-Id: I34dc5f2b755c2254a91d42c262786ceec70c746e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123958
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/jvmfwk/inc/fwkbase.hxx b/jvmfwk/inc/fwkbase.hxx
index 5f989cc08cee..61c3fa500138 100644
--- a/jvmfwk/inc/fwkbase.hxx
+++ b/jvmfwk/inc/fwkbase.hxx
@@ -21,7 +21,6 @@
 
 #include 
 
-#include 
 #include 
 #include 
 
@@ -40,7 +39,7 @@ class VendorSettings
 public:
 VendorSettings();
 
-std::optional getVersionInformation(std::u16string_view 
sVendor) const;
+VersionInfo getVersionInformation(std::u16string_view sVendor) const;
 };
 
 /* The class offers functions to retrieve verified bootstrap parameters.
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index d3b9b92a5b5e..70d6e7888097 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -348,16 +348,14 @@ javaPluginError jfw_plugin_getAllJavaInfos(
 
 for (auto const& vecInfo : vecInfos)
 {
-if (auto const versionInfo = 
vendorSettings.getVersionInformation(vecInfo->getVendor()))
-{
-javaPluginError err = checkJavaVersionRequirements(
-vecInfo, versionInfo->sMinVersion, versionInfo->sMaxVersion, 
versionInfo->vecExcludeVersions);
+auto const versionInfo = 
vendorSettings.getVersionInformation(vecInfo->getVendor());
+javaPluginError err = checkJavaVersionRequirements(
+vecInfo, versionInfo.sMinVersion, versionInfo.sMaxVersion, 
versionInfo.vecExcludeVersions);
 
-if (err == javaPluginError::FailedVersion || err == 
javaPluginError::WrongArch)
-continue;
-else if (err == javaPluginError::WrongVersionFormat)
-return err;
-}
+if (err == javaPluginError::FailedVersion || err == 
javaPluginError::WrongArch)
+continue;
+else if (err == javaPluginError::WrongVersionFormat)
+return err;
 
 vecVerifiedInfos.push_back(vecInfo);
 }
@@ -388,11 +386,9 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
 
 //Check if the detected JRE matches the version requirements
 javaPluginError errorcode = javaPluginError::NONE;
-if (auto const versionInfo = 
vendorSettings.getVersionInformation(aVendorInfo->getVendor()))
-{
-errorcode = checkJavaVersionRequirements(
-aVendorInfo, versionInfo->sMinVersion, versionInfo->sMaxVersion, 
versionInfo->vecExcludeVersions);
-}
+auto const versionInfo = 
vendorSettings.getVersionInformation(aVendorInfo->getVendor());
+errorcode = checkJavaVersionRequirements(
+aVendorInfo, versionInfo.sMinVersion, versionInfo.sMaxVersion, 
versionInfo.vecExcludeVersions);
 
 if (errorcode == javaPluginError::NONE)
 *ppInfo = createJavaInfo(aVendorInfo);
@@ -416,13 +412,12 @@ javaPluginError jfw_plugin_getJavaInfoFromJavaHome(
 
 //Check if the detected JRE matches the version requirements
 auto const versionInfo = 
vendorSettings.getVersionInformation(infoJavaHome[0]->getVendor());
-if (!versionInfo
-|| (checkJavaVersionRequirements(
+  

[Libreoffice-commits] core.git: jvmfwk/inc jvmfwk/plugins jvmfwk/source solenv/clang-format

2019-04-09 Thread Stephan Bergmann (via logerrit)
 jvmfwk/inc/fwkbase.hxx  |   11 
 jvmfwk/inc/libxmlutil.hxx   |4 
 jvmfwk/inc/vendorplugin.hxx |   94 +-
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |  109 ++-
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx  |7 
 jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx|   18 -
 jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx|5 
 jvmfwk/source/elements.cxx  |4 
 jvmfwk/source/framework.cxx |  273 ++--
 jvmfwk/source/fwkbase.cxx   |   18 +
 jvmfwk/source/libxmlutil.cxx|2 
 solenv/clang-format/blacklist   |4 
 12 files changed, 191 insertions(+), 358 deletions(-)

New commits:
commit 3d27b2fa9c5a03f78e5145377402f8a88e3da1be
Author: Stephan Bergmann 
AuthorDate: Tue Apr 9 14:51:54 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Apr 9 22:31:17 2019 +0200

tdf#124503: Support JRE installations with unknown java.vendor property

After recent additions of 61c4f96d6ae6a80370774e53287edb27cbce8067 "Support
AdoptOpenJDK" and 41507db590b24e1b9b45d95cad55c71ba2e4091d "Support Amazon
Corretto" to our hard-coded list, there is now reports that at least Debian 
and
Ubuntu tried to distribute versions of OpenJDK with the java.vendor propety 
set
to string like "Debian" or "Ubuntu".  Instead of trying to catch up with an
ever-growing hard-coded list, it is probably better to stop relying 
exclusively
on such a hard-coded list, and for unknown vendor values, try out whether 
the
SunInfo backend (which supports the "generic" OpenJDK) would be able to 
handle
the given JRE.  (For simplicity, assume that any versions of such JREs are
supported.  Our baseline is Java 6, and there are unlikely any older 
versions of
JREs from unknown vendors out there.  If this turns out to be problematic, 
we
could include information about problematic vendors after all, or add a 
general
check that JREs from unknown vendors are at least Java 6.)

Many functions in jvmfwk/inc/vendorplugin.hxx that used to take a set of
sVendor/sMinVersion/sMaxVerison/arExcludeList paramters had to be revised to
take a vendorSettings parameter instead, and
VendorSettings::getVersionInformation has been changed to return a
boost::optional, so that unknown vendors can be handled gracefully.

Change-Id: Ibf915f2ddd59e09b77e2c03be688cac0547b9ac9
Reviewed-on: https://gerrit.libreoffice.org/70460
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/jvmfwk/source/fwkbase.hxx b/jvmfwk/inc/fwkbase.hxx
similarity index 93%
rename from jvmfwk/source/fwkbase.hxx
rename to jvmfwk/inc/fwkbase.hxx
index b3779cda96b6..8fe077b79a28 100644
--- a/jvmfwk/source/fwkbase.hxx
+++ b/jvmfwk/inc/fwkbase.hxx
@@ -16,10 +16,15 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_JVMFWK_SOURCE_FWKBASE_HXX
-#define INCLUDED_JVMFWK_SOURCE_FWKBASE_HXX
+#ifndef INCLUDED_JVMFWK_INC_FWKBASE_HXX
+#define INCLUDED_JVMFWK_INC_FWKBASE_HXX
+
+#include 
+
+#include 
 
 #include 
+#include "elements.hxx"
 #include "libxmlutil.hxx"
 
 namespace jfw
@@ -34,7 +39,7 @@ class VendorSettings
 public:
 VendorSettings();
 
-VersionInfo getVersionInformation(const OUString & sVendor) const;
+boost::optional getVersionInformation(const OUString & 
sVendor) const;
 
 ::std::vector< OUString> getSupportedVendors() const;
 };
diff --git a/jvmfwk/source/libxmlutil.hxx b/jvmfwk/inc/libxmlutil.hxx
similarity index 96%
rename from jvmfwk/source/libxmlutil.hxx
rename to jvmfwk/inc/libxmlutil.hxx
index 8a58280b406d..078d285ac78f 100644
--- a/jvmfwk/source/libxmlutil.hxx
+++ b/jvmfwk/inc/libxmlutil.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_JVMFWK_SOURCE_LIBXMLUTIL_HXX
-#define INCLUDED_JVMFWK_SOURCE_LIBXMLUTIL_HXX
+#ifndef INCLUDED_JVMFWK_INC_LIBXMLUTIL_HXX
+#define INCLUDED_JVMFWK_INC_LIBXMLUTIL_HXX
 
 #include 
 #include 
diff --git a/jvmfwk/inc/vendorplugin.hxx b/jvmfwk/inc/vendorplugin.hxx
index f370f1123375..0aa6d84276e3 100644
--- a/jvmfwk/inc/vendorplugin.hxx
+++ b/jvmfwk/inc/vendorplugin.hxx
@@ -28,10 +28,10 @@
 
 #include 
 #include 
-#include 
-#include "elements.hxx"
 #include "vendorbase.hxx"
 
+namespace jfw { class VendorSettings; }
+
 /**
@file

@@ -56,7 +56,6 @@ enum class javaPluginError
 WrongVersionFormat,
 FailedVersion,
 NoJre,
-WrongVendor,
 WrongArch,
 VmCreationFailed
 };
@@ -64,26 +63,14 @@ enum class javaPluginError
 
 /** obtains information about installations of Java Runtime Environments 
(JREs).
 
-The function gathers 

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

2014-11-19 Thread Michael Weghorn
 jvmfwk/inc/vendorplugin.hxx |   22 ++
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |   73 +++-
 jvmfwk/source/framework.cxx |   38 +-
 3 files changed, 58 insertions(+), 75 deletions(-)

New commits:
commit 772a36932e4803beaffdad87200e0162e1020e94
Author: Michael Weghorn m.wegh...@posteo.de
Date:   Tue Nov 18 17:40:13 2014 +

changed type of parameters from rtl_uString to OUString

changed type of several parameters of the functions
jfw_plugin_getAllJavaInfos and jfw_plugin_getJavaInfoByPath
from rtl_uString to OUString

Change-Id: I80feb311542e6ccded9f9924f800c75a7e14a1e7
Signed-off-by: Stephan Bergmann sberg...@redhat.com

diff --git a/jvmfwk/inc/vendorplugin.hxx b/jvmfwk/inc/vendorplugin.hxx
index 02ea040..3fd4d35 100644
--- a/jvmfwk/inc/vendorplugin.hxx
+++ b/jvmfwk/inc/vendorplugin.hxx
@@ -36,7 +36,7 @@
what version a JRE must have then it relies on certain features and bug
fixes of that version. Because a version 1.4.2_1 from vendor X may contain
different fixes as the same version from vendor Y it is important to see
-   version an vendor as one entity. One without the other does not guarantee
+   version and vendor as one entity. One without the other does not guarantee
the existence of a particular set of features or bug fixes. An 
implementation
of this API may support multiple vendors. /p
p
@@ -83,11 +83,9 @@ typedef enum
 [in] only JREs from this vendor are examined. This parameter always 
contains
 a vendor string. That is, the string it is not empty.
 @param sMinVersion
-[in] represents the minimum version of a JRE. The string can be empty 
but
-a null pointer is not allowed.
+[in] represents the minimum version of a JRE. The string can be empty.
 @param sMaxVersion
-[in] represents the maximum version of a JRE. The string can be empty 
but
-a null pointer is not allowed.
+[in] represents the maximum version of a JRE. The string can be empty.
 @param arExcludeList
 [in] contains a list of quot;badquot; versions. JREs which have one 
of these
 versions must not be returned by this function. It can be NULL.
@@ -111,9 +109,9 @@ typedef enum
 version strings.
  */
 javaPluginError jfw_plugin_getAllJavaInfos(
-rtl_uString *sVendor,
-rtl_uString *sMinVersion,
-rtl_uString *sMaxVersion,
+OUString const sVendor,
+OUString const sMinVersion,
+OUString const sMaxVersion,
 rtl_uString * * arExcludeList,
 sal_Int32  nSizeExcludeList,
 JavaInfo*** parJavaInfo,
@@ -162,10 +160,10 @@ javaPluginError jfw_plugin_getAllJavaInfos(
a vendor which is not supported by this API implementation.
  */
 javaPluginError jfw_plugin_getJavaInfoByPath(
-rtl_uString *sLocation,
-rtl_uString *sVendor,
-rtl_uString *sMinVersion,
-rtl_uString *sMaxVersion,
+OUString const sLocation,
+OUString const sVendor,
+OUString const sMinVersion,
+OUString const sMaxVersion,
 rtl_uString * *arExcludeList,
 sal_Int32  nSizeExcludeList,
 JavaInfo ** ppInfo);
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index dd6335e..d0dac26 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -210,11 +210,9 @@ extern C void JNICALL abort_handler()
 @param aVendorInfo
 [in]  the object to be inspected whether it meets the version 
requirements
 @param sMinVersion
-[in] represents the minimum version of a JRE. The string can be empty 
but
-a null pointer is not allowed.
+[in] represents the minimum version of a JRE. The string can be empty.
 @param sMaxVersion
-[in] represents the maximum version of a JRE. The string can be empty 
but
-a null pointer is not allowed.
+[in] represents the maximum version of a JRE. The string can be empty.
 @param arExcludeList
 [in] contains a list of quot;badquot; versions. JREs which have one 
of these
 versions must not be returned by this function. It can be NULL.
@@ -232,19 +230,16 @@ extern C void JNICALL abort_handler()
  */
 javaPluginError checkJavaVersionRequirements(
 rtl::ReferenceVendorBase const  aVendorInfo,
-rtl_uString *sMinVersion,
-rtl_uString *sMaxVersion,
+OUString const sMinVersion,
+OUString const sMaxVersion,
 rtl_uString * * arExcludeList,
 sal_Int32  nLenList)
 {
-OUString ouMinVer(sMinVersion);
-OUString ouMaxVer(sMaxVersion);
-
-if (!ouMinVer.isEmpty())
+if (!sMinVersion.isEmpty())
 {
 try
 {
-if (aVendorInfo-compareVersions(ouMinVer)  0)
+if (aVendorInfo-compareVersions(sMinVersion)  0)
 return JFW_PLUGIN_E_FAILED_VERSION;
 }