summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-08-23 10:13:58 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-08-23 10:54:13 +0200
commitf12d6b76b6dd80c81a4d9902593ef5c762a3af73 (patch)
tree3cc08cf68ca602afa58a45b58f11de67984e8c41 /stoc
parent3a3060f6eb1f6d66fe230f919e560c28987135be (diff)
tdf#156701: Move DontEnableJava handling into askForRetry
Change-Id: I0deeed09fcea765e66c1967f40d60a1222f90c08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155964 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/javavm/javavm.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 305ebe290d34..b68813e5ffae 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -128,6 +128,9 @@ static void destroyAttachGuards(void * pData)
bool askForRetry(css::uno::Any const & rException)
{
+ if (comphelper::IsContextFlagActive("DontEnableJava"))
+ return false;
+
css::uno::Reference< css::uno::XCurrentContext > xContext(
css::uno::getCurrentContext());
if (xContext.is())
@@ -650,9 +653,6 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
}
case JFW_E_JAVA_DISABLED:
{
- if (comphelper::IsContextFlagActive("DontEnableJava"))
- return css::uno::Any();
-
//QueryBox:
//%PRODUCTNAME requires a Java runtime environment (JRE) to perform
//this task. However, use of a JRE has been disabled. Do you want to
@@ -690,9 +690,6 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
}
}
- if (comphelper::IsContextFlagActive("DontEnableJava"))
- return css::uno::Any();
-
//Error: %PRODUCTNAME requires a Java
//runtime environment (JRE) to perform this task. The selected JRE
//is defective. Please select another version or install a new JRE