diff options
author | Hossein <hossein@libreoffice.org> | 2023-08-31 11:02:09 +0200 |
---|---|---|
committer | Hossein <hossein@libreoffice.org> | 2023-09-01 00:02:44 +0200 |
commit | 345b214c37d1f645dd0e6e084358f8ca81d9ed66 (patch) | |
tree | 76d2a4f883b0022407121df7c0dc9190447ae132 /ridljar | |
parent | 462b0fee32442d6e6baffaf8a157d448dd0ecb4f (diff) |
tdf#149069 Revert "ridljar: check UnoClassLoader used for NativeLibraryLoader"
This reverts commit 97b61ea3297e04e64aab1e1a4ec50202e9f86fff. It checked
that the NativeLibraryLoader is an instance of the class
com.sun.star.lib.unoloader.UnoClassLoader. If this is not the case, a
warning was displayed. This was for java_uno bridge to work.
On the other hand, as the comment in the code implies, "not a problem
if this is using Java remote bridge or (in a) unit test". But, in the
code there was no check for that. As a result, this warning is displayed
in many places like the simple examples that want to connect to the
LibreOffice process via Java API.
Change-Id: I056ed372ad071573051024a63e51afd6b4425ce5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156302
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'ridljar')
-rw-r--r-- | ridljar/com/sun/star/lib/util/NativeLibraryLoader.java | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/ridljar/com/sun/star/lib/util/NativeLibraryLoader.java b/ridljar/com/sun/star/lib/util/NativeLibraryLoader.java index d255a71ea5d1..eb5c6af34e90 100644 --- a/ridljar/com/sun/star/lib/util/NativeLibraryLoader.java +++ b/ridljar/com/sun/star/lib/util/NativeLibraryLoader.java @@ -21,7 +21,6 @@ package com.sun.star.lib.util; import java.io.File; import java.net.URL; import java.net.URLClassLoader; -import com.sun.star.lib.unoloader.UnoClassLoader; /** * Helper functions to locate and load native files. @@ -36,14 +35,6 @@ import com.sun.star.lib.unoloader.UnoClassLoader; * algorithm.</p> */ public final class NativeLibraryLoader { - static { - // if it's some other class loader, then resolving the symbol - // Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call in - // java_uno will not work and result in UnsatisfiedLinkError - if (!(NativeLibraryLoader.class.getClassLoader() instanceof com.sun.star.lib.unoloader.UnoClassLoader)) { - System.err.println("warning: com.sun.star.lib.util.NativeLibraryLoader must be loaded by com.sun.star.lib.unoloader.UnoClassLoader for java_uno bridge to work (not a problem if this is using Java remote bridge or unit test)"); - } - } /** * Load a system library, using a given class loader to locate the library. * |