summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/mod/_toolkit/AccessibleButton.java
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-06-09 08:52:12 +0200
committerNoel Grandin <noel@peralex.com>2015-06-09 11:34:31 +0200
commit2a0dda3dfb37f0cb69842f7d569c253d82f53713 (patch)
tree7a762c2fa22651cefb68021250a3fad8811e0f06 /qadevOOo/tests/java/mod/_toolkit/AccessibleButton.java
parent60f8dd78fa3f19e8bed867f7f5926fcf9a8d8e67 (diff)
remove some unnecessary exception wrapping in the Java tests
Modify createTestEnvironment so that it throws Exception. This is appropriate for unit testing. The wrapping adds no value and the calling method already has a catch(Exception) to handle anything. Change-Id: I430a414f63d2cbfc3b65ecfde0285509265e5192
Diffstat (limited to 'qadevOOo/tests/java/mod/_toolkit/AccessibleButton.java')
-rw-r--r--qadevOOo/tests/java/mod/_toolkit/AccessibleButton.java11
1 files changed, 2 insertions, 9 deletions
diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleButton.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleButton.java
index 1b8f2461eb23..924595a2ad2b 100644
--- a/qadevOOo/tests/java/mod/_toolkit/AccessibleButton.java
+++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleButton.java
@@ -40,7 +40,6 @@ import java.io.PrintWriter;
import lib.StatusException;
import lib.TestEnvironment;
import lib.TestParameters;
-
import util.AccessibilityTools;
import util.SOfficeFactory;
import util.utils;
@@ -85,17 +84,11 @@ public class AccessibleButton extends lib.TestCase {
*/
@Override
protected TestEnvironment createTestEnvironment(TestParameters Param,
- PrintWriter log) {
+ PrintWriter log) throws Exception {
XInterface oObj = null;
XMultiServiceFactory msf = Param.getMSF();
- try {
- oObj = (XInterface) msf.createInstance("com.sun.star.awt.Toolkit");
- } catch (com.sun.star.uno.Exception e) {
- log.println("Couldn't get toolkit");
- e.printStackTrace(log);
- throw new StatusException("Couldn't get toolkit", e);
- }
+ oObj = (XInterface) msf.createInstance("com.sun.star.awt.Toolkit");
XExtendedToolkit tk = UnoRuntime.queryInterface(
XExtendedToolkit.class, oObj);