diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-07 16:28:27 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-10-27 08:20:43 +0000 |
commit | 644487a1152c7586a7f20c7f372572a71d8494d5 (patch) | |
tree | 683cdbd755ec1660e75f930e5be4cd6867e3e734 /jvmaccess/source | |
parent | 1b4dff2c371d31c99f34324c3f6f31888bdc34d7 (diff) |
loplugin:unusedmethods
Change-Id: I161cd52606c11b6008f5d8b1d8ee391692f91861
Reviewed-on: https://gerrit.libreoffice.org/19231
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'jvmaccess/source')
-rw-r--r-- | jvmaccess/source/classpath.cxx | 40 |
1 files changed, 0 insertions, 40 deletions
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, "<init>", "([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<jclass>( - environment->CallObjectMethodA(cl, methLoadClass, &arg)); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |