summaryrefslogtreecommitdiff
path: root/jvmfwk/inc
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-11-15 21:44:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-16 12:29:38 +0100
commit1170db278db9f1067c05d5df95faf81c1ce861bc (patch)
tree42a4b261fd099548e8bb5aea3f34dfe676d0d9cf /jvmfwk/inc
parent2d2dc141f6d0eaa1e4737450fac707c67c05387c (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'jvmfwk/inc')
-rw-r--r--jvmfwk/inc/fwkutil.hxx20
1 files changed, 3 insertions, 17 deletions
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 <sal/config.h>
#include <sal/log.hxx>
#include <rtl/bootstrap.hxx>
-#include <rtl/instance.hxx>
#include <rtl/byteseq.hxx>
+#include <osl/mutex.hxx>
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> {};
+osl::Mutex& FwkMutex();
rtl::ByteSequence encodeBase16(const rtl::ByteSequence& rawData);
rtl::ByteSequence decodeBase16(const rtl::ByteSequence& data);