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/_fps | |
parent | 60f8dd78fa3f19e8bed867f7f5926fcf9a8d8e67 (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/_fps')
-rw-r--r-- | qadevOOo/tests/java/mod/_fps/FilePicker.java | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/qadevOOo/tests/java/mod/_fps/FilePicker.java b/qadevOOo/tests/java/mod/_fps/FilePicker.java index 87cbefcf743c..08b8e8734255 100644 --- a/qadevOOo/tests/java/mod/_fps/FilePicker.java +++ b/qadevOOo/tests/java/mod/_fps/FilePicker.java @@ -20,7 +20,6 @@ package mod._fps; import java.io.PrintWriter; -import lib.StatusException; import lib.TestCase; import lib.TestEnvironment; import lib.TestParameters; @@ -88,7 +87,7 @@ public class FilePicker extends TestCase { @Override public TestEnvironment createTestEnvironment( TestParameters Param, PrintWriter log ) - throws StatusException { + throws Exception { XInterface oObj = null; Object oInterface = null; XMultiServiceFactory xMSF = Param.getMSF(); @@ -97,13 +96,8 @@ public class FilePicker extends TestCase { (com.sun.star.ui.dialogs.TemplateDescription.FILEOPEN_READONLY_VERSION)}; short ctrlId = com.sun.star.ui.dialogs.ExtendedFilePickerElementIds.CHECKBOX_READONLY; - try { - oInterface = xMSF.createInstance - ( "com.sun.star.ui.dialogs.FilePicker" ); - } catch( com.sun.star.uno.Exception e ) { - log.println("Can't create an object." ); - throw new StatusException( "Can't create an object", e ); - } + oInterface = xMSF.createInstance + ( "com.sun.star.ui.dialogs.FilePicker" ); oObj = (XInterface) oInterface; |