summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--stoc/source/javaloader/javaloader.cxx12
1 files changed, 2 insertions, 10 deletions
diff --git a/stoc/source/javaloader/javaloader.cxx b/stoc/source/javaloader/javaloader.cxx
index 760f6d356a3c..269cdb182bc7 100644
--- a/stoc/source/javaloader/javaloader.cxx
+++ b/stoc/source/javaloader/javaloader.cxx
@@ -334,14 +334,8 @@ static Mutex & getInitMutex()
/// @throws Exception
static css::uno::Reference<XInterface> JavaComponentLoader_CreateInstance(const css::uno::Reference<XComponentContext> & xCtx)
{
- css::uno::Reference<XInterface> xRet;
-
try {
- MutexGuard guard( getInitMutex() );
- // The javaloader is never destroyed and there can be only one!
- // Note that the first context wins ....
- static css::uno::Reference< XInterface > xStaticRef = *new JavaComponentLoader(xCtx);
- xRet = xStaticRef;
+ return *new JavaComponentLoader(xCtx);
}
catch(const RuntimeException & runtimeException) {
SAL_INFO(
@@ -349,8 +343,6 @@ static css::uno::Reference<XInterface> JavaComponentLoader_CreateInstance(const
"could not init javaloader due to " << runtimeException);
throw;
}
-
- return xRet;
}
} //end namespace
@@ -362,7 +354,7 @@ static const struct ImplementationEntry g_entries[] =
{
{
JavaComponentLoader_CreateInstance, loader_getImplementationName,
- loader_getSupportedServiceNames, createSingleComponentFactory,
+ loader_getSupportedServiceNames, createOneInstanceComponentFactory,
nullptr , 0
},
{ nullptr, nullptr, nullptr, nullptr, nullptr, 0 }