diff options
author | Noel Grandin <noel@peralex.com> | 2015-06-09 08:52:12 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-06-09 11:34:31 +0200 |
commit | 2a0dda3dfb37f0cb69842f7d569c253d82f53713 (patch) | |
tree | 7a762c2fa22651cefb68021250a3fad8811e0f06 /qadevOOo/tests/java/mod/_toolkit/UnoControlComboBox.java | |
parent | Resolves: more crash on export of ooo47778-3.sxw to docx (diff) | |
download | core-2a0dda3dfb37f0cb69842f7d569c253d82f53713.tar.gz core-2a0dda3dfb37f0cb69842f7d569c253d82f53713.zip |
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/UnoControlComboBox.java')
-rw-r--r-- | qadevOOo/tests/java/mod/_toolkit/UnoControlComboBox.java | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/qadevOOo/tests/java/mod/_toolkit/UnoControlComboBox.java b/qadevOOo/tests/java/mod/_toolkit/UnoControlComboBox.java index 34ad3f819784..cdf41c1a650c 100644 --- a/qadevOOo/tests/java/mod/_toolkit/UnoControlComboBox.java +++ b/qadevOOo/tests/java/mod/_toolkit/UnoControlComboBox.java @@ -69,7 +69,7 @@ util.DesktopTools.closeDoc(xTextDoc); @Override protected TestEnvironment createTestEnvironment(TestParameters Param, - PrintWriter log) { + PrintWriter log) throws Exception { XInterface oObj = null; XWindowPeer the_win = null; XToolkit the_kit = null; @@ -102,18 +102,12 @@ util.DesktopTools.closeDoc(xTextDoc); xTextDoc.getCurrentController()); //get the ComboBoxControl for the needed Object relations - try { - oObj = the_access.getControl(the_Model); - aControl = the_access.getControl(the_Model2); - the_win = the_access.getControl(the_Model).getPeer(); - the_kit = the_win.getToolkit(); - aDevice = the_kit.createScreenCompatibleDevice(200, 200); - aGraphic = aDevice.createGraphics(); - } catch (Exception e) { - log.println("Couldn't get ComboBoxControl"); - e.printStackTrace(log); - throw new StatusException("Couldn't get ComboBoxControl", e); - } + oObj = the_access.getControl(the_Model); + aControl = the_access.getControl(the_Model2); + the_win = the_access.getControl(the_Model).getPeer(); + the_kit = the_win.getToolkit(); + aDevice = the_kit.createScreenCompatibleDevice(200, 200); + aGraphic = aDevice.createGraphics(); log.println("creating a new environment for UnoControlComboBox object"); |