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>
diff --git a/ridljar/com/sun/star/lib/util/NativeLibraryLoader.java b/ridljar/com/sun/star/lib/util/NativeLibraryLoader.java
index d255a71..eb5c6af 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.
     *