summaryrefslogtreecommitdiff
path: root/javaunohelper
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-23 12:03:21 +0200
committerNoel Grandin <noel@peralex.com>2014-05-23 15:06:00 +0200
commite7bc3cab019fbf040f9fb8b53ae2cf3f977d200b (patch)
treebc507bccee9fb71134e362b72d22991561e32aa0 /javaunohelper
parentc5d47c327a57df55fa3dac0fff6b65888d0345e4 (diff)
remove boilerplate in UNO Exception constructor calls
Now that we have default values for Exception constructor params, remove lots of boilerplate code. Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
Diffstat (limited to 'javaunohelper')
-rw-r--r--javaunohelper/source/bootstrap.cxx10
-rw-r--r--javaunohelper/source/vm.cxx4
2 files changed, 4 insertions, 10 deletions
diff --git a/javaunohelper/source/bootstrap.cxx b/javaunohelper/source/bootstrap.cxx
index 1628cb606ff4..fe26502b4fde 100644
--- a/javaunohelper/source/bootstrap.cxx
+++ b/javaunohelper/source/bootstrap.cxx
@@ -80,8 +80,7 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap(
if (JNI_FALSE != jni_env->ExceptionCheck())
{
jni_env->ExceptionClear();
- throw RuntimeException(
- "index out of bounds?!", Reference< XInterface >() );
+ throw RuntimeException( "index out of bounds?!" );
}
if (0 != jstr)
{
@@ -91,8 +90,7 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap(
if (JNI_FALSE != jni_env->ExceptionCheck())
{
jni_env->ExceptionClear();
- throw RuntimeException(
- "index out of bounds?!", Reference< XInterface >() );
+ throw RuntimeException( "index out of bounds?!" );
}
if (0 != jstr)
{
@@ -138,9 +136,7 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap(
Reference< lang::XComponent > xComp( xContext, UNO_QUERY );
if (xComp.is())
xComp->dispose();
- throw RuntimeException(
- "cannot get mapping C++ <-> Java!",
- Reference< XInterface >() );
+ throw RuntimeException("cannot get mapping C++ <-> Java!" );
}
jobject jret = (jobject)mapping.mapInterface( xContext.get(), ::getCppuType( &xContext ) );
diff --git a/javaunohelper/source/vm.cxx b/javaunohelper/source/vm.cxx
index 56fcfef1e642..23cb0e5ec61a 100644
--- a/javaunohelper/source/vm.cxx
+++ b/javaunohelper/source/vm.cxx
@@ -105,9 +105,7 @@ namespace javaunohelper {
vm, JNI_VERSION_1_2, false, jni_env ),
loader );
} catch ( ::jvmaccess::UnoVirtualMachine::CreationException & ) {
- throw css::uno::RuntimeException(
- OUString("jmvaccess::UnoVirtualMachine::CreationException occurred" ),
- css::uno::Reference< css::uno::XInterface >() );
+ throw css::uno::RuntimeException( "jvmaccess::UnoVirtualMachine::CreationException occurred" );
}
}