From 644487a1152c7586a7f20c7f372572a71d8494d5 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 7 Oct 2015 16:28:27 +0200 Subject: loplugin:unusedmethods Change-Id: I161cd52606c11b6008f5d8b1d8ee391692f91861 Reviewed-on: https://gerrit.libreoffice.org/19231 Tested-by: Jenkins Reviewed-by: Noel Grandin --- jvmaccess/source/classpath.cxx | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'jvmaccess') diff --git a/jvmaccess/source/classpath.cxx b/jvmaccess/source/classpath.cxx index 9fdc0fca78ad..abde60f81478 100644 --- a/jvmaccess/source/classpath.cxx +++ b/jvmaccess/source/classpath.cxx @@ -101,44 +101,4 @@ jobjectArray jvmaccess::ClassPath::translateToUrls( return result; } -jclass jvmaccess::ClassPath::loadClass( - css::uno::Reference< css::uno::XComponentContext > const & context, - JNIEnv * environment, OUString const & classPath, OUString const & name) -{ - assert(context.is()); - assert(environment != 0); - jclass classLoader(environment->FindClass("java/net/URLClassLoader")); - if (classLoader == 0) { - return 0; - } - jmethodID ctorLoader( - environment->GetMethodID(classLoader, "", "([Ljava/net/URL;)V")); - if (ctorLoader == 0) { - return 0; - } - jvalue arg; - arg.l = translateToUrls(context, environment, classPath); - if (arg.l == 0) { - return 0; - } - jobject cl = environment->NewObjectA(classLoader, ctorLoader, &arg); - if (cl == 0) { - return 0; - } - jmethodID methLoadClass( - environment->GetMethodID( - classLoader, "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;")); - if (methLoadClass == 0) { - return 0; - } - arg.l = environment->NewString( - static_cast< jchar const * >(name.getStr()), - static_cast< jsize >(name.getLength())); - if (arg.l == 0) { - return 0; - } - return static_cast( - environment->CallObjectMethodA(cl, methLoadClass, &arg)); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit