ridljar/com/sun/star/lib/util/NativeLibraryLoader.java | 9 --------- 1 file changed, 9 deletions(-)
New commits: commit db0ee77abb37c1c649cc14c1a8e54ed5357eef09 Author: Hossein <hoss...@libreoffice.org> AuthorDate: Thu Aug 31 11:02:09 2023 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue Sep 12 09:28:22 2023 +0200 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.st...@allotropia.de> Tested-by: Jenkins Reviewed-by: Hossein <hoss...@libreoffice.org> (cherry picked from commit 345b214c37d1f645dd0e6e084358f8ca81d9ed66) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156374 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> 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. *