summaryrefslogtreecommitdiff
path: root/jurt
diff options
context:
space:
mode:
authorrbuj <robert.buj@gmail.com>2014-08-19 21:34:58 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-08-20 01:50:57 -0500
commit37c49c305852f4a58e010c63331ba302462754d9 (patch)
tree6de7f86b7d243296d71bcdaafedb3d095c239ef4 /jurt
parentb9813addf2816e4058069892963e50a97643023d (diff)
jurt: Throwable.getCause() instead of Throwable.getTargetException()
As of the JDK 1.4, Throwable.getCause() is the preferred method for getting thrown target exception. Change-Id: I14f3f9ae52869d1149f92b32562e7fb3293109b5 Reviewed-on: https://gerrit.libreoffice.org/11027 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'jurt')
-rw-r--r--jurt/com/sun/star/comp/loader/FactoryHelper.java4
-rw-r--r--jurt/com/sun/star/comp/loader/JavaLoader.java2
-rw-r--r--jurt/com/sun/star/lib/uno/environments/remote/Job.java2
3 files changed, 4 insertions, 4 deletions
diff --git a/jurt/com/sun/star/comp/loader/FactoryHelper.java b/jurt/com/sun/star/comp/loader/FactoryHelper.java
index 2a712011346a..92b480174769 100644
--- a/jurt/com/sun/star/comp/loader/FactoryHelper.java
+++ b/jurt/com/sun/star/comp/loader/FactoryHelper.java
@@ -198,7 +198,7 @@ public class FactoryHelper {
try {
return _constructor.newInstance( args );
} catch (InvocationTargetException invocationTargetException) {
- Throwable targetException = invocationTargetException.getTargetException();
+ Throwable targetException = invocationTargetException.getCause();
if (targetException instanceof java.lang.RuntimeException)
throw (java.lang.RuntimeException)targetException;
@@ -274,7 +274,7 @@ public class FactoryHelper {
}
return instance;
} catch (InvocationTargetException invocationTargetException) {
- Throwable targetException = invocationTargetException.getTargetException();
+ Throwable targetException = invocationTargetException.getCause();
if (targetException instanceof java.lang.RuntimeException)
throw (java.lang.RuntimeException)targetException;
diff --git a/jurt/com/sun/star/comp/loader/JavaLoader.java b/jurt/com/sun/star/comp/loader/JavaLoader.java
index d7f757a701f9..c82f8e941232 100644
--- a/jurt/com/sun/star/comp/loader/JavaLoader.java
+++ b/jurt/com/sun/star/comp/loader/JavaLoader.java
@@ -353,7 +353,7 @@ public class JavaLoader implements XImplementationLoader,
+ implementationName + " because " + e.toString() );
} catch ( InvocationTargetException e ) {
throw new CannotActivateFactoryException("Can not activate the factory for "
- + implementationName + " because " + e.getTargetException().toString() );
+ + implementationName + " because " + e.getCause().toString() );
}
return returnObject;
diff --git a/jurt/com/sun/star/lib/uno/environments/remote/Job.java b/jurt/com/sun/star/lib/uno/environments/remote/Job.java
index 47fc03342ef2..1d8b3661467d 100644
--- a/jurt/com/sun/star/lib/uno/environments/remote/Job.java
+++ b/jurt/com/sun/star/lib/uno/environments/remote/Job.java
@@ -90,7 +90,7 @@ public class Job {
? dispatch_queryInterface((Type) args[0])
: md.getMethod().invoke(_object, args);
} catch (InvocationTargetException e) {
- exception = e.getTargetException();
+ exception = e.getCause();
if (exception == null) {
exception = e;
}